oscerd opened a new pull request, #31182:
URL: https://github.com/apache/camel/pull/31182

   ## Summary
   
   [CAMEL-27916](https://issues.apache.org/jira/browse/CAMEL-27916), the first 
of the three follow-ups of 
[CAMEL-25675](https://issues.apache.org/jira/browse/CAMEL-25675): davsclaus 
asked in the review of #29619 whether the hashicorp-vault endpoint should also 
accept `sslContextParameters`, as most components do.
   
   - **`sslContextParameters` endpoint option** (the [Camel JSSE Configuration 
Utility](https://camel.apache.org/manual/camel-configuration-utilities.html)), 
instead of `trustStore` and `keyStore`: its trust managers verify the 
certificate of Vault, and its key managers give the client certificate. The 
`cert` login accepts the key managers of `sslContextParameters` as the client 
certificate.
   - **`useGlobalSslContextParameters`**: the component is now 
`SSLContextParametersAware`. An endpoint that sets neither 
`sslContextParameters` nor `trustStore` and `keyStore` takes the global 
`SSLContextParameters` of the CamelContext (`camel.ssl`).
   - **Fail fast**: an endpoint that sets both `sslContextParameters` and 
`trustStore` or `keyStore` fails to start, naming both, so that a half-applied 
TLS configuration cannot go unnoticed.
   - **The properties function and the secret refresh task** keep `trustStore` 
and `keyStore` only. camel-main binds `camel.ssl` after the `camel.vault` 
options, so an early `hashicorp:` placeholder would start them without it, as 
discussed in #29619.
   - The TLS section of the component documentation describes the new options.
   
   The other two follow-ups, CAMEL-27917 (reload the TLS stores when their 
files change) and CAMEL-27918 (the `gcp-iam` login), get their own PRs.
   
   ## Tests
   
   - `HashicorpVaultTlsTest`, against a fake Vault over HTTPS:
     - `trustsVaultWithSslContextParameters` and 
`certLoginPresentsTheClientCertificateOfSslContextParameters` (the key managers 
of a PKCS12 key store give the client certificate of the cert login);
     - `sslContextParametersCannotBeSetWithTheStores` (with `trustStore` or 
`keyStore`);
     - `anEndpointWithBothSslContextParametersAndATrustStoreFailsToStart`;
     - `anEndpointWithoutTlsOptionsTakesTheGlobalSslContextParameters` (reads a 
secret over HTTPS with the global ones, while an endpoint with a trust store of 
its own keeps it);
     - the cert login without a key store, or with `sslContextParameters` 
without key managers, is refused.
   - All 91 unit tests and all 38 integration tests of the module pass (Vault 
container, including `HashicorpVaultTlsIT` with `-dev-tls`). Full reactor build 
(`mvn clean install -DskipTests -DskipITs`): the catalog, the configurers and 
the component and endpoint DSLs are regenerated and committed.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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