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/04 19:53:11 UTC

[GitHub] [ozone] xiaoyuyao commented on a change in pull request #2200: HDDS-5165. OM DB checkpoint servlet not accessible in a secure cluster

xiaoyuyao commented on a change in pull request #2200:
URL: https://github.com/apache/ozone/pull/2200#discussion_r626062099



##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java
##########
@@ -79,14 +86,27 @@ public void initialize(DBStore store, DBCheckpointMetrics metrics,
 
     this.aclEnabled = omAclEnabled;
     this.ozAdmins = ozoneAdmins;
+    this.isSpnegoEnabled = isSpnegoEnabled;
+    ReconConfig reconConfig = conf.getObject(ReconConfig.class);
+    String reconPrincipal = reconConfig.getKerberosPrincipal();
+    if (!reconPrincipal.isEmpty()) {
+      UserGroupInformation ugi =
+          UserGroupInformation.createRemoteUser(reconPrincipal);
+      reconSPN = ugi.getShortUserName();
+    } else {
+      reconSPN = StringUtils.EMPTY;

Review comment:
       Do we have guarantee that SCM configuration always have recon related configuration like recon SPN? 




-- 
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