temporalio / temporalio/temporal

Client TLS configs do not pick up refreshed root CAs

Open
#11,230 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Expected Behavior

When the local-store certificate provider reloads a changed client root CA bundle, new TLS connections should verify servers using the refreshed root pool without requiring a process restart or recreating the client TLS configuration. Existing established connections should remain unaffected.

Actual Behavior

The local-store provider reloads CA files in the background, but newClientTLSConfig stores the initial RootCAs pool in a long-lived tls.Config. New handshakes therefore continue using the old roots after a refresh.

Additionally, the provider only parses the first certificate from each PEM file for change detection. During a staged rotation from old CA to old CA + new CA, the parsed certificate set appears unchanged and the cached pool is not replaced.

Steps to Reproduce the Problem

  1. Configure local-store client TLS with a root CA file and enable host verification.
  2. Create a client TLS configuration and successfully connect to a server signed by the original CA.
  3. Replace the CA bundle with a new CA, wait for the configured TLS refresh interval, and connect to a server signed by the new CA using the same client configuration.
  4. Observe that verification still uses the original root pool until the client configuration or process is recreated.

Specifications

  • Version: current main
  • Platform: all deployments using the local-store TLS provider

Proposed direction

Resolve the provider’s cached root pool for each new handshake while retaining file reads on the existing background refresh path. Parse all certificates from PEM bundles so overlapping CA rotations are detected. This should not reset existing connections or add filesystem I/O to connection establishment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at newClientTLSConfig and trace the local-store provider's background refresh path. Verify how refreshed root pools are selected for new handshakes and how PEM certificates are parsed during change detection. Done means new connections use refreshed roots, staged rotations are detected, existing connections remain unaffected, and connection establishment adds no filesystem I/O.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.