-
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
[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 |
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]>
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
@@ -613,6 +613,249 @@ To test it, change the context to `myuser`: | |||
kubectl config use-context myuser | |||
``` | |||
|
|||
<!-- TODO this should become a task page --> |
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.
Can we make this a task page before the first merge?
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.
Yes totally - I didn't know what the preference was, since the other set above was not a task yet. Do you think we should put this under content/en/docs/tasks/administer-cluster/
?
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.
|
||
### Set up a service account for the installer | ||
|
||
In this example, we will assume some application that installs CSR signers on a Kubernetes cluster. |
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.
Per the style guide we avoid using “we“.
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: csr-signer-installer |
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.
Defining this namespace should be its own step.
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