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


##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -141,8 +141,13 @@ public RealmConfig realmConfig(CallContext callContext) {
 
   @Produces
   @RequestScoped
-  public PolarisAuthorizer polarisAuthorizer(RealmConfig realmConfig) {
-    return new PolarisAuthorizerImpl(realmConfig);
+  public PolarisAuthorizer polarisAuthorizer(
+      AuthorizationConfiguration authorizationConfig,
+      RealmConfig realmConfig,
+      @Any Instance<PolarisAuthorizerFactory> authorizerFactories) {
+    PolarisAuthorizerFactory factory =
+        
authorizerFactories.select(Identifier.Literal.of(authorizationConfig.type())).get();

Review Comment:
   Good point @dimas-b - I took care of this, and also made some adjustments 
into OpaPolarisAuthorizorFactory to validate the configurations and initialize 
the HttpClient at the application scope.



-- 
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