You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/21 09:09:27 UTC
[PR] CAMEL-24716: fix serialization regression - resolve algorithm names lazily at crypto call-sites [camel]
gnodet opened a new pull request, #26671:
URL: https://github.com/apache/camel/pull/26671
## Summary
Fixes a serialization regression introduced in #26467.
### Problem
Resolving constant names (e.g. `AES_256_GCM`) to W3C URIs eagerly in the four setters (`setXmlCipherAlgorithm`, `setKeyCipherAlgorithm`, `setDigestAlgorithm`, `setMgfAlgorithm`) caused a round-trip serialization regression: the `ModelWriter` compares getters against the constant-name defaults (e.g. `"AES_256_GCM"`) to decide whether to suppress the attribute in the marshalled XML. After eager resolution, getters always returned W3C URIs, so the equality check never matched and all four algorithm attributes were written unconditionally in all routes — breaking round-trip serialization for any route using the default values.
### Fix
Remove `resolveAlgorithm()` from the four setters so getters return what was originally set. Add private `resolvedXxx()` helpers that apply `resolveAlgorithm()` lazily, and use those helpers at every actual crypto call-site (marshal/unmarshal path).
This was caught during review of the `camel-4.22.x` backport PR #26486.
### Tests
`XmlSecurityConstantNameTest` updated: the getter-assertion `assertEquals(XMLCipher.AES_256_GCM, df.getXmlCipherAlgorithm())` checked eager resolution and is removed; the end-to-end encrypt/decrypt at the bottom of each test method validates that lazy resolution works correctly at actual crypto call-sites.
--
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-24716: fix serialization regression - resolve algorithm names lazily at crypto call-sites [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26671:
URL: https://github.com/apache/camel/pull/26671#issuecomment-5758471820
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `components/camel-xmlsecurity`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 9 of 692 tested, 27 compile-only — current: 9 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **36 affected modules** (current approach: 9).
**Skip-tests mode would test 9 modules** (1 direct + 8 downstream), **skip tests for 27** (generated code, meta-modules)
<details><summary>:warning: Modules only in Scalpel (27)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `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>
<details><summary>Modules Scalpel would test (9)</summary>
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-route-parser
- `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-yaml-dsl-validator
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
- `camel-xmlsecurity` ← components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java, components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XmlSecurityConstantNameTest.java
- `camel-yaml-dsl-validator` ← downstream of org.apache.camel:camel-catalog
- `camel-yaml-dsl-validator-maven-plugin` ← downstream of org.apache.camel:camel-yaml-dsl-validator
</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-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>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
<details><summary>All tested modules (36 modules, 5m 1s total)</summary>
**Total reactor time:** 5m 1s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: Launcher | 50.8s | SUCCESS |
| Camel :: JBang :: MCP | 38.6s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 31.0s | SUCCESS |
| Camel :: XML Security | 26.5s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 23.6s | SUCCESS |
| Camel :: Component DSL | 21.0s | SUCCESS |
| Camel :: Docs | 15.3s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 14.8s | SUCCESS |
| Camel :: Kamelet Main | 8.3s | SUCCESS |
| Camel :: Catalog :: Camel Route Parser | 8.0s | SUCCESS |
| Camel :: YAML DSL :: Validator | 7.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 7.1s | SUCCESS |
| Camel :: Catalog :: Camel Report Maven Plugin | 7.1s | SUCCESS |
| Camel :: YAML DSL :: Deserializers | 6.1s | SUCCESS |
| Camel :: All Components Sync point | 5.4s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 4.6s | SUCCESS |
| Camel :: YAML DSL :: Validator Maven Plugin | 3.5s | SUCCESS |
| Camel :: Catalog :: Maven | 3.3s | SUCCESS |
| Camel :: YAML DSL :: Maven Plugins | 3.0s | SUCCESS |
| Camel :: Catalog :: Suggest (deprecated) | 2.3s | SUCCESS |
| Camel :: Assembly | 1.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.7s | SUCCESS |
| Camel :: JBang :: Integration tests | 1.6s | SUCCESS |
| Camel :: Coverage | 1.5s | SUCCESS |
| Camel :: Catalog :: Dummy Component | 1.1s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.0s | SUCCESS |
| Camel :: Catalog :: Console | 0.9s | SUCCESS |
| Camel :: Endpoint DSL :: Support | 0.8s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 0.7s | SUCCESS |
| Camel :: Launcher :: Container | 0.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 0.5s | SUCCESS |
| Camel :: Endpoint DSL | n/a | |
| Camel :: Integration Tests | n/a | |
| Camel :: JBang :: Core | n/a | |
| Camel :: YAML DSL | n/a | |
**Top 20 slowest modules:**
- `Camel :: Launcher` (50.8s)
- `Camel :: JBang :: MCP` (38.6s)
- `Camel :: JBang :: Plugin :: TUI` (31.0s)
- `Camel :: XML Security` (26.5s)
- `Camel :: Catalog :: Camel Catalog` (23.6s)
- `Camel :: Component DSL` (21.0s)
- `Camel :: Docs` (15.3s)
- `Camel :: JBang :: Plugin :: Kubernetes` (14.8s)
- `Camel :: Kamelet Main` (8.3s)
- `Camel :: Catalog :: Camel Route Parser` (8.0s)
- `Camel :: YAML DSL :: Validator` (7.2s)
- `Camel :: JBang :: Plugin :: Testing` (7.1s)
- `Camel :: Catalog :: Camel Report Maven Plugin` (7.1s)
- `Camel :: YAML DSL :: Deserializers` (6.1s)
- `Camel :: All Components Sync point` (5.4s)
- `Camel :: JBang :: Plugin :: Validate` (4.6s)
- `Camel :: YAML DSL :: Validator Maven Plugin` (3.5s)
- `Camel :: Catalog :: Maven` (3.3s)
- `Camel :: YAML DSL :: Maven Plugins` (3.0s)
- `Camel :: Catalog :: Suggest (deprecated)` (2.3s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/35581684874)
--
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-24716: fix serialization regression - resolve algorithm names lazily at crypto call-sites [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #26671:
URL: https://github.com/apache/camel/pull/26671
--
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-24716: fix serialization regression - resolve algorithm names lazily at crypto call-sites [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26671:
URL: https://github.com/apache/camel/pull/26671#issuecomment-5758066303
: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