bhouse-nexthop opened a new issue, #14909:
URL: https://github.com/apache/cloudstack/issues/14909

   ### Problem
   
   Every CKS cluster of an account or project uses the same API key pair:
   
   | Owner | Key pair the cluster gets |
   |---|---|
   | Account | The latest key pair of the user `<account>-kubeadmin`, inside 
the owner's account, so with all the owner's rights |
   | Project | The latest key pair of the project's service account 
`kubeadmin-<project>`, with the "Project Kubernetes Service Role" |
   
   The key pair is stored in `kube-system/cloudstack-secret` of every cluster 
of that owner and is never rotated. So:
   
   - Anyone who can read secrets in `kube-system` of one cluster can change the 
load balancer, firewall and network ACL rules of every other cluster of the 
same owner, take public IPs, and scale those clusters. For an account-owned 
cluster, they get all the rights of the owner.
   - The keys reach the control node on the SSH command line 
(`deploy-cloudstack-secret -k <api key> -s <secret key>`), visible in the 
process list, and are written to `/tmp/cloud-config`.
   - `deploy-cloudstack-secret` creates the secret only if it does not exist, 
so the keys cannot be replaced.
   
   Key pairs with their own rules exist on `main` since #9504, but CKS does not 
use them.
   
   ### Expected
   
   - Each cluster has its own key pair, limited to the APIs that its CloudStack 
components call: the CloudStack Kubernetes provider (cloud controller manager), 
the cluster autoscaler, and the CloudStack CSI driver when the cluster has CSI 
enabled.
   - The keys never go on a command line.
   - An API to replace a cluster's key pair, and deleting the cluster deletes 
its key pair.
   
   ### Versions
   
   `main` (24.0.0), KVM; any hypervisor and storage.
   


-- 
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]

  • [I] CKS: all clusters of an a... bhouse-nexthop (via GitHub) via commits

Reply via email to