-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle secret read clusterroles #8871
Conversation
8e73869
to
03e4229
Compare
569001c
to
07c1c80
Compare
Don't the admission-controller unit tests cover this already? What kind of coverage are you thinking about for e2e tests? 🤔 |
5716875
to
52bb6e5
Compare
Nvm, the role-sync-controller was not working correctly making some e2e fail. This was fixed in #9005 There is one thing which is not covered by e2e, will track it in an internal issue: With this change the cdp and deployment-service can read secrets from kube-system because they need this access to allow users to deploy read secret cluster roles. This can not be defined as a generic test as it would fail on non-eks where it's not allowed. |
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
52bb6e5
to
b592364
Compare
👍 |
Co-authored-by: Martin Linkhorst <[email protected]>
👍 |
1 similar comment
👍 |
Improves handling of secret read cluster roles in EKS clusters
The implementation is described as follows:
({ApiGroups: [""], Resources:["secrets"],Verbs:["get|list|watch"]}
). If detected, it extracts the permissions from the role and moves them to an annotation:clusterroles.admission-controller.zalando.org/secret-read-verbs: "get,list,watch"
. This achieves two things 1) Users can't deploy clusterroles with secret read permissions because those permissions will be removed during admission. 2) The role gets annotated such that it can be detected if the users intended to have read secret permissions. This is implemented in admission-controller: Update to version master-244 #8987clusterroles.admission-controller.zalando.org/secret-read-verbs: "get,list,watch"
and resolve the clusterrolebindings binding to those roles. With the bindings we get a list of subjects that want read secret permissions at cluster level and those subjects can be added to the per namespace secrets role bindings. This is implemented in role-sync-controller: Update to version main-7 #8986TODO
Add e2e covering this feature.