Repository navigation
Conversation
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.
Summary
This PR mainly fixes
SslConfigstates that silently disabled SSL certificate verification. It alsoreuses one HTTP client per
VaultConfig, makes environment-variable handling stricter, and fixesseveral smaller bugs. This PR fixes CVE-2026-109408
Security: SSL verification now fails closed
Before this change,
SslConfig.isVerify()could returnfalsewhen the caller hadn't asked forthat.
Restthen used a context that trusts every certificate, so chain and hostname checks wereboth skipped with no error or log. This affected every release that has
SslConfig(3.0.0 to6.2.3).
SslConfigpassed toVaultConfigwithout callingbuild()VaultConfig.build()builds it; verification onSslConfigrestored by Java deserializationdefaultReadObject()); verification on unlessverify(false)was setVAULT_SSL_VERIFY=1,t,yes,onor a typoDetails:
verifydefaults totrue, and an explicitverify(Boolean)takes priority even whenbuild()hasn't run.
readObjectkeeps verification on for data saved by older releases or by never-built instances,since that data can carry a
falsenobody asked for.EnvironmentLoaderdeclares theserialVersionUIDthat 6.2.3 data carries, so configsserialized by 6.2.3 still deserialize.
verify(false)andVAULT_SSL_VERIFY=false, still work, with or withoutbuild().Other changes
VaultConfigkeeps oneHttpClientand rebuilds it when the SSLsettings or timeout change.
getHttpClient()returns the client in use instead ofnull. Aconfig with a custom client can be serialized; the client itself is not.
VAULT_TOKENand.vault-tokenare not read when a token is set in code.0means no timeout again, as before 6.0.0. Negative values are rejected bybuild(); negative values from environment variables are ignored with a warning.interrupt stops retrying.
byte-for-byte, so binary content is no longer corrupted.
nullJSON fields.VaultConfig.address(null)falls back toVAULT_ADDR.Vault.create(config, null)throwsIllegalArgumentException. When no KV engine version is set, version 2 is used.java.util.logginginstead of stderr.@Deprecated, so callers geta compiler warning:
Vault.leases(),mounts()andseal()(and theirVaultImploverrides), plus
Auth.lookupWrap(),unwrap(),wrap()andrewrap(). Use theSysequivalents, e.g.
vault.sys().leases()andvault.sys().wrapping().Auth.loginByAppID()gains a
@deprecatedJavadoc tag pointing tologinByAppRole().Leases,MountsandWrappingexamples use thesys()calls insteadof the deprecated ones. The
Wrappingexamples also usednew Vault(config)(an interface) anda misspelled
lookupWarp(), and one referred to an undefined variable; all are fixed.violations, CI test reports are fixed, and the Travis config is removed. The CI matrix drops
Vault 1.8.12–1.15.6 and adds 2.1.0–2.1.2, so it now tests Vault 1.16.3 to 2.1.2 and
latest.Breaking or behaviour changes
VAULT_SSL_VERIFY=0,nooroffnow keep verification on. Usefalseto disable it.Logical.getEngineVersionForSecretPath()returns2instead ofnullwhen no version is set.VaultConfig.nameSpace()no longer throws; an empty namespace is rejected bybuild().getSecretsEnginePathMap()returns an unmodifiable map.VAULT_SSL_VERIFY=falsecomes back withverification on.
them (the App ID integration test and its setup, and the pre-1.13 PKI status-code branches) is
marked as deprecated.
@Deprecatednow produce compiler warnings.Known limitations (documented in the README)
SslConfigchecks the serveragainst the JVM's default CAs, so it still verifies but loses the pinned CA.
build()only apply oncebuild()is called again.Tests
SslConfigSerializationTests: round-trips ofSslConfigandVaultConfig, data saved bynever-built instances, and fixtures written by release 6.2.3
(
src/test/resources/serialized-6.2.3/).VaultConfigTests(environment variables,VAULT_SSL_VERIFYparsing, timeouts)plus tests for retries, response bodies and null handling.
Thanks
Special thanks to Echo to help to find this problem