Browse Source

HDFS-1038. In nn_browsedfscontent.jsp fetch delegation token only if security is enabled.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@947838 13f79535-47bb-0310-9956-ffa450edef68
Boris Shkolnik 15 years ago
parent
commit
8f9df64e12

+ 3 - 0
CHANGES.txt

@@ -20,6 +20,9 @@ Trunk (unreleased changes)
 
 
   BUG FIXES
   BUG FIXES
 
 
+    HDFS-1038. In nn_browsedfscontent.jsp fetch delegation token only 
+    if security is enabled. (jnp via boryas)
+
     HDFS-1044. Cannot submit mapreduce job from secure client to 
     HDFS-1044. Cannot submit mapreduce job from secure client to 
     unsecure sever (boryas)
     unsecure sever (boryas)
 
 

+ 1 - 1
src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java

@@ -297,7 +297,7 @@ class NamenodeJspHelper {
 
 
   static String getDelegationToken(final NameNode nn, final String user
   static String getDelegationToken(final NameNode nn, final String user
                                    ) throws IOException, InterruptedException {
                                    ) throws IOException, InterruptedException {
-    if (user == null) {
+    if (!UserGroupInformation.isSecurityEnabled() ||  user == null) {
       return null;
       return null;
     }
     }
     UserGroupInformation ugi = UserGroupInformation.createRemoteUser(user);
     UserGroupInformation ugi = UserGroupInformation.createRemoteUser(user);