-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[WIP] authn-authz: document delegating custom signing domains #49275
base: main
Are you sure you want to change the base?
[WIP] authn-authz: document delegating custom signing domains #49275
Conversation
c8dc3aa
to
5e12edc
Compare
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
sounds like a task [page] - this is a task a cluster admin might want to learn |
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.
/retitle [WIP] authn-authz: document delegating custom signing domains
content/en/docs/reference/access-authn-authz/certificate-signing-requests.md
Outdated
Show resolved
Hide resolved
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: top-level-csr-approver | ||
rules: | ||
- apiGroups: ["certificates.k8s.io"] | ||
resourceNames: ["example.com/*"] | ||
resources: ["signers"] | ||
verbs: ["approve", "sign"] |
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.
Ideally, either:
- mention that RBAC is only one possible authz mechanism
- avoid a focus RBAC and instead talk about what the SubjectAccessReview(s) will look like
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.
Thanks, I need to read up on the other mechanisms right now.
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.
The main in-tree alternative is webhook authz, but you can combine that with eg https://www.openpolicyagent.org/integrations/kubernetes-authorization/ or https://github.com/awslabs/cedar-access-control-for-k8s
OpenShift has its own custom authz that extends K8s RBAC.
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.
Thought about this a little more and I'm not sure how to address this comment. The document is specifically addressing a workaround for the RBAC authorizer not understanding example.com/*
in a ClusterRole as granting permissions over the entire domain. Other implementations of SubjectAccessReview backends won't necessarily have the delegation problem that RBAC has. OpenShift RBAC ~is k8s RBAC, so the doc here applies to OpenShift identically. By design the doc will not have any meaning in other contexts.
content/en/docs/reference/access-authn-authz/certificate-signing-requests.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/access-authn-authz/certificate-signing-requests.md
Outdated
Show resolved
Hide resolved
5e12edc
to
00ab59d
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
00ab59d
to
c7bcb15
Compare
its permissions to sign, approve or deny CertificateSigningRequests outside of that | ||
domain may be restricted by: | ||
|
||
<!-- TODO validate best posture here, signer names are opaque and don't need to be domains? --> |
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.
@enj would appreciate your review here.
Error from server (Forbidden): error when creating "-": clusterroles.rbac.authorization.k8s.io "specific-csr-approver" is forbidden: ValidatingAdmissionPolicy 'installer-csr-delegation-policy' with binding 'installer-csr-delegation-policy-binding' denied request: failed expression: variables.signerNameInDomain == true | ||
``` | ||
|
||
TODO: why don't we get the message? from the VAP?? |
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.
@enj would appreciate your review here.
|
||
TODO: why don't we get the message? from the VAP?? | ||
|
||
TODO: validate that domain parameter is not empty or startsWith is useless? |
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.
@enj would appreciate your review here.
b3728e3
to
b5d1101
Compare
Correctly scoping permissions for an actor that can delegate permissions to sign and approve CertificateSigningRequests under a domain is subtle. Signed-off-by: Steve Kuznetsov <[email protected]>
b5d1101
to
25b4950
Compare
Description
Correctly scoping permissions for an actor that can delegate permissions to sign and approve CertificateSigningRequests under a domain is subtle.
Issue
Closes: kubernetes/kubernetes#122154
cc @enj