Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184) - #190
Draft
petrsnd wants to merge 1 commit into
Draft
Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184)#190petrsnd wants to merge 1 commit into
petrsnd wants to merge 1 commit into
Conversation
…#183, OneIdentity#184) Replace the hard-pinned TLSv1.2 with an opt-in minimum/maximum TLS version bound, defaulting to TLS 1.2 only so existing certificate/A2A auth on the Standard binding keeps working. Java's JSSE cannot present a client certificate in response to a TLS 1.3 post-handshake CertificateRequest, so TLS 1.3 cert-auth is only possible via the appliance Cert SNI hostname. - Add TlsVersion enum and TlsConfiguration resolver (min/max bounds with safeguard.tls.min/maxVersion system-property fallback; default = TLSv1.2). - Expose Safeguard.setMin/MaxTlsVersion and getters. - Build a generic "TLS" SSLContext and constrain enabled versions at the socket layer in RestClient (base + cert clients), SafeguardEventListener (OkHttp ConnectionSpec), and PkceAuthenticator. Keep HTTP/1.1. - Update SSLContext tests to the new behavior; add TlsConfigurationTest. - Document the JSSE post-handshake limitation, the TLS 1.2 default, and the Cert SNI route in README, AGENTS.md, and the api-patterns/a2a-workflow skills. - Bump version to 8.4.0 (minor above latest tag v8.3.1).
petrsnd
marked this pull request as draft
August 14, 2026 01:21
| SSLConnectionSocketFactory sslsf = null; | ||
| if (ignoreSsl) { | ||
| sslsf = new SSLConnectionSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), NoopHostnameVerifier.INSTANCE); | ||
| sslsf = buildSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), NoopHostnameVerifier.INSTANCE); |
| sslsf = buildSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), NoopHostnameVerifier.INSTANCE); | ||
| } else if (validationCallback != null) { | ||
| sslsf = new SSLConnectionSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), validationCallback); | ||
| sslsf = buildSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), validationCallback); |
| sslsf = buildSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), validationCallback); | ||
| } else { | ||
| sslsf = new SSLConnectionSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext)); | ||
| sslsf = buildSocketFactory(getSSLContext(clientKs, keyPass, certificateAlias == null ? aliases.get(0) : certificateAlias, certificateContext), null); |
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.
Replace the hard-pinned TLSv1.2 with an opt-in minimum/maximum TLS version bound, defaulting to TLS 1.2 only so existing certificate/A2A auth on the Standard binding keeps working. Java's JSSE cannot present a client certificate in response to a TLS 1.3 post-handshake CertificateRequest, so TLS 1.3 cert-auth is only possible via the appliance Cert SNI hostname.