-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Labels
SDKIssue pertains to the SDK itself and not specific to any serviceIssue pertains to the SDK itself and not specific to any service
Description
We're using SessionTokenAuthenticationDetailsProvider for our local development and testing, Noticed that httpClient is not closed during refreshSessionToken.
The snippet causing the leak is as below. Kindly enclose within try or close the http client. Thanks.
`public synchronized boolean refreshSessionToken() {
com.oracle.bmc.Service service =
Services.serviceBuilder().serviceName("auth").serviceEndpointPrefix("auth").build();
String endpoint = Region.formatDefaultRegionEndpoint(service, region);
LOG.debug(
"Refreshing session token, refresh endpoint: {}/v1/authentication/refresh",
endpoint);
try {
HttpClient httpClient =
HttpProvider.getDefault()
.newBuilder()
.baseUri(endpoint)
.registerRequestInterceptor(
Priorities.AUTHENTICATION,
new AuthnClientFilter(
DefaultRequestSigner.createRequestSigner(this),
Collections.emptyMap()))
.build();
SessionTokenRefreshRequest request =
new SessionTokenRefreshRequest((this.sessionToken));`
Metadata
Metadata
Assignees
Labels
SDKIssue pertains to the SDK itself and not specific to any serviceIssue pertains to the SDK itself and not specific to any service