k-krawczyk opened a new pull request, #30765:
URL: https://github.com/apache/camel/pull/30765

   Documentation only, the same shape CAMEL-24639 used for camel-http. I looked 
into making `JmsComponent` implement `SecretRotationAware`, and the code shows 
there is nothing it can usefully do.
   
   What already works on a context reload:
   - `reloadAllRoutes` clears the endpoint registry, so JMS endpoints are 
created again with the newly resolved `username`/`password` from their URI.
   - On Camel Main, a `camel.component.jms.*` option with a placeholder gives a 
new component (`BaseMainSupport#doAutoConfigurationFromProperties`).
   - The adapter cache from CAMEL-26692 matches on the connection factory and 
the password as well as the username (`CredentialsConnectionFactory#isFor`), so 
a rotated password gets a new `UserCredentialsConnectionFactoryAdapter`. 
`JmsComponentCredentialsConnectionFactoryTest#newPasswordGivesANewConnectionFactory`
 covers this.
   
   Why there is no reset of the connection factory:
   - camel-jms never creates the `ConnectionFactory`. It is an application 
bean, and a reload leaves existing `camel.beans.*` beans alone (CAMEL-25767).
   - Spring's `SingleConnectionFactory`/`CachingConnectionFactory` rejects 
per-connection credentials, so `resetConnection()` would only reopen 
connections with the credentials of the factory it wraps. It would also run on 
every reload, whatever the reason, and drop connections that other code uses.
   - pooled-jms keys its pool by username and password, so credentials on the 
component or the endpoint already lead to new connections after a rotation.
   
   Change: a new "Rotated credentials" section in `jms-component.adoc` (and the 
catalog copy). It says exactly what is refreshed and what is not, and 
recommends putting rotating credentials on the component or the endpoints. The 
endpoint URI example uses `password=RAW({{aws:jms/password}})`: the placeholder 
is resolved before the URI is parsed, so a generated secret containing `+`, `&` 
or `%` would otherwise corrupt the password after a rotation.
   
   No upgrade guide entry, because behaviour does not change.
   
   _Reported by Claude Code on behalf of Karol Krawczyk_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to