Skip to content

[backport camel-4.22.x] CAMEL-25964: camel-vertx - VertxHelper does not apply standalone TrustManager from SSLContextParameters - #28345

Merged
davsclaus merged 1 commit into
camel-4.22.xfrom
backport/28305-to-camel-4.22.x
Oct 24, 2026
Merged

davsclaus merged 1 commit into
camel-4.22.xfrom
backport/28305-to-camel-4.22.x

Conversation

@gnodet

@gnodet gnodet commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Backport of #28305

Cherry-pick of c78e59f to camel-4.22.x.
Conflicts resolved automatically by backport bot agent.

…ot apply standalone TrustManager from SSLContextParameters
@gnodet gnodet added the backport indicate that a Pull request is a backport from a fix from the main branch label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-vertx/camel-vertx-common
  • docs

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.


🔬 Scalpel shadow comparison — Scalpel: 25 tested, 28 compile-only — current: 24 all tested

Maveniverse Scalpel detected 53 affected modules (current approach: 24).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 25 modules (2 direct + 23 downstream), skip tests for 28 (generated code, meta-modules)

Modules Scalpel would test (25)
  • camel-a2a
  • camel-ibm-watsonx-ai
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-jsonpath
  • camel-knative-http
  • camel-launcher-container
  • camel-mcp-server
  • camel-micrometer-prometheus
  • camel-oauth
  • camel-observability-services
  • camel-openapi-validator
  • camel-platform-http-main
  • camel-platform-http-vertx
  • camel-rest-openapi
  • camel-vertx
  • camel-vertx-common
  • camel-vertx-http
  • camel-vertx-websocket
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
  • docs
Modules with tests skipped (28)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

Build reactor — dependencies compiled but only changed modules were tested (2 modules)
  • Camel :: Docs
  • Camel :: Vert.x :: Common

⚙️ View full build and test results

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of CAMEL-25964. The fix correctly generalizes the trust manager handling in VertxHelper.setupSSLOptions(): previously only TrustAllTrustManager.INSTANCE was explicitly handled, leaving all other standalone TrustManager instances silently ignored. The new code uses TrustOptions.wrap(trustManager) for any non-null standalone TrustManager, with the factory-based path as the fallback — matching the Vert.x-idiomatic approach and aligning with all other Camel components that use SSLContextParameters.

Pre-fix test validation: static analysis confirms testCustomTrustManagerApplied() would have been RED before the fix — the old code path returns null from createTrustManagerFactory() (no keystore configured) and the identity check == TrustAllTrustManager.INSTANCE fails for a custom manager, leaving getTrustOptions() null and causing the assertThat(...).isNotNull() assertion to fail.

Fix covers all consumers of VertxHelper (platform-http-vertx, vertx-http, vertx-websocket). Upgrade guide documentation is accurate. CRLF→LF normalization in the diff is cosmetic and correct.

Side note: camel-4.18.x (LTS) has the same bug — worth a separate backport there.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR

The code, the test, pom.xml and the truststore are the same as #28305, and CI is green with VertxHelperTest passing. Only the upgrade note needs a follow-up.

Blockers: None

Other findings: 2

Upgrade guide section. The note at camel-4x-upgrade-guide-4_22.adoc:2090 is at the end of the file, inside "Upgrading Camel 4.21 to 4.22". The change ships in 4.22.3, so it belongs under "Upgrading from 4.22.2 to 4.22.3" (line 14), where users who upgrade from 4.22.2 look. Note that #28347 also appends its note at the end of this file, so the second of the two to merge gets a conflict there.

Main sync. The 4.22 guide on main does not have this note yet. Please add it there in the "4.22.2 to 4.22.3" section. One main PR can also carry the 4.18.6 note (see #28346) and the camel-as2 notes (#28347, #28348).

VertxHelper.java shows as a whole-file change because its line endings change from CRLF to LF, as in #28305. The result is the same file as on main.


Reviewed with Claude Code on behalf of @davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@davsclaus davsclaus added this to the 4.22.3 milestone Oct 24, 2026
@davsclaus davsclaus added the bug Something isn't working label Oct 24, 2026
@davsclaus
davsclaus merged commit 44a1839 into camel-4.22.x Oct 24, 2026
5 checks passed
@github-actions
github-actions Bot deleted the backport/28305-to-camel-4.22.x branch October 24, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch bug Something isn't working components docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants