Skip to content
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

HDDS-8718. Kerberos authentication does not work for GrpcOmTransport #4843

Merged
merged 6 commits into from
Jun 15, 2023

Conversation

ivanzlenko
Copy link
Contributor

What changes were proposed in this pull request?

Fixed issue where it is not possible to retrieve UGI for getSecret and revokeSecret requests while OM communicating with client using GPRC transport.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8718

How was this patch tested?

Tested with integration tests introduced in pull request for HDDS-8050

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ivanzlenko for the patch.

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

class S3SecretRequestHelperTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to TestS3SecretRequestHelper. Only tests that follow naming convention Test... are run by Ozone's mvn test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Renamed.

@adoroszlai
Copy link
Contributor

@ashishkumar50 @Tejaskriya please take a look

@adoroszlai
Copy link
Contributor

Thanks @ivanzlenko for updating the patch. The new test is failing with:

java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.ozone.om.request.s3.security.TestS3SecretRequestHelper
...
Caused by: java.lang.NullPointerException
	at org.apache.hadoop.security.authentication.util.KerberosName.getShortName(KerberosName.java:422)
	at org.apache.hadoop.security.User.<init>(User.java:48)
	at org.apache.hadoop.security.User.<init>(User.java:43)
	at org.apache.hadoop.security.UserGroupInformation.createRemoteUser(UserGroupInformation.java:1426)
	at org.apache.hadoop.ozone.om.request.s3.security.TestS3SecretRequestHelper.<clinit>(TestS3SecretRequestHelper.java:34)

https://github.com/ivanzlenko/ozone/actions/runs/5207802223/jobs/9395707878#step:6:2408

Copy link
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ivanzlenko, Thanks for working on this. Whether getOrCreateUgi(accessId) required even for S3SetSecret request as well?

return ugi;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add new line at the end of file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashishkumar50 yeah, it make sense. Thanks for pointing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashishkumar50 I can see new line in IDE though it's omitted in GitHub. Fixed unit tests and set s3 secret request.

@adoroszlai adoroszlai changed the title HDDS-8718. Fix UGI retrieval mechanism for getSecret and revokeSecret HDDS-8718. Kerberos authentication does not work for GrpcOmTransport Jun 8, 2023
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ivanzlenko for the patch, it works fine (tested in ozonesecure env. TLS turned off).

@adoroszlai adoroszlai requested review from kerneltime, duongkame and neils-dev and removed request for ashishkumar50 June 8, 2023 19:10
@adoroszlai adoroszlai dismissed their stale review June 8, 2023 19:11

patch updated

@ivanzlenko
Copy link
Contributor Author

@kerneltime @duongkame @neils-dev can you please take a look at this review?

@adoroszlai adoroszlai merged commit 89e33a8 into apache:master Jun 15, 2023
@ivanzlenko ivanzlenko deleted the HDDS-8718 branch June 16, 2023 08:14
@ivanzlenko
Copy link
Contributor Author

Thanks @adoroszlai !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants