You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/reference/access-authn-authz/abac.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,19 +17,21 @@ weight: 80
17
17
<!-- overview -->
18
18
19
19
<!--
20
-
Attribute-based access control (ABAC) defines an access control paradigm whereby access rights are granted to users through the use of policies which combine attributes together.
20
+
Attribute-based access control (ABAC) defines an access control paradigm whereby access rights are granted
21
+
to users through the use of policies which combine attributes together.
21
22
-->
22
-
基于属性的访问控制(Attribute-based access control - ABAC)定义了访问控制范例,
To enable `ABAC` mode, specify `--authorization-policy-file=SOME_FILENAME` and `--authorization-mode=ABAC` on startup.
31
+
To enable `ABAC` mode, specify `--authorization-policy-file=SOME_FILENAME` and `--authorization-mode=ABAC`
32
+
on startup.
31
33
32
-
The file format is [one JSON object per line](https://jsonlines.org/). There
34
+
The file format is [one JSON object per line](https://jsonlines.org/). There
33
35
should be no enclosing list or map, only one map per line.
34
36
35
37
Each line is a "policy object", where each such object is a map with the following
@@ -45,7 +47,8 @@ properties:
45
47
46
48
<!--
47
49
- Versioning properties:
48
-
- `apiVersion`, type string; valid values are "abac.authorization.kubernetes.io/v1beta1". Allows versioning and conversion of the policy format.
50
+
- `apiVersion`, type string; valid values are "abac.authorization.kubernetes.io/v1beta1". Allows versioning
51
+
and conversion of the policy format.
49
52
- `kind`, type string: valid values are "Policy". Allows versioning and conversion of the policy format.
50
53
-->
51
54
- 版本控制属性:
@@ -54,8 +57,11 @@ properties:
54
57
<!--
55
58
- `spec` property set to a map with the following properties:
56
59
- Subject-matching properties:
57
-
- `user`, type string; the user-string from `--token-auth-file`. If you specify `user`, it must match the username of the authenticated user.
58
-
- `group`, type string; if you specify `group`, it must match one of the groups of the authenticated user. `system:authenticated` matches all authenticated requests. `system:unauthenticated` matches all unauthenticated requests.
60
+
- `user`, type string; the user-string from `--token-auth-file`. If you specify `user`, it must match the
61
+
username of the authenticated user.
62
+
- `group`, type string; if you specify `group`, it must match one of the groups of the authenticated user.
63
+
`system:authenticated` matches all authenticated requests. `system:unauthenticated` matches all
64
+
unauthenticated requests.
59
65
-->
60
66
-`spec` 配置为具有以下映射的属性:
61
67
- 主体匹配属性:
@@ -89,10 +95,11 @@ properties:
89
95
- Non-resource-matching properties:
90
96
- `nonResourcePath`, type string; non-resource request paths.
91
97
- Ex: `/version` or `/apis`
92
-
- Wildcard:
98
+
- Wildcard:
93
99
- `*` matches all non-resource requests.
94
100
- `/foo/*` matches all subpaths of `/foo/`.
95
-
- `readonly`, type boolean, when true, means that the Resource-matching policy only applies to get, list, and watch operations, Non-resource-matching policy only applies to get operation.
101
+
- `readonly`, type boolean, when true, means that the Resource-matching policy only applies to get, list,
102
+
and watch operations, Non-resource-matching policy only applies to get operation.
96
103
-->
97
104
- 非资源匹配属性:
98
105
-`nonResourcePath`,字符串类型;非资源请求路径。
@@ -104,6 +111,7 @@ properties:
104
111
非资源匹配属性仅适用于 get 操作。
105
112
106
113
{{< note >}}
114
+
107
115
<!--
108
116
An unset property is the same as a property set to the zero value for its type
109
117
(e.g. empty string, 0, false). However, unset should be preferred for
@@ -123,7 +131,7 @@ REST interface.
123
131
124
132
A request has attributes which correspond to the properties of a policy object.
125
133
126
-
When a request is received, the attributes are determined. Unknown attributes
134
+
When a request is received, the attributes are determined. Unknown attributes
127
135
are set to the zero value of its type (e.g. empty string, 0, false).
128
136
129
137
A property set to `"*"` will match any value of the corresponding attribute.
@@ -253,7 +261,8 @@ kubectl --v=8 version
253
261
254
262
## A quick note on service accounts
255
263
256
-
Every service account has a corresponding ABAC username, and that service account's username is generated according to the naming convention:
264
+
Every service account has a corresponding ABAC username, and that service account's username is generated
0 commit comments