backend tls: support config dump#2053
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds config-dump support for backend TLS by attaching a serializable “metadata” representation to BackendTLS and using it as the Serialize output, allowing resolved TLS settings (e.g., roots/certs/hostname/ALPN) to be surfaced for debugging/inspection.
Changes:
- Add
BackendTLSInfoand store it onBackendTLS, then serializeBackendTLSvia this metadata. - Populate
BackendTLSInfofromResolvedBackendTLSduring conversion, including PEM text for cert/root when present. - Populate
BackendTLSInfofor the control-plane gRPC client TLS config (RootCert::to_client_config).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/agentgateway/src/http/backendtls.rs | Adds BackendTLSInfo, stores it on BackendTLS, and switches BackendTLS serialization to emit config-dump-friendly metadata. |
| crates/agentgateway/src/control/mod.rs | Starts populating BackendTLSInfo metadata when building the xDS client TLS config from a root cert. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+220
to
222
| let (valid, invalid) = roots.add_parsable_certificates(certs); | ||
| trace!(valid, invalid, "added root certificates") | ||
| } else { |
Comment on lines
41
to
43
| let certfile = tokio::fs::read(f).await?; | ||
| metadata.root = Some(String::from_utf8_lossy(&certfile).into_owned()); | ||
| let certs = CertificateDer::pem_slice_iter(&certfile).collect::<Result<Vec<_>, _>>()?; |
Comment on lines
48
to
50
| RootCert::Static(b) => { | ||
| metadata.root = Some(String::from_utf8_lossy(b).into_owned()); | ||
| let certs = CertificateDer::pem_slice_iter(b).collect::<Result<Vec<_>, _>>()?; |
6048115 to
822f4be
Compare
Signed-off-by: John Howard <john.howard@solo.io>
822f4be to
c81ee95
Compare
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.
Signed-off-by: John Howard john.howard@solo.io