Commit db60f92
fix: use CA certificate from mTLS secret for server verification (#212)
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.
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR!
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->
<!--- For ALL Contributors 👇 -->
## What was changed
<!-- Describe what has changed in this PR -->
## Why?
<!-- Tell your future self why have you made these changes -->
## Checklist
<!--- add/delete as needed --->
1. Closes <!-- add issue number here -->
Closes #158
3. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->
4. Any docs updates needed?
<!--- update README if applicable
or point out where to update docs.temporal.io -->
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 03fb38a commit db60f92
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
| |||
0 commit comments