-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fixes cluster-admin seeing a completely empty UI #2574
Conversation
For reference this is what a SelfSubjectReviews response for cluster-admin looks like: {
"metadata": { "creationTimestamp": null },
"spec": {},
"status": {
"resourceRules": [
{
"verbs": ["create"],
"apiGroups": ["authorization.k8s.io"],
"resources": ["selfsubjectaccessreviews", "selfsubjectrulesreviews"]
},
{ "verbs": ["*"], "apiGroups": ["*"], "resources": ["*"] }
],
"nonResourceRules": [
{
"verbs": ["get"],
"nonResourceURLs": [
"/healthz",
"/livez",
"/readyz",
"/version",
"/version/"
]
},
{
"verbs": ["get"],
"nonResourceURLs": [
"/api",
"/api/*",
"/apis",
"/apis/*",
"/healthz",
"/livez",
"/openapi",
"/openapi/*",
"/readyz",
"/version",
"/version/"
]
},
{ "verbs": ["*"], "nonResourceURLs": ["*"] }
],
"incomplete": true,
"evaluationError": "webhook authorizer does not support user rule resolution"
}
} |
👍 would be great to have this merged, fixes some issues we're having with cluster access @foot any plans to push this through? |
Sorry! Got distracted. Will try and wrap this up for the next release |
- We don't handle wildcards in the code right now.
a4316ff
to
ea4d1b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, love the extra comments 👍
Fixes allowing
cluster-admin
and other users with*
permissions in their RBAC rules from using the UI.Prior to this our rule engine determined that
cluster-admin
couldn't see any namespaces as we didn't take*
into account.What changed?
Adds support for evaluating
*
in the various positions it can appear ({ "verbs": ["*"], "apiGroups": ["*"], "resources": ["*"] }
) when evaluating the rules that determine which Namespaces we think a user has access to.Why was this change made?
Its common for people to use
cluster-admin
when debugging permissions ascluster-admin
should be able to see everything.How was this change implemented?
Updates to our rules engine.
How did you validate the change?
Only with unit tests so far.