-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kube] fix greedy deny rule blocking namespace list when blocking oth…
…er resources (#44893) * [kube] fix greedy deny rule blocking namespace list when blocking other resources This PR fixes an edge case where the deny rule for blocking access to a resource becomes greedy and blocks access to the whole namespace. eg: ``` allow: kubernetes_labels: '*': '*' kubernetes_resources: - kind: '*' name: '*' namespace: '*' verbs: - '*' deny: kubernetes_resources: - kind: secret name: '*' namespace: '*' verbs: - '*' ``` With the example above, access to secrets must be blocked but the user is allowed to access every other resource in any namespace. The previous model was greedy and blocked access to namespace list. * add extra test * handle comments
- Loading branch information
Showing
4 changed files
with
121 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters