-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15850. Superuser actions should be reported to external enforcers #2784
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
|
💔 -1 overall
This message was automatically generated. |
|
💔 -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.
Thanks @vivekratnavel for working on this. The patch LGTM overall, a few comments added inline. Can you also double check the Jenkins results and confirm if any of the test failures are related to this change?
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.
Can you rephrase the comments to make it clear what super user can do and what a non-super user owner can do w.r.t. SetOwner operation:
superuser: change owner to a different user, change owner group to any group
owner: can't change owner to a different user but can change owner group to different group that the user belongs to.
...fs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
Outdated
Show resolved
Hide resolved
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.
should we add the cache pool name as part of the context info as normal HDFS audit has that?
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.
That's a good suggestion @xiaoyuyao. We cannot add the cache pool name for "addCachePool()" method since the superuser check needs to happen before adding the cache pool and we get the name only after it's added. But, I will set the cache pool name in context for modify and remove methods.
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.
Can we get it from other calls after Line 7670?
String poolNameStr = "{poolName: " +
(req == null ? null : req.getPoolName()) + "}";
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.
same as above.
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.
Same as above.
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.
Can we add path info as the context for better auditing?
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.
Can we add the zone as context info for better auditing?
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Outdated
Show resolved
Hide resolved
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.
Can we rephrase "Checks if the user belongs to superuser group." to "Checks if the user is a superuser or belongs to superuser group."
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.
can we pass the path parameter to add more context for better auditing?
|
Hi @xiaoyuyao, thanks for the review. I have updated the patch addressing all your comments. Please take another look. I also checked the unit test failures in the previous patch and none seemed to be related to my changes. I will check them again after CI finishes for the latest patch. |
|
💔 -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.
Thanks @vivekratnavel for the update. The latest patch LGTM, just have one minor comments.
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.
Can we get it from other calls after Line 7670?
String poolNameStr = "{poolName: " +
(req == null ? null : req.getPoolName()) + "}";
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Outdated
Show resolved
Hide resolved
...hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeAttributeProvider.java
Outdated
Show resolved
Hide resolved
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.
A few comments added. Please check the places where pc.isSuperUser() is used and make sure the external authorizer got notified.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -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.
Thanks @vivekratnavel for the update. The latest patch LGTM, +1 pending CI.
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Outdated
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
hadoop-hdfs-project/hadoop-hdfs/dev-support/findbugsExcludeFile.xml
Outdated
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
The unit test failures reported are not related to this patch. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
d443432 to
1c6a130
Compare
|
Thanks @vivekratnavel for update. The latest change LGTM, +1 pending CI. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
Thanks @vivekratnavel for the update. The latest change LGTM, +1. |
apache#2784) (cherry picked from commit c821008) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Change-Id: I7843b7bdbbf43956cf1ceb47fc94cb99ae901468
https://issues.apache.org/jira/browse/HDFS-15850