Skip to content

backend tls: support config dump#2053

Merged
howardjohn merged 1 commit into
agentgateway:mainfrom
howardjohn:btls/debug-cd-dump
Jun 4, 2026
Merged

backend tls: support config dump#2053
howardjohn merged 1 commit into
agentgateway:mainfrom
howardjohn:btls/debug-cd-dump

Conversation

@howardjohn
Copy link
Copy Markdown
Collaborator

Signed-off-by: John Howard john.howard@solo.io

Copilot AI review requested due to automatic review settings June 3, 2026 21:43
@howardjohn howardjohn requested a review from a team as a code owner June 3, 2026 21:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BackendTLSInfo and store it on BackendTLS, then serialize BackendTLS via this metadata.
  • Populate BackendTLSInfo from ResolvedBackendTLS during conversion, including PEM text for cert/root when present.
  • Populate BackendTLSInfo for 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<_>, _>>()?;
@howardjohn howardjohn force-pushed the btls/debug-cd-dump branch from 6048115 to 822f4be Compare June 4, 2026 17:23
Signed-off-by: John Howard <john.howard@solo.io>
@howardjohn howardjohn force-pushed the btls/debug-cd-dump branch from 822f4be to c81ee95 Compare June 4, 2026 17:29
@howardjohn howardjohn merged commit 2e35a50 into agentgateway:main Jun 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants