-
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
base: camel-4.10.x
Are you sure you want to change the base?
[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.
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