Add configurable TLS min/max version with TLS 1.3 opt-in (#183, #184) - #190
Merged
petrsnd merged 5 commits intoSep 5, 2026
Merged
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
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
marked this pull request as ready for review
September 5, 2026 18:54
DanPeterson
approved these changes
Sep 5, 2026
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.