You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/05/20 00:13:54 UTC
[GitHub] [ozone] smengcl opened a new pull request #2270: HDDS-5206. Addendum: Support revoking S3 secret
smengcl opened a new pull request #2270:
URL: https://github.com/apache/ozone/pull/2270
This is an addendum to #2239 .
Fixes the typo which wasn't caught in the previous review for s3 getsecret / revokesecret admin permission check.
--
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.
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
[GitHub] [ozone] smengcl commented on pull request #2270: HDDS-5206. Addendum: Support revoking S3 secret
Posted by GitBox <gi...@apache.org>.
smengcl commented on pull request #2270:
URL: https://github.com/apache/ozone/pull/2270#issuecomment-846868600
Thank you @adoroszlai for reviewing.
--
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.
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
[GitHub] [ozone] smengcl merged pull request #2270: HDDS-5206. Addendum: Support revoking S3 secret
Posted by GitBox <gi...@apache.org>.
smengcl merged pull request #2270:
URL: https://github.com/apache/ozone/pull/2270
--
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.
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
[GitHub] [ozone] adoroszlai commented on a change in pull request #2270: HDDS-5206. Addendum: Support revoking S3 secret
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2270:
URL: https://github.com/apache/ozone/pull/2270#discussion_r635787754
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3GetSecretRequest.java
##########
@@ -72,12 +72,13 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
// Generate S3 Secret to be used by OM quorum.
String kerberosID = s3GetSecretRequest.getKerberosID();
- UserGroupInformation user = ProtobufRpcEngine.Server.getRemoteUser();
+ final UserGroupInformation user = ProtobufRpcEngine.Server.getRemoteUser();
+ final String username = user.getUserName();
// Permission check. Users need to be themselves or have admin privilege
- if (!user.getUserName().equals(kerberosID) &&
- !ozoneManager.isAdmin(kerberosID)) {
+ if (!username.equals(kerberosID) &&
+ !ozoneManager.isAdmin(username)) {
Review comment:
Test failure seems to be caused by this change:
```
Error: Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 66.006 s <<< FAILURE! - in org.apache.hadoop.ozone.TestSecureOzoneCluster
Error: testGetS3SecretAndRevokeS3Secret Time elapsed: 8.351 s <<< FAILURE!
java.lang.AssertionError: testGetS3Secret failed
at org.junit.Assert.fail(Assert.java:89)
at org.apache.hadoop.ozone.TestSecureOzoneCluster.testGetS3SecretAndRevokeS3Secret(TestSecureOzoneCluster.java:661)
```
https://github.com/apache/ozone/pull/2270/checks?check_run_id=2626366463#step:4:3991
--
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.
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
[GitHub] [ozone] smengcl commented on a change in pull request #2270: HDDS-5206. Addendum: Support revoking S3 secret
Posted by GitBox <gi...@apache.org>.
smengcl commented on a change in pull request #2270:
URL: https://github.com/apache/ozone/pull/2270#discussion_r636809160
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3GetSecretRequest.java
##########
@@ -72,12 +72,13 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
// Generate S3 Secret to be used by OM quorum.
String kerberosID = s3GetSecretRequest.getKerberosID();
- UserGroupInformation user = ProtobufRpcEngine.Server.getRemoteUser();
+ final UserGroupInformation user = ProtobufRpcEngine.Server.getRemoteUser();
+ final String username = user.getUserName();
// Permission check. Users need to be themselves or have admin privilege
- if (!user.getUserName().equals(kerberosID) &&
- !ozoneManager.isAdmin(kerberosID)) {
+ if (!username.equals(kerberosID) &&
+ !ozoneManager.isAdmin(username)) {
Review comment:
thx. I added new omClient for non-admin test case in UT. Should be good now.
--
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.
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