Add TLS compatibility mode configuration for HTTP senders#8599
Conversation
Add a TLS compatibility mode option to HttpSenderConfig and expose it through OTLP HTTP exporter configuration. Implement support in the OkHttp sender by allowing compatible TLS negotiation for legacy TLS servers while keeping modern TLS as the default. Add tests covering modern TLS failure and compatible TLS success against a legacy TLSv1/TLSv1.1-only server.
|
|
|
Replace runtime TLS security property mutations with a `java.security.properties` override for `OkHttpHttpSenderTlsCompatibilityTest`. Applying the configuration at JVM bootstrap avoids test-order dependencies caused by JDK caching of TLS security properties and allows removal of `@Isolated` and runtime property manipulation logic.
|
Hey I gave this issue some thought and shared my analysis here: #7573 (comment) I think we should go in a different direction with this: #8610, which embodies option d in the comment. |
Pull request dashboard statusStatus last refreshed: 2026-07-23 09:14:30 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. If you believe this pull request is incorrectly routed as waiting on the author, comment |
Summary
Adds support for configuring TLS compatibility mode for HTTP senders (OkHttp only for now), allowing clients to optionally connect to endpoints that require legacy TLS protocol versions.
Fixes #7573
Motivation
Some users running on legacy environments, may be unable to connect to endpoints that only support older TLS protocol versions. The current HTTP sender configuration only supports modern TLS negotiation, preventing connections to these legacy endpoints.
Changes
Added
TlsCompatibilityModeconfiguration toHttpSenderConfigwithMODERNas the default behaviorAdded
HttpExporterBuilder.setTlsCompatibilityMode(TlsCompatibilityMode)to allow OTLP HTTP exporters to configure TLS compatibility behaviorUpdated
ImmutableHttpSenderConfigto carry the TLS compatibility mode configurationUpdated
OkHttpHttpSenderto mapTlsCompatibilityMode.COMPATIBLEto OkHttp'sConnectionSpec.COMPATIBLE_TLSKept existing behavior unchanged by defaulting all senders to modern TLS configuration
Added
TlsCompatibilityModeas a public API for implementation-neutral TLS compatibility configurationUpdated public API diff documentation with the new configuration method and enum
Testing
Added
OkHttpHttpSenderTlsCompatibilityTestVerified
MODERNmode cannot connect to a server restricted to TLSv1/TLSv1.1 protocolsVerified
COMPATIBLEmode can negotiate a connection with a legacy TLS-only server