The aggregated API server keeps its serving CA, including the CA private key, in the coder-k8s-apiserver-tls Secret in its own namespace (#140). Today it reads and writes that Secret through manager-role, which grants cluster-wide Secret access to the same ServiceAccount the controller uses.
Proposal: give the aggregated API server a namespaced Role that allows only get, create and update on the coder-k8s-apiserver-tls Secret (resourceNames; create cannot be limited by name, so it needs care). Consider running the aggregated API server under its own ServiceAccount so it does not inherit the controller's Secret access. That is where least privilege actually improves.
Acceptance:
- The aggregated API server works with only the namespaced Role for this Secret, proven by an envtest or the Kind E2E.
- The controller-only bundle (
dist/install.yaml) is unchanged, or its change is intentional and documented.
- The docs state which identity can read the CA key.
Owner: maintainer desk. Trigger: after #137 closes. Refs #137.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium
The aggregated API server keeps its serving CA, including the CA private key, in the
coder-k8s-apiserver-tlsSecret in its own namespace (#140). Today it reads and writes that Secret throughmanager-role, which grants cluster-wide Secret access to the same ServiceAccount the controller uses.Proposal: give the aggregated API server a namespaced Role that allows only
get,createandupdateon thecoder-k8s-apiserver-tlsSecret (resourceNames;createcannot be limited by name, so it needs care). Consider running the aggregated API server under its own ServiceAccount so it does not inherit the controller's Secret access. That is where least privilege actually improves.Acceptance:
dist/install.yaml) is unchanged, or its change is intentional and documented.Owner: maintainer desk. Trigger: after #137 closes. Refs #137.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:medium