Skip to content

fix: use CA certificate from mTLS secret for server verification#212

Merged
carlydf merged 1 commit intomainfrom
fix/mtls-root-ca-support
Feb 27, 2026
Merged

fix: use CA certificate from mTLS secret for server verification#212
carlydf merged 1 commit intomainfrom
fix/mtls-root-ca-support

Conversation

@Shivs11
Copy link
Member

@Shivs11 Shivs11 commented Feb 27, 2026

When connecting to a Temporal server via mTLS, the controller reads tls.crt and tls.key from the referenced Kubernetes secret but does not read ca.crt. This causes the controller to fall back to the system CA bundle for server certificate verification, which fails when the server's TLS certificate is signed by a private or internal CA (e.g. cert-manager in a self-hosted cluster).

This change reads ca.crt from the mTLS secret (when present) and uses it as the trusted root CA pool for server certificate verification. This is fully backward compatible. Secrets created by cert-manager automatically include ca.crt. Temporal Cloud users are unaffected since their server certs are signed by public CAs already in the system bundle.

What was changed

Why?

Checklist

  1. Closes
    Closes [Feature Request] Support configuring mTLS trust roots #158

  2. How was this tested:

  1. Any docs updates needed?

When connecting to a Temporal server via mTLS, the controller reads tls.crt and
tls.key from the referenced Kubernetes secret but does not read ca.crt. This
causes the controller to fall back to the system CA bundle for server certificate
verification, which fails when the server's TLS certificate is signed by a private
or internal CA (e.g. cert-manager in a self-hosted cluster).

This change reads ca.crt from the mTLS secret (when present) and uses it as
the trusted root CA pool for server certificate verification. This is fully
backward compatible. Secrets created by cert-manager automatically include
ca.crt. Temporal Cloud users are unaffected since their server certs are signed
by public CAs already in the system bundle.

Closes #158

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Shivs11 Shivs11 marked this pull request as ready for review February 27, 2026 02:34
@Shivs11 Shivs11 requested review from a team and jlegrone as code owners February 27, 2026 02:34
@carlydf carlydf merged commit 3d0ecf2 into main Feb 27, 2026
14 checks passed
@carlydf carlydf deleted the fix/mtls-root-ca-support branch February 27, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support configuring mTLS trust roots

2 participants