smengcl commented on code in PR #7434:
URL: https://github.com/apache/ozone/pull/7434#discussion_r1844907316


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -2971,12 +2971,13 @@ public SnapshotInfo getSnapshotInfo(String volumeName, 
String bucketName,
     Map<String, String> auditMap = buildAuditMap(volumeName);
     auditMap.put(OzoneConsts.BUCKET, bucketName);
     try {
-      if (isAclEnabled) {
-        omMetadataReader.checkAcls(ResourceType.BUCKET, StoreType.OZONE,
-            ACLType.READ, volumeName, bucketName, null);
-      }
+      // Updating the volumeName & bucketName in case the bucket is a linked 
bucket. We need to do this before a
+      // permission check, since linked bucket permissions and source bucket 
permissions could be different.

Review Comment:
   I find this comment misleading.
   
   When accessing a linked bucket, the ACL should be checked along the way. Not 
just on the (final) destination bucket.
   
   That means, if:
   ```
   C (linked) -> B (linked) -> A regular bucket
   ```
   
   The user has to at least have READ permission on all of C, B and A buckets 
to be able to pass the ACL check.
   
   ANY lack of permission along the chain should result in "operation denied".
   
   At least that is how the current Ozone ACL design imposes checks on all 
other operations.



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