Repository navigation
Support multiple TLS verification server names - #2103
Open
robzienert wants to merge 3 commits into
Open
robzienert wants to merge 3 commits into
robzienert wants to merge 3 commits into
Conversation
|
|
robzienert
marked this pull request as ready for review
November 9, 2026 02:25
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
tconley1428
reviewed
Nov 9, 2026
TLSConfig.verification_server_name now also accepts a sequence of names. The bridge verifier accepts a server certificate that is valid for any one of the names. This supports targets where one address can route to servers that present different certificate names, such as regional servers behind a global address. A single string keeps its behavior and maps to a one-item list in the bridge. A string is checked before the sequence case, because a str is also a Sequence[str]. An empty sequence is rejected.
robzienert
force-pushed
the
tls-verification-server-names
branch
from
November 9, 2026 16:58
335d148 to
669b108
Compare
tconley1428
reviewed
Nov 9, 2026
tconley1428
approved these changes
Nov 12, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the change
TLSConfig.verification_server_nameaccepts one name. Some deployments have one address that can route to servers with different certificate names, for example regional servers behind a global DNS name where each server's certificate names only its own region. These clients cannot verify the server today, and this change lets them.Special things to note
verification_server_namenow acceptsstr | Sequence[str]. A single string behaves the same as before. The bridge always receives a list, and a single string becomes a one-item list.stris checked before the sequence case, because astris also aSequence[str]and would otherwise be read as one-character names.Change outline
Widened public option on
TLSConfig:@dataclass class TLSConfig: server_root_ca_cert: bytes | None = None domain: str | None = None client_cert: bytes | None = None client_private_key: bytes | None = None - verification_server_name: str | None = None + verification_server_name: str | Sequence[str] | None = NoneBridge contract (
ClientTlsConfig, Python and Rust):Verifier behavior (
FixedServerNameVerifierintemporalio/bridge/src/client.rs):Testing
tests/test_tls.py: new tests for the bridge mapping of a sequence, rejection of an empty sequence, a handshake that matches only the second name, a handshake where no name matches, and the root CA requirement. The existing single-name tests still pass.test_tls_verification_server_name_sequence_accepts_any_matching_name. A mutant that removes thestrcheck fails 3 tests.cargo clippy -- -D warnings,cargo fmt,ruff,pyrightandmypypass on the changed files.TLSConfigwith the four regional names connected and returnedGetSystemInfothrough the global address and through each of the four regional addresses.