fix: use TLS protocol alias to enable TLS 1.3 negotiation#77
Merged
Conversation
0527147 to
508089b
Compare
508089b to
b54de53
Compare
Author
|
The test failure in master branch just seems like a container spawn flakey issue, @henryx |
Collaborator
|
Yes, Testcontainers initialization works correctly with Vault 1.x and fails with Vault 2.x, and for this reason I've ignored it for now. In my opinion is not a problem for the purpose of the PR, so I've preferred to merge it and check lately the reason why Vault 2.x doesn't work |
Author
|
Would a release be possible? @henryx 🙏 🙇 |
Collaborator
|
Release published 😉 |
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.
Problem
SSLContext.getInstance("TLSv1.2")hard-caps TLS negotiation at 1.2. Connections to Vault servers withtls_min_version = "tls13"fail:fixes #76
Fix
Replace
"TLSv1.2"→"TLSv1.3"in three places:rest/Rest.javaDISABLED_SSL_CONTEXTstatic initializerSslConfig.javabuildSslContextFromJks()SslConfig.javabuildSslContextFromPem()SSLContext.getInstance("TLSv1.3")on Java 11+ (SunJSSE) enables[TLSv1.3, TLSv1.2]by default, which also drops the insecure TLS 1.0/1.1 protocols that"TLS"would otherwise include.Test
Added
testSslContextFromPemSupportsTls13toSSLTestsasserting thatSslConfigbuilt with a PEM cert produces anSSLContextsupporting both TLSv1.2 and TLSv1.3.