hdygxsj commented on code in PR #8269:
URL: https://github.com/apache/gravitino/pull/8269#discussion_r2297850368


##########
server-common/src/main/java/org/apache/gravitino/server/authorization/jcasbin/JcasbinAuthorizer.java:
##########
@@ -309,8 +307,7 @@ private boolean loadPrivilegeAndAuthorize(
         userId = userEntity.id();
         metadataId = MetadataIdConverter.getID(metadataObject, metalake);
       } catch (Exception e) {
-        LOG.debug("Can not get entity id", e);
-        return false;
+        throw new RuntimeException(e);

Review Comment:
   > As `loadPrivilegeAndAuthorize` return `false` means authz failed, how to 
handle get metadata failed?
   
   Because during the authentication process, we access a large amount of 
metadata that does not exist in Gravitino.
   
   For example, if a user has the "select table" privilege on a certain table, 
they should be able to load it. However, the schema metadata might not exist in 
Gravitino. If an exception is thrown during the metadata authorization 
expression validation chain, it would cause the entire authorization check to 
fail.



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