whbing commented on code in PR #3938:
URL: https://github.com/apache/ozone/pull/3938#discussion_r1098150708


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/acl/OzoneNativeAuthorizer.java:
##########
@@ -121,6 +121,9 @@ public boolean checkAccess(IOzoneObj ozObject, 
RequestContext context)
     } else if (aclRight == ACLType.READ_ACL || aclRight == ACLType.LIST) {
       parentAclRight = ACLType.READ;
     }
+    if (objInfo.getResourceType() == BUCKET && aclRight == ACLType.CREATE) {
+      parentAclRight = ACLType.CREATE;
+    }

Review Comment:
   > Hey @whbing ! Following your code changes, so will volume's acl be changed 
to 'create' if the user is trying to create a bucket?
   
   @DaveTeng0 Yes. The current logic may lead to ACL enlargement.
   When we just want to grant `user1` WRITE permission to `/vol1/buk1`, we have 
to grant 'user1' WRITE permission to '/vol1', which results in user1 having the 
permission to create buckets. This is not what we expected.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to