sungwy commented on code in PR #2680:
URL: https://github.com/apache/polaris/pull/2680#discussion_r2422912058


##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -244,6 +254,59 @@ public StsClientsPool stsClientsPool(
     return new StsClientsPool(config.effectiveClientsCacheMaxSize(), 
httpClient, meterRegistry);
   }
 
+  @Produces
+  @Singleton
+  @Identifier("opa-http-client")
+  public CloseableHttpClient opaHttpClient() {
+    return HttpClients.custom().build();
+  }
+
+  public void closeOpaHttpClient(
+      @Disposes @Identifier("opa-http-client") CloseableHttpClient client) {
+    try {
+      client.close();
+    } catch (Exception e) {
+      LOGGER.warn("Error closing OPA HTTP client", e);
+    }
+  }
+
+  @Produces
+  @Singleton
+  @Identifier("opa-bearer-token-provider")
+  public BearerTokenProvider opaBearerTokenProvider(

Review Comment:
   I took a stab at this. Let me know if this aligns with what you were 
suggesting



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to