Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

X509FederationClient httpClient resource leak #651

Open
mbalamaruthu opened this issue Jan 20, 2025 · 0 comments
Open

X509FederationClient httpClient resource leak #651

mbalamaruthu opened this issue Jan 20, 2025 · 0 comments

Comments

@mbalamaruthu
Copy link

We're using InstancePrincipalsAuthenticationDetailsProvider as part of our canary test run with MicronautTest. Since the test is run periodically, we've observed a resource leak, where live threads increase for each canary run.

The resource leak seems to be com.oracle.bmc.auth.internal.X509FederationClient leaving a leaked httpClient. This may need to be closed at something similar to preDestroy in Micronaut or make X509FederationClient closeable. Thanks.

The client causing resource leak snippet is as below.

this.httpClient = HttpProvider.getDefault() .newBuilder() .baseUri(URI.create(federationEndpoint)) .property(StandardClientProperties.ASYNC_POOL_SIZE, 1) .registerRequestInterceptor( Priorities.AUTHENTICATION, new AuthnClientFilter( new RequestSignerImpl( keySupplier, SigningStrategy.STANDARD, keyIdSupplier), Collections.emptyMap())) .registerRequestInterceptor( Priorities.HEADER_DECORATOR, new ClientIdFilter()) .registerRequestInterceptor(Priorities.USER, new LogHeadersFilter()) .build(); this.circuitBreaker = CircuitBreakerHelper.makeCircuitBreaker(this.httpClient, circuitBreakerConfig);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant