Skip to content

Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184) - #190

Draft
petrsnd wants to merge 1 commit into
OneIdentity:mainfrom
petrsnd:danpeterson-tls-1-3-min-max-version
Draft

Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184)#190
petrsnd wants to merge 1 commit into
OneIdentity:mainfrom
petrsnd:danpeterson-tls-1-3-min-max-version

Conversation

@petrsnd

@petrsnd petrsnd commented Aug 14, 2026

Copy link
Copy Markdown
Member

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).

…#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
petrsnd requested a review from a team as a code owner August 14, 2026 01:20
@petrsnd
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);
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