CAMEL-24158: Backport EventHubs HeaderFilterStrategy to 4.14.x - #24887
Conversation
gnodet
left a comment
There was a problem hiding this comment.
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)
EventHubsComponent— extendsHeaderFilterStrategyComponentinstead ofDefaultComponentEventHubsConsumer— null-guard onPARTITION_KEYheaderEventHubsProducer→EventHubsProducerOperations— filter strategy threaded from component to operationsEventHubsProducerOperations—applyFilterToCamelHeaders()filtering before putting headers onEventData- Generated files — properly regenerated
- 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>
fbbbd17 to
836a4f3
Compare
gnodet
left a comment
There was a problem hiding this comment.
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.jsoncatalog —headerFilterStrategyproperty added at index 19AzureEventhubsComponentBuilderFactory.java— DSL builder method andsetPropertyOnComponentcase 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.
Summary
Claude Code on behalf of davsclaus
Backport of the EventHubs header filter strategy fix from PR #24884 to the
camel-4.14.xmaintenance branch (CVE-related).Problem:
EventHubsProducerOperationscopies ALL Camel exchange headers (including internalCamel*headers) into AMQP application properties viaeventData.getProperties().putAll(headers). This leaks Camel-internal headers to the Azure Event Hubs broker.Fix:
EventHubsComponentnow extendsHeaderFilterStrategyComponentinstead ofDefaultComponent, enabling the defaultDefaultHeaderFilterStrategywhich filters outCamel*andorg.apache.camel.*headersHeaderFilterStrategytoEventHubsProducerOperations, which applies it before putting headers onEventDataPARTITION_KEYheader when the value is non-null (prevents null header from conflicting withPARTITION_IDon round-trip)Test plan
camel-azure-eventhubsmodule builds and compiles🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com