Skip to content

CAMEL-23506: align aws2-sqs/sns HeaderFilterStrategy with siblings#23221

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23506
May 14, 2026
Merged

CAMEL-23506: align aws2-sqs/sns HeaderFilterStrategy with siblings#23221
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23506

Conversation

@oscerd

@oscerd oscerd commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Sqs2HeaderFilterStrategy and Sns2HeaderFilterStrategy only configured an outbound filter. Added setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH) so the inbound direction is aligned with the sibling strategies (Kafka, Mail, CoAP, Google Pub/Sub, …).
  • The existing outbound regex (which also catches breadcrumbId and org.apache.camel.*) is unchanged.
  • Added focused unit tests in both modules: Sqs2HeaderFilterStrategyTest, Sns2HeaderFilterStrategyTest.

Jira: https://issues.apache.org/jira/browse/CAMEL-23506

Test plan

  • mvn -DskipTests install in components/camel-aws/camel-aws2-sqs — passes
  • mvn -DskipTests install in components/camel-aws/camel-aws2-sns — passes
  • mvn test -Dtest=Sqs2HeaderFilterStrategyTest — 4/4 pass
  • mvn test -Dtest=Sns2HeaderFilterStrategyTest — 4/4 pass
  • Full root mvn clean install -DskipTests — passes (no stray regen artifacts)

Claude Code on behalf of Andrea Cosentino

…tegy with sibling components

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd
oscerd requested review from davsclaus and gnodet May 14, 2026 11:10
@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-aws/camel-aws2-sns
  • components/camel-aws/camel-aws2-sqs
All tested modules (10 modules)
  • Camel :: AWS2 Eventbridge
  • Camel :: AWS2 SNS
  • Camel :: AWS2 SQS
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@oscerd
oscerd merged commit 5f57258 into apache:main May 14, 2026
6 checks passed
oscerd added a commit that referenced this pull request May 20, 2026
…23357)

Sqs2HeaderFilterStrategy and Sns2HeaderFilterStrategy only configured
an outbound filter. Add setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH)
so the inbound direction is aligned with the sibling strategies
(Kafka, Mail, CoAP, Google Pub/Sub, ...). The existing outbound regex
(which also catches breadcrumbId and org.apache.camel.*) is unchanged.

Includes focused unit tests in both modules and the
camel-4x-upgrade-guide-4_18.adoc note.

(cherry picked from commit 5f57258)

JIRA: https://issues.apache.org/jira/browse/CAMEL-23506

Closes #23221
oscerd added a commit that referenced this pull request May 20, 2026
…23373)

Sqs2HeaderFilterStrategy and Sns2HeaderFilterStrategy only configured
an outbound filter. Add setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH)
so the inbound direction is aligned with the sibling strategies
(Kafka, Mail, CoAP, Google Pub/Sub, ...). The existing outbound regex
(which also catches breadcrumbId and org.apache.camel.*) is unchanged.

Includes focused unit tests in both modules and the
camel-4x-upgrade-guide-4_14.adoc note.

(cherry picked from commit 5f57258)

JIRA: https://issues.apache.org/jira/browse/CAMEL-23506

Closes #23221
@oscerd
oscerd deleted the fix/CAMEL-23506 branch May 20, 2026 13:30
oscerd added a commit to apache/camel-website that referenced this pull request Jul 5, 2026
CAMEL-23506 added an inbound Camel-namespace filter to Sns2HeaderFilterStrategy alongside the camel-aws2-sqs fix. camel-aws2-sns is producer-only (Sns2Endpoint.createConsumer throws UnsupportedOperationException), so there is no reachable inbound header-injection path; document this as a LOW-severity defense-in-depth hardening advisory rather than an exploitable vulnerability, cross-referencing the consumer-side camel-aws2-sqs issue CVE-2026-46456. Shares the same fix (PR apache/camel#23221, main 5f57258fb33d33ef99df10594f8fe9f11d7c2b7e, backports 7b334be0419839097a132d4ff3427fc4083e695e on camel-4.18.x and b7f78292e747a28dbf5da444265557b5f9f3c1a1 on camel-4.14.x). Also add a cross-reference sentence to CVE-2026-46456 pointing at the SNS hardening, and re-sign its .txt.asc. New advisory has a PGP-clearsigned .txt.asc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants