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/07/29 18:18:18 UTC

[GitHub] [ozone] vivekratnavel commented on a change in pull request #2467: HDDS-5501. Support to upload/read keys from encrypted buckets through S3G

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: issues-unsubscribe@ozone.apache.org

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