Andrea Cosentino created CAMEL-26827:
----------------------------------------
Summary: camel-opa/openfga - release TLS health probe clients on
lifecycle stop
Key: CAMEL-26827
URL: https://issues.apache.org/jira/browse/CAMEL-26827
Project: Camel
Issue Type: Bug
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
h2. Problem / motivation
OpaHealthProbe and OpenFgaHealthProbe cache HttpClient instances in static maps
keyed by SSLContext identity and never remove entries. TLS endpoint reloads or
repeated CamelContext creation can accumulate retained clients and key/trust
manager graphs.
h2. Proposed scope
Introduce lifecycle-owned probe transports with safe sharing/reference counting
or another bounded ownership design. Close clients where the supported JDK
permits it. Do not rely solely on weak keys because a client can retain its
SSLContext. Preserve transport parity between decision and health requests.
h2. Acceptance criteria / validation
* Repeated TLS endpoint restart, route reload and CamelContext disposal do not
grow retained probe resources indefinitely.
* Shared live users remain usable when one endpoint stops.
* Existing TLS readiness and policy lifecycle tests continue passing.
h2. References
*
https://github.com/apache/camel/blob/5686684cb418/components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaHealthProbe.java#L60
*
https://github.com/apache/camel/blob/5686684cb418/components/camel-openfga/src/main/java/org/apache/camel/component/openfga/OpenFgaHealthProbe.java#L71
Source: read-only component audit at 5686684cb418. Recheck current main before
implementing; historical references identify the audited code.
_AI-generated by Codex on behalf of oscerd (JIRA: acosentino)._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)