ChenSammi commented on code in PR #11134:
URL: https://github.com/apache/ozone/pull/11134#discussion_r3910350841
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3AssumeRoleRequest.java:
##########
@@ -274,13 +284,129 @@ String getSessionPolicy(OzoneManager ozoneManager,
String originalAccessKeyId, S
final Set<OzoneGrant> grants = Strings.isNullOrEmpty(awsIamPolicy) ?
null :
- IamSessionPolicyResolver.resolve(awsIamPolicy, volumeName,
IamSessionPolicyResolver.AuthorizerType.RANGER);
+ resolveGrantsAgainstBucketLinks(
+ IamSessionPolicyResolver.resolve(awsIamPolicy, volumeName,
IamSessionPolicyResolver.AuthorizerType.RANGER),
+ (linkVolume, linkBucket) ->
ozoneManager.resolveBucketLink(Pair.of(linkVolume, linkBucket), true, false));
Review Comment:
One thing I'm not very sure about is this "false" in
`ozoneManager.resolveBucketLink(Pair.of(linkVolume, linkBucket), true,
false))`
For other linked bucket operations, it's "true" when resolve bucket link,
which means the caller must have the READ permission on the both the linked
bucket, and target bucket. If we turn this "false" to "true", which means that
Role definition need to include both the linked bucket, and source(target)
bucket? @fmorg-git , could you verify this behavior for linked bucket with
Ranger, for example, using existing bucket allowed 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]