-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Users Can't Delegate CSR Approval/Signing Permissions Within A Domain #122154
Users Can't Delegate CSR Approval/Signing Permissions Within A Domain #122154
Comments
resourceNames don't support partial globs, so |
/remove-kind bug |
I understand that, but since the authorizer for CSRs allows |
As in, if the |
The CSR admission plugin does two subject access review checks to check for the wildcard permission and the specific permission.
|
Explaining for people wondering why, "can't you just make * glob for name?". Because our authorizer doesn't interpret names or require referenced resources to exist, it's entirely possible that some entity is actually using "" for "something/" for a meaning we don't control. The only fully safe way to make a change is introduce a new field. |
I think the point is less that the generic RBAC implementation of escalation detection should be different - or that it should honor any generic admission plugin or any custom verb, etc, and that if we choose to ship Kubernetes with this custom logic around CSRs, it might be beneficial if that logic were more fully supported / more self-consistent and had fewer rough edges. |
However, I know better than to try convince you two that "just this one time" we need a one-off codepath to support something ;) Consider the issue a documentation of the limitation. |
After some more conversation @deads2k showed me every way that an actor with no signer name restriction on CSR approval could abuse the system to get CSR creation rights (given that the actor has other privileges), since those are not super locked down, and then they'd be able to create and self-approve a CSR for |
While we try to figure out a better solution in this space, you could try restricting what such an actor could do via a CEL admission policy. It is not that different from letting users create pods but then preventing them from creating privileged pods. |
How we might solve this: CEL authz where one rule definition covers both authz and the admission stage. Not for the faint hearted, I think. |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
If you want to either:
then any of those would be champion, @stevekuznetsov |
@sftim would you want to see something more broadly scoped than a blog that answers the question of "how do you give some identity the ability to delegate CSR approval and signing using VAP"? I can certainly write something like that. |
@stevekuznetsov that sounds ideal |
What happened?
If a user has permission to approve or sign CSRs for a whole domain, they cannot delegate some part of that domain to another role.
What did you expect to happen?
The escalation check on RBAC creation should not erroneously tell you that you can't escalate, when you are not escalating.
How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
N/A
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: