-
Notifications
You must be signed in to change notification settings - Fork 884
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
auth can-i
could support GroupVersionResources with * for resource within a specific group
#1549
auth can-i
could support GroupVersionResources with * for resource within a specific group
#1549
Comments
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourceattributes-v1-authorization-k8s-io cc @enj for thoughts on this. |
The group parameter is independent from resource and also accepts a |
Running {
"kind": "SelfSubjectAccessReview",
"apiVersion": "authorization.k8s.io/v1",
"spec": {
"resourceAttributes": {
"namespace": "default",
"verb": "verb",
"resource": "*.apps" # not the best parsing
}
}
} The user likely wants the following API call instead: {
"kind": "SelfSubjectAccessReview",
"apiVersion": "authorization.k8s.io/v1",
"spec": {
"resourceAttributes": {
"namespace": "default",
"verb": "verb",
"resource": "*", # this seems like the
"group": "apps" # more correct parsing
}
}
} It should be fine to add more nuanced special case logic around |
Ah that makes sense. Thanks Mo! I think we'd accept a PR that expands on this parsing (or maybe allows for a /triage accepted |
/assign |
What would you like to be added:
Support for
kubectl auth can-i verb *.group
queries.Why is this needed:
Currently it's not possible to make such queries because the code only checks if the whole argument is
*
.The text was updated successfully, but these errors were encountered: