Skip to content

CAMEL-24158: Backport EventHubs HeaderFilterStrategy to 4.14.x - #24887

Merged
davsclaus merged 1 commit into
camel-4.14.xfrom
fix/CAMEL-24158-backport-4.14.x
Jul 18, 2026
Merged

CAMEL-24158: Backport EventHubs HeaderFilterStrategy to 4.14.x#24887
davsclaus merged 1 commit into
camel-4.14.xfrom
fix/CAMEL-24158-backport-4.14.x

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of davsclaus

Backport of the EventHubs header filter strategy fix from PR #24884 to the camel-4.14.x maintenance branch (CVE-related).

Problem: EventHubsProducerOperations copies ALL Camel exchange headers (including internal Camel* headers) into AMQP application properties via eventData.getProperties().putAll(headers). This leaks Camel-internal headers to the Azure Event Hubs broker.

Fix:

  • EventHubsComponent now extends HeaderFilterStrategyComponent instead of DefaultComponent, enabling the default DefaultHeaderFilterStrategy which filters out Camel* and org.apache.camel.* headers
  • Producer passes the HeaderFilterStrategy to EventHubsProducerOperations, which applies it before putting headers on EventData
  • Consumer only sets PARTITION_KEY header when the value is non-null (prevents null header from conflicting with PARTITION_ID on round-trip)

Test plan

  • camel-azure-eventhubs module builds and compiles
  • Generated files (configurer, JSON metadata) regenerated
  • IT test constructor calls updated for new 3-arg signature
  • CI green

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

@gnodet gnodet 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.

Claude Code on behalf of gnodet

Review: APPROVE ✅

Clean backport of the EventHubs HeaderFilterStrategy fix to camel-4.14.x. This is identical to the camel-4.18.x backport in PR #24886 (which I also reviewed), and both faithfully port the original fix from PR #24884 on main.

Changes verified (same as PR #24886)

  1. EventHubsComponent — extends HeaderFilterStrategyComponent instead of DefaultComponent
  2. EventHubsConsumer — null-guard on PARTITION_KEY header
  3. EventHubsProducerEventHubsProducerOperations — filter strategy threaded from component to operations
  4. EventHubsProducerOperationsapplyFilterToCamelHeaders() filtering before putting headers on EventData
  5. Generated files — properly regenerated
  6. IT tests — updated for 3-arg constructor

Diff is byte-identical to PR #24886 (only git blob hashes and line offsets differ, as expected for different base branches).


🤖 This review was generated by an AI agent (Claude Code) on behalf of gnodet. AI-generated reviews are advisory — human judgment should guide final decisions.

…ent Camel headers leaking to AMQP properties

Backport of header filter strategy fix from PR #24884 to 4.14.x.
EventHubsComponent now extends HeaderFilterStrategyComponent so that
the default DefaultHeaderFilterStrategy filters out Camel-internal
headers before they are put on EventData application properties.
Also guards against setting a null PARTITION_KEY header on the consumer side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@davsclaus
davsclaus force-pushed the fix/CAMEL-24158-backport-4.14.x branch from fbbbd17 to 836a4f3 Compare July 18, 2026 08:21

@gnodet gnodet 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.

Claude Code on behalf of gnodet

Follow-up review — rebased commit (836a4f3) ✅

The PR was rebased to include proper catalog and component DSL regeneration:

  • azure-eventhubs.json catalog — headerFilterStrategy property added at index 19
  • AzureEventhubsComponentBuilderFactory.java — DSL builder method and setPropertyOnComponent case added

Source code is unchanged from the original review. These generated files complete the backport properly. Approval still stands.


🤖 This review was generated by an AI agent (Claude Code) on behalf of gnodet. AI-generated reviews are advisory — human judgment should guide final decisions.

@davsclaus davsclaus added this to the 4.14.9 milestone Jul 18, 2026
@davsclaus davsclaus added backport indicate that a Pull request is a backport from a fix from the main branch bug Something isn't working labels Jul 18, 2026
@davsclaus davsclaus self-assigned this Jul 18, 2026
@davsclaus
davsclaus merged commit fee1256 into camel-4.14.x Jul 18, 2026
3 checks passed
@davsclaus
davsclaus deleted the fix/CAMEL-24158-backport-4.14.x branch July 18, 2026 15:25
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants