Document the use of verb if set resourceNames
ref to https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/rbac/helpers.go#L225
This commit is contained in:
@@ -186,9 +186,10 @@ rules:
|
|||||||
verbs: ["update", "get"]
|
verbs: ["update", "get"]
|
||||||
```
|
```
|
||||||
|
|
||||||
Notably, `resourceNames` can NOT be used to limit requests using the "create" verb because
|
Notably, if `resourceNames` are set, then the verb must not be list, watch, create, or deletecollection.
|
||||||
authorizers only have access to information that can be obtained from the request URL, method,
|
Because resource names are not present in the URL for create, list, watch, and deletecollection API requests,
|
||||||
and headers (resource names in a "create" request are part of the request body).
|
those verbs would not be allowed by a rule with resourceNames set, since the resourceNames portion of the
|
||||||
|
rule would not match the request.
|
||||||
|
|
||||||
#### Role Examples
|
#### Role Examples
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user