mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
Merge pull request #12469 from xiejunan/auth_example
change "ns" to "namespace" in example and doc for ABAC authorization
This commit is contained in:
commit
08f67e5888
@ -111,7 +111,7 @@ To permit an action Policy with an unset namespace applies regardless of namespa
|
|||||||
1. Alice can do anything: `{"user":"alice"}`
|
1. Alice can do anything: `{"user":"alice"}`
|
||||||
2. Kubelet can read any pods: `{"user":"kubelet", "resource": "pods", "readonly": true}`
|
2. Kubelet can read any pods: `{"user":"kubelet", "resource": "pods", "readonly": true}`
|
||||||
3. Kubelet can read and write events: `{"user":"kubelet", "resource": "events"}`
|
3. Kubelet can read and write events: `{"user":"kubelet", "resource": "events"}`
|
||||||
4. Bob can just read pods in namespace "projectCaribou": `{"user":"bob", "resource": "pods", "readonly": true, "ns": "projectCaribou"}`
|
4. Bob can just read pods in namespace "projectCaribou": `{"user":"bob", "resource": "pods", "readonly": true, "namespace": "projectCaribou"}`
|
||||||
|
|
||||||
[Complete file example](http://releases.k8s.io/HEAD/pkg/auth/authorizer/abac/example_policy_file.jsonl)
|
[Complete file example](http://releases.k8s.io/HEAD/pkg/auth/authorizer/abac/example_policy_file.jsonl)
|
||||||
|
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
{"user":"kubelet", "readonly": true, "resource": "services"}
|
{"user":"kubelet", "readonly": true, "resource": "services"}
|
||||||
{"user":"kubelet", "readonly": true, "resource": "endpoints"}
|
{"user":"kubelet", "readonly": true, "resource": "endpoints"}
|
||||||
{"user":"kubelet", "resource": "events"}
|
{"user":"kubelet", "resource": "events"}
|
||||||
{"user":"alice", "ns": "projectCaribou"}
|
{"user":"alice", "namespace": "projectCaribou"}
|
||||||
{"user":"bob", "readonly": true, "ns": "projectCaribou"}
|
{"user":"bob", "readonly": true, "namespace": "projectCaribou"}
|
||||||
|
Loading…
Reference in New Issue
Block a user