dimas-b commented on code in PR #4420:
URL: https://github.com/apache/polaris/pull/4420#discussion_r3283196503


##########
extensions/auth/ranger/impl/src/main/java/org/apache/polaris/extension/auth/ranger/RangerPolarisAuthorizer.java:
##########
@@ -136,14 +131,8 @@ public void authorizeOrThrow(
     }
 
     try {
-      if (enforceCredentialRotationRequiredState
-          && authzOp != PolarisAuthorizableOperation.ROTATE_CREDENTIALS
-          && polarisPrincipal
-              .getProperties()
-              
.containsKey(PolarisEntityConstants.PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_STATE))
 {
-        throw new ForbiddenException(
-            OPERATION_NOT_ALLOWED_FOR_USER_ERROR, polarisPrincipal.getName(), 
authzOp.name());
-      }
+      AuthorizationPreConditions.checkCredentialRotationRequired(

Review Comment:
   My take is that #4026 may look like a call for a pure refactoring, the 
deeper problem is the unification of 
`ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING` enforcement across 
all Authorizer implementations.
   
   Note that at this point, OSS code requires all principals to be represented 
as Polaris Entities. Therefore, it makes sense to enforece 
`ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING` across the codebase.
   
   However, if @sungwy has a reason for not doing that in the OPA authorizer, 
it will accept that :slightly_smiling_face: 
   
   I still believe we need to resolve this concern before proceeding.



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