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

   # Description
   
   Fixes [CAMEL-27100](https://issues.apache.org/jira/browse/CAMEL-27100), a 
follow-up of CAMEL-26279 (#29210).
   
   `ConjurClientFactory.createSslContext` read the `certificatePath` option 
with `Files.newInputStream(Path.of(...))`, so it only took a file system path.
   
   It now resolves the option with `ResourceHelper` when it has the 
`classpath:` or `file:` prefix:
   - a path without a prefix is still read from the file system, so existing 
configurations keep working
   - other prefixes, such as `http:`, are rejected with an 
`IllegalArgumentException`, as the certificates to trust should not come from 
the network
   - a Windows path such as `C:\certs\ca.pem` is still a file system path (a 
prefix has at least two letters)
   
   `createSslContext` takes the `CamelContext` as a new first parameter, which 
the endpoint and the properties function pass in. The same prefixes therefore 
also work for `camel.vault.cyberark.certificatePath`.
   
   Tests in `CyberArkVaultSslTest`, against its HTTPS server: a certificate 
with the `classpath:` prefix, one with the `file:` prefix, and an `http:` path 
that fails at start. The existing test with a plain path still passes. The 
option description (and the generated JSON, catalog and DSL) documents the 
prefixes.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   https://issues.apache.org/jira/browse/CAMEL-27100
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] This PR was prepared with the help of Claude (Anthropic), credited 
with a `Co-authored-by` trailer in the commit.


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