You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "whbing (via GitHub)" <gi...@apache.org> on 2023/02/07 04:00:31 UTC

[GitHub] [ozone] whbing commented on a diff in pull request #3938: HDDS-7461. Change parent context right WRITE to CREATE when CRATE_BUCKET

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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org