ACCUMULO-4489 Monitor login for access to trace table should fall back to 
general kerberos keytab when trace keytab is not set.

Signed-off-by: Josh Elser <els...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0d41ec6e
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0d41ec6e
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0d41ec6e

Branch: refs/heads/master
Commit: 0d41ec6e64f8c661b476ba74e1670aabd21d85b2
Parents: 9e236f2
Author: Sean Busbey <bus...@cloudera.com>
Authored: Thu Oct 6 09:21:59 2016 -0500
Committer: Sean Busbey <bus...@cloudera.com>
Committed: Mon Oct 17 14:41:32 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/accumulo/monitor/servlets/trace/Basic.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0d41ec6e/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Basic.java
----------------------------------------------------------------------
diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Basic.java
 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Basic.java
index 2143766..1839abe 100644
--- 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Basic.java
+++ 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Basic.java
@@ -83,6 +83,9 @@ abstract class Basic extends BasicServlet {
     Map<String,String> loginMap = 
conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
     // May be null
     String keytab = loginMap.get(Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey() 
+ "keytab");
+    if (keytab == null || keytab.length() == 0) {
+      keytab = conf.getPath(Property.GENERAL_KERBEROS_KEYTAB);
+    }
 
     if (saslEnabled && null != keytab) {
       principal = 
SecurityUtil.getServerPrincipal(conf.get(Property.TRACE_USER));

Reply via email to