-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Ensure that no embedded controllers are using the admin RBAC #7212
Comments
Validated on Commit id 4e1ba3a
There is a new "supervisor.kubeconfig" which was not there in previous version
Additional certs for supervisor which were not in previous version:
Apply the sudo cat /var/lib/rancher/k3s/server/manifests/web-helmchart.yaml
Verify with generated audit logs: Followed steps provided here for creating the audit logs directory and starting the k3s service with the required args:
Edit etc/systemd/system/k3s.service with lines:
edit the config file by adding:
then:
Sample audit log lines verifying the 'system:k3s-supervisor' was used by the helm-controller:
In the previous version 1.27.2 the grep supervisor would return empty. |
K3s tracking issue for:
We're not going to be changing anything about the default admin kubeconfig, but we DO need to address this bit:
In particular, it appears that the deploy controller is using the
system:admin
user account andsystem:masters
group instead of a dedicated service account. We should ensure that the deploy controller uses a separate account for audit purposes. This may require additional RBAC to accommodate.Specifically, it looks like we're using the admin kubeconfig for all the embedded controllers - of which the deploy controller is the most visible:
k3s/pkg/server/server.go
Line 104 in 2992477
We're also using it for the etcd snapshot CLI, although that may be more forgivable:
k3s/pkg/cli/etcdsnapshot/etcd_snapshot.go
Line 119 in 2992477
There is a bit of a chicken-and-egg problem with bootstrapping RBAC, as we need an admin account to create additional RBAC, but only the built-in Kubernetes RBAC is available when the cluster is first started. That will need to be worked through as part of resolving this issue.
Ref: SURE-6081
The text was updated successfully, but these errors were encountered: