You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/08/27 14:02:30 UTC
[PR] CAMEL-24450: camel-jetty - do not grant CORS credentials to an origin the operator did not name [camel]
oscerd opened a new pull request, #25829:
URL: https://github.com/apache/camel/pull/25829
Fixes [CAMEL-24450](https://issues.apache.org/jira/browse/CAMEL-24450).
enableCORS=true added new CrossOriginFilter() with no init parameters, so Jetty's own
defaults applied. Confirmed against jetty-ee10-servlets 12.1.12: DEFAULT_ALLOWED_ORIGINS
is "*" and credentials default to true. The filter reflects the request's origin rather
than sending "*", so that pairing is the credentialed any-origin configuration the fetch
specification refuses to express - reflecting the origin being the usual way around that
rule. An option named "enable CORS" should not mean "every origin, with credentials".
Default allowCredentials to false when CORS is enabled. The origin is still reflected, so
enabling CORS keeps working for requests that carry no credentials; an operator who needs
credentialed cross-origin requests sets filterInit.allowCredentials=true and names the
origins in filterInit.allowedOrigins. Asking for credentials while leaving the origins at
"*" is logged as a warning, since that combination reproduces the original behaviour.
The defaults are applied where the init parameter map is built, not where the filter is
added: the map is handed to the endpoint earlier and only when it is non-empty, so
applying them later would drop them in exactly the case that matters - enableCORS on its
own, with no filterInit parameters at all.
EnableCORSTest.testCORSenabled asserted that credentials are granted, so it encoded the
previous behaviour; it now asserts the opposite, and a second test covers the opt-in.
Matches the change made to camel-platform-http-vertx under CAMEL-24436.
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
Signed-off-by: Andrea Cosentino <an...@gmail.com>
\n## Verification\n\n3 files changed, including 1 test file(s). Module build with \`-am\` is green on current main, no generated-file drift. Verified against the pre-fix code when the change was written.
_Claude Code on behalf of oscerd_
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24450: camel-jetty - do not grant CORS credentials to an origin the operator did not name [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway merged PR #25829:
URL: https://github.com/apache/camel/pull/25829
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24450: camel-jetty - do not grant CORS credentials to an origin the operator did not name [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25829:
URL: https://github.com/apache/camel/pull/25829#issuecomment-5448524657
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24450: camel-jetty - do not grant CORS credentials to an origin the operator did not name [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25829:
URL: https://github.com/apache/camel/pull/25829#issuecomment-5448730608
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `components/camel-jetty-common`
- `components/camel-jetty`
- `docs`
> :information_source: 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.
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 40 tested, 27 compile-only — current: 39 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **67 affected modules** (current approach: 39).
<details><summary>:warning: Modules only in Scalpel (28)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `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`
</details>
**Skip-tests mode would test 40 modules** (3 direct + 37 downstream), **skip tests for 27** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (40)</summary>
- `camel-a2a`
- `camel-as2`
- `camel-clickup`
- `camel-consul`
- `camel-java-joor-dsl`
- `camel-jbang-mcp`
- `camel-jbang-plugin-mcp`
- `camel-jbang-plugin-route-parser`
- `camel-jbang-plugin-tui`
- `camel-jbang-plugin-validate`
- `camel-jetty`
- `camel-jetty-common`
- `camel-jsonpath`
- `camel-knative-http`
- `camel-launcher-container`
- `camel-mcp-server`
- `camel-micrometer-prometheus`
- `camel-netty-http`
- `camel-oauth`
- `camel-observability-services`
- `camel-openapi-validator`
- `camel-platform-http-main`
- `camel-platform-http-vertx`
- `camel-quickfix`
- `camel-rest-openapi`
- `camel-restdsl-openapi-plugin`
- `camel-state-store`
- `camel-telegram`
- `camel-test-main-junit5`
- `camel-test-main-junit6`
- `camel-webhook`
- `camel-whatsapp`
- `camel-xml-io-dsl`
- `camel-xml-jaxb-dsl`
- `camel-xml-jaxb-dsl-test-definition`
- `camel-xml-jaxb-dsl-test-spring`
- `camel-yaml-dsl-validator`
- `camel-yaml-dsl-validator-maven-plugin`
- `camel-zookeeper`
- `docs`
</details>
<details><summary>Modules with tests skipped (27)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `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`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `components/camel-jetty`: 1 test(s) disabled on GitHub Actions
<details><summary>Build reactor — dependencies compiled but only changed modules were tested (67 modules)</summary>
- Camel :: AI :: A2A
- Camel :: AI :: MCP Server
- Camel :: AS2 :: Component
- Camel :: All Components Sync point
- Camel :: Assembly
- Camel :: Catalog :: CSimple Maven Plugin (deprecated)
- Camel :: Catalog :: Camel Catalog
- Camel :: Catalog :: Camel Report Maven Plugin
- Camel :: Catalog :: Camel Route Parser
- Camel :: Catalog :: Console
- Camel :: Catalog :: Dummy Component
- Camel :: Catalog :: Maven
- Camel :: Catalog :: Suggest
- Camel :: ClickUp
- Camel :: Component DSL
- Camel :: Consul
- Camel :: Coverage
- Camel :: Docs
- Camel :: Endpoint DSL
- Camel :: Endpoint DSL :: Support
- Camel :: Integration Tests
- Camel :: JBang :: Core
- Camel :: JBang :: Integration tests
- Camel :: JBang :: MCP
- Camel :: JBang :: Main
- Camel :: JBang :: Plugin :: Edit
- Camel :: JBang :: Plugin :: Generate
- Camel :: JBang :: Plugin :: Kubernetes
- Camel :: JBang :: Plugin :: MCP
- Camel :: JBang :: Plugin :: Route Parser
- Camel :: JBang :: Plugin :: TUI
- Camel :: JBang :: Plugin :: Testing
- Camel :: JBang :: Plugin :: Validate
- Camel :: JSon Path
- Camel :: Java DSL with jOOR
- Camel :: Jetty
- Camel :: Jetty :: Common
- Camel :: Kamelet Main
- Camel :: Knative HTTP
- Camel :: Launcher
- Camel :: Launcher :: Container
- Camel :: Maven Plugins :: OpenApi REST DSL Generator
- Camel :: Micrometer :: Prometheus
- Camel :: Netty HTTP
- Camel :: OAuth
- Camel :: Observability Services
- Camel :: OpenAPI :: Validator
- Camel :: Platform HTTP :: Main
- Camel :: Platform HTTP :: Vert.x
- Camel :: QuickFIX/J
- Camel :: REST OpenApi
- Camel :: State Store
- Camel :: Telegram
- Camel :: Test :: Main :: JUnit5
- Camel :: Test :: Main :: JUnit6
- Camel :: Webhook
- Camel :: Whatsapp
- Camel :: XML DSL Jaxb :: Test :: Definition
- Camel :: XML DSL Jaxb :: Test :: Spring
- Camel :: XML DSL with camel-xml-io
- Camel :: XML DSL with camel-xml-jaxb
- Camel :: YAML DSL
- Camel :: YAML DSL :: Deserializers
- Camel :: YAML DSL :: Maven Plugins
- Camel :: YAML DSL :: Validator
- Camel :: YAML DSL :: Validator Maven Plugin
- Camel :: Zookeeper
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/33142518286)
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org