oscerd opened a new pull request, #27725: URL: https://github.com/apache/camel/pull/27725
## Description [CAMEL-25584](https://issues.apache.org/jira/browse/CAMEL-25584) When a message with a `Long-Running-Action` header reaches a saga route, the LRA saga service joins that LRA by calling the URL in the header, and `saga:complete` / `saga:compensate` close or cancel it the same way. That URL was not checked against the configured LRA coordinator. - `LRASagaService.getSaga()`, which every lookup of an existing LRA goes through, now accepts an LRA only when its URL is under the configured coordinator (`coordinatorUrl` + `coordinatorContextPath`): same scheme, host and port (case-insensitive, default ports normalized), no user info, and a normalized path under the coordinator path. Otherwise the lookup fails with an `IllegalArgumentException` that names the option to use, and the exchange fails without any call to that URL. - New `allowedCoordinatorUrls` option, also `camel.lra.allowedCoordinatorUrls` in camel-main: comma-separated further coordinator URLs to accept, for participants that reach the same coordinator under different URLs. An entry that is not an absolute URL fails at startup. - LRAs started by the service come from the configured coordinator and keep working: the LRA ITs against the coordinator container (multi-route `MANDATORY` sagas, manual completion) pass unchanged. - Docs: the Saga EIP page. Upgrade guide: a new `camel-4x-upgrade-guide-4_24.adoc` (same header as the other open PRs that create it), plus the 4.22.2 and 4.18.6 sections on main, as a message carrying the `Long-Running-Action` of another coordinator now fails. ## Tests - `LRASagaServiceAllowedCoordinatorTest`: accepted and rejected LRA URLs (host, port, scheme, case, default port, context path, `..` segments, a sibling path prefix, user info, allowed coordinator URLs), and the startup validation. - `LRAPropagatedSagaTest`: through the Saga EIP, a propagated LRA of the configured coordinator is joined, and one of another coordinator fails the exchange with no call to the LRA client. - All the `LRA*IT` tests against the LRA coordinator container: 12 tests, green locally. ## Notes - This touches the same files as #27719 (`LRASagaService`, `LraConfigurationProperties`, the Saga EIP page and the generated camel-main metadata), so whichever merges second needs a rebase and a regen. - camel-spring-boot: `camel-lra-starter` sets the LRA options one by one, so it needs `allowedCoordinatorUrls` too, in the same releases. - Backports to `camel-4.22.x` and `camel-4.18.x` after this is merged. _Claude Code on behalf of oscerd_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
