vivekratnavel commented on a change in pull request #2467:
URL: https://github.com/apache/ozone/pull/2467#discussion_r679382962
##########
File path:
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/Gateway.java
##########
@@ -85,4 +91,27 @@ public void stop() throws Exception {
httpServer.stop();
}
+ private static void loginS3GUser(OzoneConfiguration conf)
+ throws IOException, AuthenticationException {
+ if (OzoneSecurityUtil.isSecurityEnabled(conf)) {
+ if (SecurityUtil.getAuthenticationMethod(conf).equals(
+ UserGroupInformation.AuthenticationMethod.KERBEROS)) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Ozone security is enabled. Attempting login for S3G user.
"
+ + "Principal: {}, keytab: {}",
+ conf.get(OZONE_S3G_KERBEROS_PRINCIPAL_KEY),
+ conf.get(OZONE_S3G_KERBEROS_KEYTAB_FILE_KEY));
+ }
+
+ SecurityUtil.login(conf, OZONE_S3G_KERBEROS_KEYTAB_FILE_KEY,
+ OZONE_S3G_KERBEROS_PRINCIPAL_KEY);
+ } else {
+ throw new AuthenticationException(SecurityUtil.getAuthenticationMethod(
+ conf) + " authentication method not supported. S3 user login "
Review comment:
```suggestion
conf) + " authentication method not supported. S3G user login "
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]