Skip to content

fix(gateway-interceptors): apply tls-native-roots for HTTPS interceptor endpoints - #2666

Merged
drew merged 2 commits into
NVIDIA:mainfrom
sauagarwa:fix/interceptor-tls-native-roots
Aug 10, 2026
Merged

fix(gateway-interceptors): apply tls-native-roots for HTTPS interceptor endpoints#2666
drew merged 2 commits into
NVIDIA:mainfrom
sauagarwa:fix/interceptor-tls-native-roots

Conversation

@sauagarwa

@sauagarwa sauagarwa commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Endpoint::connect() in connect_endpoint() does not apply TLS configuration for https:// interceptor endpoints. Even though the crate enables tls-native-roots, ClientTlsConfig::new() defaults to with_native_roots: false — the feature makes the method available but does not activate it automatically. This prevents gateway interceptors from being deployed as external HTTPS services.

Changes

  • Add explicit .tls_config(ClientTlsConfig::new().with_enabled_roots()) when the endpoint URL starts with https://
  • Import ClientTlsConfig from tonic::transport
  • with_enabled_roots() activates all TLS root certificate sources enabled via feature flags (tls-native-roots, tls-webpki-roots)

Testing

Tested with a governance interceptor deployed as a Kubernetes pod with TLS (envoy sidecar + OpenShift serving cert), exposed via an OpenShift Route (re-encrypt). Before this fix, the gateway fails with transport error. After, it connects and initializes interceptor bindings successfully.

Fixes #2665

@copy-pr-bot

copy-pr-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@sauagarwa
sauagarwa marked this pull request as draft August 9, 2026 22:13
…or endpoints

Endpoint::connect() does not apply TLS configuration automatically
for https:// URLs even with tls-native-roots feature enabled. Add
explicit .tls_config(ClientTlsConfig::new()) when the endpoint uses
HTTPS so tonic uses the system's native root certificate store.

Fixes NVIDIA#2665
@sauagarwa
sauagarwa force-pushed the fix/interceptor-tls-native-roots branch from 3a40194 to 7079d1e Compare August 9, 2026 22:45
@sauagarwa
sauagarwa marked this pull request as ready for review August 9, 2026 22:59
@drew drew self-assigned this Aug 10, 2026
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew

drew commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

/ok to test 866031c

@drew
drew enabled auto-merge August 10, 2026 02:41
@drew
drew added this pull request to the merge queue Aug 10, 2026
Merged via the queue into NVIDIA:main with commit f48b05e Aug 10, 2026
33 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.

bug(gateway-interceptors): HTTPS interceptor endpoint fails — tls-native-roots not applied without explicit tls_config()

2 participants