Skip to content

🤖 Verified in-cluster HTTPS for operator calls to Coder #275

Closed

Description

@ThomasK33

Follow-up to #198 / #273 (security review thread on internal/controlplaneurl/controlplaneurl.go, declined in round 1).

Current design: with built-in TLS (spec.tls.secretNames), every operator component sends the operator token to Coder over the plain HTTP URL of the control plane Service:

docs/how-to/deploy-controller.md ("Where the operator token goes") documents this and points to a service mesh and a NetworkPolicy.

Why not HTTPS today: status.url is https://<control plane>.<namespace>.svc.cluster.local:443. The operator image (gcr.io/distroless/static) trusts only public roots. Public CAs do not issue certificates for .cluster.local, and the repo has no setting for an extra CA bundle or a server name. A fallback from HTTPS to HTTP on a certificate error would give no protection against an attacker who can redirect traffic.

Possible feature: verified in-cluster HTTPS for all four callers, for example with a CA bundle reference and a ServerName option on CoderControlPlane. Add a Kind E2E case with built-in TLS on, because CI never exercises TLS today.

Revisit when: a user asks for in-cluster encryption of operator calls without a service mesh.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. ThomasK33 commented on Oct 13, 2026

    @ThomasK33
    MemberAuthor

    Maintainer decision on the declined security P2 in #273 (operator token over in-cluster HTTP when TLS is on): merge #273 as is, and track verified in-cluster HTTPS here.

    Reasons, checked by an independent final assessment:

    1. On main, these callers cannot verify HTTPS to status.url. The operator image (gcr.io/distroless/static:nonroot) has only public roots, the repo has no CA or ServerName setting, and status.url is always https://<cp>.<ns>.svc.cluster.local:443 with TLS on.
    2. The control-plane controller (license, entitlements) and CoderTemplateTest already send the same token over in-cluster HTTP.

    Related: #236 (the aggregated API, license and CoderTemplateTest clients lack the same-origin redirect check). Both should land before the first AI CRD activation.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium

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

Metadata

Metadata

Assignees

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