[ 
https://issues.apache.org/jira/browse/CAMEL-24751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117812#comment-18117812
 ] 

Andrea Cosentino commented on CAMEL-24751:
------------------------------------------

Fixed via https://github.com/apache/camel/pull/26667 (merged to main for 
4.23.0).

_Claude Code on behalf of Andrea Cosentino_

> camel-opa - unregister the OpaSecurityPolicy health check when its routes stop
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-24751
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24751
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.23.0
>
>
> OpaSecurityPolicy registers a readiness check in beforeWrap but nothing 
> unregisters it when the routes it guards are stopped or removed, so a route 
> reload leaves the check behind in the HealthCheckRegistry reporting on a 
> policy that is no longer enforcing anything.
> The registration is deduplicated by id, so this is bounded rather than a leak 
> - the stale check is wrong, not unbounded. Raised by davsclaus reviewing 
> https://github.com/apache/camel/pull/26436 and deferred there as out of scope 
> for that change.
> OpaSecurityProcessor is a Service, so the shape of the fix is a ref-count: 
> count the wrapped processors that have started, and unregister from doStop 
> once the last one goes away. That has to be right under route reload (stop 
> then start of the same route) and under a policy shared by several routes, 
> which is why it wants its own change and its own tests rather than riding 
> along with the registration reorder.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to