Skip to content

Least-privilege access to the aggregated API server serving-CA Secret #143

Description

@ThomasK33

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:

  1. The aggregated API server works with only the namespaced Role for this Secret, proven by an envtest or the Kind E2E.
  2. The controller-only bundle (dist/install.yaml) is unchanged, or its change is intentional and documented.
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions