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 statusWaiting on the author · refreshed 2026-07-29 18:23 UTC Respond to 1 review item (e.g. link a commit, explain why not, ask a follow-up):
Status above doesn't look right?
|
|
Hi @adhamahmad — just a friendly reminder that this pull request has been waiting on you for a week. There are still items that need your attention. See the dashboard status comment for the full list. You don't need to push a code change to hand it back — replying to move each discussion forward is enough, whether that's answering a question, explaining why no change is needed, or asking a follow-up. The dashboard then automatically routes it back to reviewers. 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