davsclaus opened a new pull request, #30350: URL: https://github.com/apache/camel/pull/30350
[CAMEL-27207](https://issues.apache.org/jira/browse/CAMEL-27207), [CAMEL-27196](https://issues.apache.org/jira/browse/CAMEL-27196) When `PulsarEndpoint` creates its own Pulsar client, it set only the service URL and the authentication. So a `pulsar+ssl://` connection kept the default of the Pulsar client, which does not check that the certificate of the broker was issued for the host it connects to, and a broker whose certificate is signed by a private CA could only be used with a `pulsarClient` bean or a JVM-wide trust store. ## Changes - New `hostnameVerification` option (default `true`, marked `insecure:ssl` when `false`), passed to `ClientBuilder.enableTlsHostnameVerification`, as camel-smpp, camel-mina, camel-mllp and camel-nats have it. - New `tlsTrustCertsFilePath` option (CAMEL-27196): a PEM file with the certificates of the certificate authorities to trust, passed to `ClientBuilder.tlsTrustCertsFilePath` only when set. - Neither applies when a `pulsarClient` is given. - Upgrade guide entry for 4.24 (also mentions brokers returned by a lookup, through their advertised listeners). ## Tests - `PulsarHostnameVerificationTest`: connects with `pulsar+ssl://localhost` to a local TLS server; with a certificate for another name the handshake fails, with the certificate for `localhost` it succeeds, and `hostnameVerification=false` accepts the other name. (In pulsar-client 4.2.4 the check runs in the `SSLEngine` against `InetSocketAddress.getHostName()`, so an IP address of the loopback reverse-resolves to `localhost`; the test uses a second certificate instead.) - The camel-pulsar unit tests pass (1062). _Claude Code on behalf of Claus Ibsen_ 🤖 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]
