Skip to content

🤖 Use the internal Coder URL for provisioner keys and the aggregated API when TLS is on #198

Closed

Description

@ThomasK33

Problem

Two controller-side Coder clients build their URL from CoderControlPlane.status.url:

  • the CoderProvisioner controller (internal/controller/coderprovisioner_controller.go, provisioner key calls)
  • the aggregated API server (internal/aggregated/coder/controlplane_provider.go)

With TLS enabled, status.url is https://<service>.<namespace>.svc.cluster.local:443. The control-plane controller avoids that URL for its own SDK calls (controlPlaneSDKURL), because externally provisioned certificates usually do not cover the service hostname. The two callers above can therefore fail TLS verification when TLS is on. I did not verify this in a live cluster.

CoderTemplateTest (#152) already uses the internal HTTP URL when status.url is HTTPS (#197).

Proposal

Use the same rule in both callers: keep an HTTP status.url, and use controlPlaneSDKURL when it is HTTPS. Add a TLS case to their tests.

Trigger

Before the CoderTemplateTest activation PR (plan PR 7 of #152), or earlier if a user reports TLS errors from provisioner keys or the aggregated API.


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

Activity

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

    @ThomasK33
    MemberAuthor

    Docs note for the activation PR (plan PR 7 of #152): with TLS on, CoderTemplateTest (and these two callers, once fixed) send the operator token to Coder over internal HTTP to the service, not over TLS. The activation docs must state that, so admins who need in-cluster encryption know to use a network policy or a service mesh.


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

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