davsclaus opened a new issue, #3402: URL: https://github.com/apache/camel-kamelets/issues/3402
Once apache/camel#31121 (CAMEL-27581) is released in Camel 4.25, `camel-kafka` and `camel-kafka-share` build their TLS connections from the complete `SSLContext` of Camel's `sslContextParameters`. Today they map only a subset of the parameters to Kafka `ssl.*` properties. A Kafka Kamelet can use this without a new Kamelet property, through the global SSL context: ```properties camel.ssl.enabled=true camel.ssl.trustStore=... camel.ssl.trustStorePassword=... camel.component.kafka.useGlobalSslContextParameters=true # kafka-share-source: camel.component.kafka-share.useGlobalSslContextParameters=true ``` This gives a Kamelet user: - the post-quantum hybrid key exchange to the broker (Camel's named-group preference, or explicit `namedGroups`); - one TLS configuration for the whole integration, such as a Kafka source and an `https` sink that share a trust store; - `classpath:` key and trust stores; - a new `SSLContext` on each reconnect, so a rotated certificate is picked up. We do not plan to add an `sslContextParameters` property to the Kamelets: it takes a bean reference, which does not fit how a Kamelet is configured. ## What to do Add a sentence to the "Good to know" of `kafka-source`, `kafka-sink`, `kafka-batch-source` and `kafka-share-source`, like the one `http-sink` has for `https`. It explains the application properties above and warns that: 1. With the global SSL context on, the Kamelet's own TLS options (`sslTruststoreLocation`, `sslTruststorePassword`, `sslKeystoreLocation`, `sslKeystorePassword`, `sslKeyPassword`) are ignored, and Camel logs a WARN. 2. The setting applies to every Kafka endpoint of the application, not only to one Kamelet. 3. `saslAuthType: NONE` then connects with TLS: `KafkaClientConfiguration.applyAuthTypeConfiguration` turns TLS on for `NONE` when `sslContextParameters` is set. This is the existing behaviour, not new in CAMEL-27581. The sentence "`NONE` connects with no login and no TLS" needs a qualification such as "unless the global SSL context is enabled for Kafka". ## When Only after apache/camel#31121 is merged, and only for the Kamelets that ship with Camel 4.25 or later. On 4.24 and older the global context still goes through the partial mapping: named groups and the post-quantum preference are not applied, and the Kamelet's `ssl*` options take precedence over it. So the Kamelets for those versions should not advertise it. _Claude Code on behalf of davsclaus._ -- 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]
