-
Notifications
You must be signed in to change notification settings - Fork 715
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
Feature Reqest: Don't bind the admin.conf user to system:masters #2414
Comments
the admin.conf is like a root password...it must not be shared. it makes perfect sense for a deployer on cluster creation to sign break-glass credentials and that is what the admin.conf is.
sharing the admin.conf in such a scenario is not ideal. /kind documentation |
With the lifetime on the certificate being a year, it seems likely that in many cases users who had valid access to the credential when the cluster was created, may no longer need access during that period. I'd agree that admin.conf should be a break-glass credential, but it may benefit cluster operators to provide a mechanism for that credential to be revoked, given its lifetime. |
you can also rotate the cluster CA, which will invalidate the system:master credentials.
that is a kubernetes problem, since revocation is not supported in core. something that we can improve with respect to kubeadm admin credentials is to sign two files:
|
/assign |
@raesene please add LGTM to this PR: |
done :) |
Would an off-line CA that could issue break-glass admin certs be more secure? you still have a "root" credential in the off-line CA that you would need to protect, but could issue shorter lived/time boxed admin.conf certs that could be controlled through other means. |
Would perhaps be useful to also put the suggestion of |
by off-line do you mean a CA that the cluster components and kubeadm are not aware of, such as a root CA of the user org?
there is a warning for that on this page:
but a message for that in the output of "init" seems fine for 1.23. PRs welcome. |
Excellent. I'll draft a PR. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
New TestGrid alerts at sig-cluster-lifecycle-kubeadm#kubeadm-kinder-super-admin-latest since commit/dbd3f3564.
We may update the CI after we removed some logics in kubernetes/kubernetes#122786. |
yes, we need to update the test a little. |
PR |
this is done |
edit by neolit123
tasks for 1.29
kubeadm: generate a client certificate with "system:masters" in a separate file enhancements#4214
kubeadm: add KEP 4214 for separate super-user kubeconfig enhancements#4218
keps/../kubeadm: 4214: revisit test plan and risks/mitigations enhancements#4302
kubeadm: add support for separate super-admin.conf kubeconfig file kubernetes#121305
kubeadm: poll additional CRB create calls for kubeadm:cluster-admins kubernetes#121609
kubeadm: do not poll in TestEnsureAdminClusterRoleBindingImpl kubernetes#121648
test/e2e_kubeadm: add test for the kubeadm:cluster-admins CRB kubernetes#121674
kubeadm: ensure the kubelet and kube-apiserver wait checks go first kubernetes#121743
kubeadm: change SystemPrivilegedGroup in apiserve-kubelet-client.crt kubernetes#121837
kubeadm: support updating certificate organization during 'kubeadm certs renew' kubernetes#121841
kubeadm: introduce documentation changes for super-admin.conf website#43540
certificates.md: add note about system:masters in apiserver cert website#43870
kinder: add workflow for testing super-admin.conf #2949
kinder: fix missing quotes in super-admin-tasks.yaml #2951
kinder: fix unwanted sudo in super-admin-tasks.yaml #2952
kubeadm: add new test job for super-admin.conf test-infra#31161
kinder: add tests for /etc/kubernetes/pki/apiserver-kubelet-client.crt #2960
tasks for 1.30
original issue description
At the moment, when a new Kubeadm cluster is created, the default credential that is provided for cluster operators to use has a subject group of
system:masters
. e.g.This is a special group for which
cluster-admin
rights are hardcoded into the Kubernetes API server source code (https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/rbac/escalation_check.go#L38).As a result, this credential cannot be revoked, if a cluster operator loses control of it, or if one of their admins moves team or leaves the organization, the only way to revoke access completely is to rotate the cluster certificate authority keys.
Whilst Kubernetes in general doesn't currently support certificate revocation (kubernetes/kubernetes#18982) it could be possible to reduce the risk posed by a lost admin.conf file, by having a specific clusterrolebinding for the admin.conf user to the cluster-admin clusterrole.
This would allow cluster operators to largely revoke the rights assigned to that credential, by removing the binding. It would still have
system:authenticated
rights, but these are likely (in most clusters) to be significantly lower thancluster-admin
.The text was updated successfully, but these errors were encountered: