davsclaus opened a new pull request, #30362: URL: https://github.com/apache/camel/pull/30362
[CAMEL-27218](https://issues.apache.org/jira/browse/CAMEL-27218) ## What changed - `MongoDbEndpoint` builds the client it creates from `hosts` or `connectionUriString` with `MongoClientSettings`: first the connection string, then the TLS options of the endpoint. - `tls` or `sslContextParameters` turns TLS on. - The SSL context comes from `sslContextParameters`. - `tlsAllowInvalidHostnames` allows invalid host names. Before, `tls` and `tlsAllowInvalidHostnames` were not used, and only `sslContextParameters` turned TLS on. - When none of these options is set, the TLS settings of the connection string (such as `?tls=true`) are used as before. - The `tls` option description says it applies to the client the endpoint creates. The generated files are regenerated. - The other client options that are not applied today are left to CAMEL-27193, which can build on the new `createMongoClientSettings()`. ## Upgrade note New entry in the 4.24 upgrade guide: an endpoint with `tls=true` now connects with TLS. The server must accept TLS, and its certificate must be trusted (or set `sslContextParameters`). ## Tests - New `MongoDbEndpointTlsTest`, without a container. It checks: - the SSL settings built for `hosts` and for `connectionUriString`, with `tls`, `tlsAllowInvalidHostnames` and `sslContextParameters`; - that `?tls=true` in the connection string is kept; - the settings of the client the endpoint created. 4 of its 9 tests fail without the change. - The camel-mongodb unit tests (1061) and integration tests (156) pass. _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]
