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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]