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/en/docs/reference/access-authn-authz/abac.md
+65-54Lines changed: 65 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,43 +10,50 @@ weight: 80
10
10
---
11
11
12
12
<!-- overview -->
13
-
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.
13
+
Attribute-based access control (ABAC) defines an access control paradigm whereby access rights are granted
14
+
to users through the use of policies which combine attributes together.
14
15
15
16
<!-- body -->
16
17
## Policy File Format
17
18
18
-
To enable `ABAC` mode, specify `--authorization-policy-file=SOME_FILENAME` and `--authorization-mode=ABAC` on startup.
19
+
To enable `ABAC` mode, specify `--authorization-policy-file=SOME_FILENAME` and `--authorization-mode=ABAC`
20
+
on startup.
19
21
20
-
The file format is [one JSON object per line](https://jsonlines.org/). There
22
+
The file format is [one JSON object per line](https://jsonlines.org/). There
21
23
should be no enclosing list or map, only one map per line.
22
24
23
25
Each line is a "policy object", where each such object is a map with the following
24
26
properties:
25
27
26
-
- Versioning properties:
27
-
-`apiVersion`, type string; valid values are "abac.authorization.kubernetes.io/v1beta1". Allows versioning and conversion of the policy format.
28
-
-`kind`, type string: valid values are "Policy". Allows versioning and conversion of the policy format.
29
-
-`spec` property set to a map with the following properties:
30
-
- Subject-matching properties:
31
-
-`user`, type string; the user-string from `--token-auth-file`. If you specify `user`, it must match the username of the authenticated user.
32
-
-`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.
33
-
- Resource-matching properties:
34
-
-`apiGroup`, type string; an API group.
35
-
- Ex: `apps`, `networking.k8s.io`
36
-
- Wildcard: `*` matches all API groups.
37
-
-`namespace`, type string; a namespace.
38
-
- Ex: `kube-system`
39
-
- Wildcard: `*` matches all resource requests.
40
-
-`resource`, type string; a resource type
41
-
- Ex: `pods`, `deployments`
42
-
- Wildcard: `*` matches all resource requests.
43
-
- Non-resource-matching properties:
44
-
-`nonResourcePath`, type string; non-resource request paths.
45
-
- Ex: `/version` or `/apis`
46
-
- Wildcard:
47
-
-`*` matches all non-resource requests.
48
-
-`/foo/*` matches all subpaths of `/foo/`.
49
-
-`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.
28
+
- Versioning properties:
29
+
-`apiVersion`, type string; valid values are "abac.authorization.kubernetes.io/v1beta1". Allows versioning
30
+
and conversion of the policy format.
31
+
-`kind`, type string: valid values are "Policy". Allows versioning and conversion of the policy format.
32
+
-`spec` property set to a map with the following properties:
33
+
- Subject-matching properties:
34
+
-`user`, type string; the user-string from `--token-auth-file`. If you specify `user`, it must match the
35
+
username of the authenticated user.
36
+
-`group`, type string; if you specify `group`, it must match one of the groups of the authenticated user.
37
+
`system:authenticated` matches all authenticated requests. `system:unauthenticated` matches all
38
+
unauthenticated requests.
39
+
- Resource-matching properties:
40
+
-`apiGroup`, type string; an API group.
41
+
- Ex: `apps`, `networking.k8s.io`
42
+
- Wildcard: `*` matches all API groups.
43
+
-`namespace`, type string; a namespace.
44
+
- Ex: `kube-system`
45
+
- Wildcard: `*` matches all resource requests.
46
+
-`resource`, type string; a resource type
47
+
- Ex: `pods`, `deployments`
48
+
- Wildcard: `*` matches all resource requests.
49
+
- Non-resource-matching properties:
50
+
-`nonResourcePath`, type string; non-resource request paths.
51
+
- Ex: `/version` or `/apis`
52
+
- Wildcard:
53
+
-`*` matches all non-resource requests.
54
+
-`/foo/*` matches all subpaths of `/foo/`.
55
+
-`readonly`, type boolean, when true, means that the Resource-matching policy only applies to get, list,
56
+
and watch operations, Non-resource-matching policy only applies to get operation.
50
57
51
58
{{< note >}}
52
59
An unset property is the same as a property set to the zero value for its type
@@ -61,7 +68,7 @@ REST interface.
61
68
62
69
A request has attributes which correspond to the properties of a policy object.
63
70
64
-
When a request is received, the attributes are determined. Unknown attributes
71
+
When a request is received, the attributes are determined. Unknown attributes
65
72
are set to the zero value of its type (e.g. empty string, 0, false).
66
73
67
74
A property set to `"*"` will match any value of the corresponding attribute.
@@ -95,42 +102,49 @@ exposed via the `nonResourcePath` property in a policy (see [examples](#examples
95
102
To inspect the HTTP calls involved in a specific kubectl operation you can turn
0 commit comments