feat(tonic-xds): gRFC A29 data-plane TLS connector wiring#2640
Open
YutaoMa wants to merge 6 commits into
Open
Conversation
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.
Motivation
Ref: #2444
Closes out gRFC A29 (xDS-Based TLS Security) in
tonic-xds. The cert provider foundation merged in #2593 and #2616 left the connector integration deferred — its pre-reqEndpoint::tls_config_with_verifierlanded in #2612.With that hook available, this PR wires up the per-cluster TLS connector.
Solution
Five commits, each independently reviewable:
file_watcherbackground refresh.Connectoron CDS update. Existing endpoint channels keep their connector; new connections pick up the latest. Invalid CDS updates are logged and the previous-good connector is kept.TlsConnector— for clusters withSome(security), the connector holds the A29 verifier plus an optional identity provider (mTLS).connect()fetches identity per call, assembles aClientTlsConfig, and builds the endpoint.Tests
Sync
refresh_oncetests infile_watcher, synthetic-cert chain tests for SAN matching,build_connectordispatch tests, and a counter-based test asserting identity is fetched perconnect(). Existingchannel.rsintegration tests exercise the cluster-aware discovery path end-to-end on the plaintext.Interop validation
End-to-end mTLS against Istio (Kind +
grpc-agenttemplate + SPIFFE creds)in YutaoMa/tonic-xds-istio-interop@tonic-pr-2640:
Confirmed successful run with logs
request ok request_num=1 … Nshown below. The harness uncovered thetwo parser-interop bugs fixed in
66d77c5a.