Skip to content

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

Merged
petrsnd merged 5 commits into
OneIdentity:mainfrom
petrsnd:danpeterson-tls-1-3-min-max-version
Sep 5, 2026
Merged

Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184)#190
petrsnd merged 5 commits 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
Plumb --min-tls/--max-tls options through the safeguardjavaclient tester
and the PowerShell test framework so suites can pin the client TLS window.
Add a TLS Version Selection suite that validates client-side min>max
rejection and live negotiation, adapting to appliance capability (floor
TLS 1.3 connects on a 1.3 appliance, fails closed on a 1.2-only one).
Extend Certificate Authentication with a cert-auth-over-TLS-1.3 test that
runs against the appliance Cert SNI binding, gated on a -CertSniHost
parameter and a runtime 1.3 capability probe.

Bump the tester tool's safeguardjava dependency to 8.4.0-SNAPSHOT so it
links the in-tree SDK build (which carries the TLS API) rather than the
released 8.3.0 jar.
Reference the safeguardjava dependency by the CI-friendly ${revision}
property instead of a hardcoded version, and have the test harness read
the SDK pom's <revision> and pass it to the tester build (-Drevision), so
the tool always links exactly the SDK that was just built rather than
drifting when the SDK version bumps. A matching default keeps standalone
(mvn -f) builds working.

Normalize Suite-TlsVersion.ps1 to LF so it passes the repo editorconfig
check that runs during the SDK build.
Guard the key store alias fallback so aliases.get(0) is only used when the list loaded successfully, and null-check certificateContext before calling isWindowsKeyStore() in getSSLContext (it is null on the non-certificate TLS path). Resolves CodeQL java/dereferenced-value-may-be-null warnings.
@petrsnd
petrsnd marked this pull request as ready for review September 5, 2026 18:54
@petrsnd
petrsnd merged commit 064b5ed into OneIdentity:main Sep 5, 2026
4 checks passed
@petrsnd
petrsnd deleted the danpeterson-tls-1-3-min-max-version branch September 5, 2026 18:55
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.

3 participants