Repository navigation
CAMEL-27024: camel-spring-boot - the early resolution stops its properties function, which closes the vault client - #2113
Merged
Croway merged 1 commit intoNov 18, 2026
Conversation
…rties function, which closes the vault client The early resolution of vault properties creates a client that nothing closed once the properties were resolved: the SecretsManagerClient of AWS Secrets Manager, the SecretManagerServiceClient of Google Secret Manager and the ConjurClient of CyberArk stayed open for the life of the application. AbstractEarlyResolutionPropertiesParser.release, called once the properties are resolved (also when they could not be), now stops the properties function by default when it is a Camel Service. The functions of the Camel vaults close their client when they stop, also when they were never started. The HashiCorp Vault parser no longer overrides release, since the default does the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Croway
approved these changes
Nov 18, 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.
Summary
CAMEL-27024: the early resolution of vault properties of Camel on Spring Boot (
camel.component.<vault>.early-resolve-properties=true) creates a client increatePropertiesFunction, and nothing closed it once the properties were resolved. Each of these stayed open for the life of the application, although the early resolution uses it only at startup:SecretsManagerClient, with its HTTP connection pool;SecretManagerServiceClient, with its gRPC channel and threads;ConjurClient.CAMEL-26919 (#2091) added a
release(PropertiesFunction)hook toAbstractEarlyResolutionPropertiesParser. The base class calls it once the properties are resolved, also when they could not be, but so far only the HashiCorp Vault parser overrode it. Its default now stops the function when it is a CamelService:doStop()closes their client:SecretClientcannot be closed), IBM Secrets Manager (the IBM SDK shares its HTTP client) and Spring Cloud Config (no client) have nothing to close, so stopping them is harmless.doStop()also when it was never started, as here.camel.vault.aws.defaultCredentialsProvider, the SDK (2.57) builds its ownDefaultCredentialsProviderinstance, not the JVM-wide singleton of CAMEL-26367. The parser creates the static and profile providers itself.release, since the default does the same.releaseto do nothing.The hook is new in 4.24.0, so changing its default affects no released version.
Tests
AbstractEarlyResolutionPropertiesParserTest: by default, a function that is a Camel service is stopped once the properties are resolved, and also when the resolution fails. A function that is not a service is resolved as before.EarlyResolvedPropertiesAppRoleTest(Vault container) still checks that the token of the AppRole login is revoked once the properties are resolved, now through the defaultrelease.core/camel-spring-bootand the seven vault starters against the published 4.24.0-SNAPSHOT. All 20 tests ofAbstractEarlyResolutionPropertiesParserTestpass, and so do the tests of the starters: HashiCorp Vault 13, AWS Secrets Manager 2, Google Secret Manager 3, CyberArk 2, Azure Key Vault 2, IBM Secrets Manager 2 and Spring Cloud Config 3. TheEarlyResolvedPropertiesTestof AWS, Google, CyberArk, Azure and IBM is skipped without cloud credentials, as on main.EarlyResolvedPropertiesAppRoleTestfails on the revocation of the token.Suggested by Croway in the review of #2091.
Claude Code on behalf of oscerd
🤖 Generated with Claude Code