-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDDS-939. Add S3 access check to Ozone manager. Contributed by Ajay Kumar. #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So instead of a md5Hex of Kerberos, we now store accessKey as original Kerberos user.
So that for Ozone S3, in OM when acl check happens, it will be a kerberos user. So, ACL check for ozone s3 happens. (Not sure if my understanding is completely correct here?)
But with this we have a issue, because internally when a bucket is created (S3 bucket), we consider volume name as awsaccessKeyID. With this, our volume name can have '/', '.' characters. The volume creation fails. (Because we do validate the name in RpcClient by calling verifyResourceName) We need to change the logic over there. Previously we don't see any issue because it md5Hex.
I think if the awsAccessKey will not have realm, if it has just name we shall not see the issue.
|
💔 -1 overall
This message was automatically generated. |
That will not work, since there can be same user names in different domains who are completely different users in real life. |
Thank You @anuengineer for info. |
@bharatviswa504 thanks for bringing this up. Updated PR to handle this by normalizing the userId if it is kerberos id. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just has one minor comment.
Need to fix findbug and test failures.
| } | ||
|
|
||
| public static String getVolumeName(String userName) { | ||
| Objects.nonNull(userName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here, it should be requireNotNull(userName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for catching this. fixed in new commit.
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/util/OzoneS3Util.java
Show resolved
Hide resolved
|
And also we can add few tests to verify the volumeName generated from the newly added function validates with the HddsUtils.verifyResourceName()? So, that in future if someone is changing the logic in this place, it can be caught immediately if it causes any issues. |
|
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should call OzoneS3Util.getVolumeName()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor NIT: space after ,
bharatviswa504
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over all patch LGTM.
One minor NIT, I think Yetus will report that.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
@ajayydv |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
failure in TestOzoneRpcClient.testMultipartUpload seems unrelated, passes locally. |
|
+1 LGTM. |
…emDescriptor CollectionStream -> InMemoryInputDescriptor & InMemoryOutputDescriptor CollectionStreamSystemSpec -> InMemorySystemDescriptor Author: Sanil Jain <[email protected]> Reviewers: Prateek Maheshwari <[email protected]>, Cameron Lee <[email protected]> Closes apache#634 from Sanil15/SAMZA-1840
…pache#634) This commit removes hardcoded 'source', 'target', and 'release' versions from the maven-compiler-plugin configuration. This change allows the build to automatically inherit the correct JDK version from the parent POM, ensuring consistency and alignment with project standards.
No description provided.