You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "XN137 (via GitHub)" <gi...@apache.org> on 2025/08/13 07:47:39 UTC

[PR] Make PolarisAuthorizer RequestScoped [polaris]

XN137 opened a new pull request, #2340:
URL: https://github.com/apache/polaris/pull/2340

   all methods in `PolarisAuthorizer` currently have a `CallContext` parameter.
   in its only implementation only `CallContext.getRealmConfig` is getting used.
   
   so since `PolarisAuthorizer` cant be used outside a request, we can simply make it request-scoped and inject the request-scoped `RealmConfig` directly.


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Make PolarisAuthorizer RequestScoped [polaris]

Posted by "XN137 (via GitHub)" <gi...@apache.org>.
XN137 commented on code in PR #2340:
URL: https://github.com/apache/polaris/pull/2340#discussion_r2272428785


##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -170,6 +164,12 @@ public RealmConfig realmConfig(CallContext callContext) {
     return callContext.getRealmConfig();
   }
 
+  @Produces
+  @RequestScoped
+  public PolarisAuthorizer polarisAuthorizer(RealmConfig realmConfig) {
+    return new PolarisAuthorizerImpl(realmConfig);

Review Comment:
   note: if any custom implementations of `PolarisAuthorizer` are out there and still need the `CallContext` for whatever reason, they are free to still inject it here.



-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Make PolarisAuthorizer RequestScoped [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy merged PR #2340:
URL: https://github.com/apache/polaris/pull/2340


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Make PolarisAuthorizer RequestScoped [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on PR #2340:
URL: https://github.com/apache/polaris/pull/2340#issuecomment-3190925674

   The PR got 4 approvals and no objections, merging.


-- 
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: issues-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org