davsclaus opened a new pull request, #30403: URL: https://github.com/apache/camel/pull/30403
## Backport of #30362 Backport of #30362 (CAMEL-27218: camel-mongodb - the tls and tlsAllowInvalidHostnames options are applied to the client created from hosts or connectionUriString) onto `camel-4.18.x`, for 4.18.6. JIRA: [CAMEL-27218](https://issues.apache.org/jira/browse/CAMEL-27218) **Original PR:** #30362 (squash commit 41760c95ce77) **Original author:** @davsclaus **Target branch:** `camel-4.18.x` ### Straight or adapted Adapted: the change is applied to this branch's `MongoDbEndpoint`. - **What this branch lacks:** CAMEL-27056 (#30226) is not on this branch, so the endpoint creates its own client only when `hosts` is set, and `connectionUriString` is used only together with `hosts`. - The condition stays `hosts != null`, and inside it the client is now built with `MongoClients.create(createMongoClientSettings())`. - The `createdMongoConnection` line of `main` is left out. - **Javadoc of `tls`:** "Applies to the client the endpoint creates when hosts is set". The generated JSON, the catalog copy and the endpoint DSL are updated to match. - **Test:** the `connectionUriString` cases of `MongoDbEndpointTlsTest` also set `hosts`. - **Tests run:** module unit tests 15/15 pass, `MongoDbEndpointTlsTest` 7/7. `clientCreatedFromHostsUsesTls` fails without the change. - **4.18.x only:** this branch has no `sslContextParameters` option on the mongodb endpoint. So `createMongoClientSettings` applies `tls` and `tlsAllowInvalidHostnames` only, and the two `sslContextParameters` tests are left out. The test uses `camel-test-junit5`. The upgrade-guide entry is left out of this PR: the upgrade guides for all versions live on `main`, where the 4.18.6 entry goes into the guide of this line in a separate doc PR. _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]
