bhouse-nexthop opened a new issue, #14907: URL: https://github.com/apache/cloudstack/issues/14907
### Problem `getKubernetesClusterConfig` returns the same kubeconfig to every caller: the cluster's `admin.conf` (or `user.conf` when present). Anyone who may operate the cluster gets it: - every user of the owning account, and every member of the owning project - domain admins of the domain - users with the default read-only roles (`Read-Only User - Default`, `Read-Only Admin - Default`), because those roles allow every `get*` API The credential is cluster-admin and valid for a year. All users share it, so Kubernetes audit logs can't tell them apart, and it can't be taken away from one user: a user who is removed from the account or the project, or moved to a read-only role, keeps full access to the cluster until the certificate expires. A read-only user can also read `kube-system/cloudstack-secret`, which holds the cluster's CloudStack API key. ### Proposal Give each caller a kubeconfig of their own: - a client certificate for a Kubernetes user named after their CloudStack user, signed by the cluster CA - valid for a short time (hours, configurable) - with rights that match their CloudStack role: cluster-admin for callers who may change the cluster, read-only for the others Keep the current behaviour behind a setting, as tools store the admin kubeconfig today. ### Versions CloudStack `main` (24.0.0-SNAPSHOT), KVM, any network type. 4.22 behaves the same. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
