[ 
https://issues.apache.org/jira/browse/CAMEL-24192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-24192:
-----------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: Claus Ibsen
>            Priority: Minor
>
> 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)

Reply via email to