You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/07/17 09:16:00 UTC
[jira] [Created] (CAMEL-24192) camel-lra: Separate compensation/completion URI allowlists and prune on route removal
Claus Ibsen created CAMEL-24192:
-----------------------------------
Summary: camel-lra: Separate compensation/completion URI allowlists and prune on route removal
Key: CAMEL-24192
URL: https://issues.apache.org/jira/browse/CAMEL-24192
Project: Camel
Issue Type: Improvement
Components: camel-lra
Reporter: Claus Ibsen
The LRASagaService maintains a single shared Set<String> (sagaURIs) that accumulates every compensation and completion URI registered via registerStep(). LRASagaRoutes.verifyRequest() validates incoming callbacks against this one combined set.
Two problems:
1. *No separation* — compensation and completion URIs share the same allowlist, so a completion callback could invoke a compensation endpoint and vice versa.
2. *Never pruned* — URIs from dynamically removed routes remain authorized for the entire context lifetime. This is both a memory leak and a security concern (stale URIs stay authorized).
Suggested fix:
- Split sagaURIs into two separate sets (compensationURIs, completionURIs)
- Validate compensation callbacks against the compensation set only, and completion callbacks against the completion set only
- Add an unregisterStep() method (or use route lifecycle events) to prune URIs when routes are removed
Found during the Saga EIP code review (CAMEL-24151).
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)