-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[CAMEL-22557] AS2: Fix configuration isolation and enable port sharing for inbound routes #19649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CAMEL-22557] AS2: Fix configuration isolation and enable port sharing for inbound routes #19649
Conversation
…g for inbound routes
|
Thanks for the contribution @brunovg , could you add a test that shows this improvement? |
|
🌟 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:
|
|
Thanks for the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks like a great feature improvement! There's a few things that need to be adjusted, though (including tests, as reported).
...l-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java
Outdated
Show resolved
Hide resolved
.../camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
Outdated
Show resolved
Hide resolved
.../camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java
Show resolved
Hide resolved
...as2-component/src/main/java/org/apache/camel/component/as2/internal/AS2ConnectionHelper.java
Outdated
Show resolved
Hide resolved
...-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerConnection.java
Outdated
Show resolved
Hide resolved
|
The CI reports failures for the camel-catalog and endpointdsl, you can regenerate the as2 files with |
…Pattern is now obtained directly from the properties
…g/decryption failures
79580ca to
41a76dd
Compare
…g for inbound routes
…Pattern is now obtained directly from the properties
…g/decryption failures
41a76dd to
4014d98
Compare
…l AS2 configuration fields instead of null to prevent existing unit tests from failing.
…l AS2 configuration fields instead of null to prevent existing unit tests from failing.
|
Can you update the PR with these files The build is reformatting the code. And because of that the CI build fails |
|
Are you able to update those 2 source files, so we can continue this PR and this will also allow CI to test the code |
The new unit test class that I uploaded is not working yet. For some reason, the fix I submitted, doesn't work on the unit tests. |
…e per-request security configuration lookups based on the request path, supporting multiple AS2 consumer endpoints with distinct keys/certs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to squash the commits and rebase to 4.10.x branch.
Also open a PR to the main and 4.14.x branch.
Frankly it would be best with a new PR against main branch only. Then its easier for everyone else to help test and review. And then afterwards we can then cherry-pick to LTS branches. And if something need manual code changes then ask for PRs against a specific branches. This ensures that the code is always applied to main first and then go down when applicable. |
|
Would be awesome if you are able to send a PR for main branch today as then its a chance to get into 4.16.0, which makes it easier for you and everyone else to test and use and report issues that allows us to fix this in upcoming releases, and help ensure that backports to LTS branches are worth "any risk". |
|
PR on main branch: #19768 |
Description
This Pull Request addresses a major architectural limitation in the camel-as2 component where multiple inbound AS2 Consumers (routes) could not share the same port number.
The previous architecture led to two primary issues:
Port Binding Failure: The second route attempting to start would fail with an "Address already in use" error.
Configuration Collision: Even if the port binding was bypassed, encrypted messages failed with a NullPointerException or AS2DecryptionException because the shared server connection's cryptographic keys were overwritten or set to null and could not be retrieved by the correct Consumer.
CAMEL-22557: camel-as2 - Server-side DecryptingPrivateKey Conflict: Key from first route started is enforced for all subsequent routes on the same serverPortNumber