accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-3849 Set correct kerberos primary for Proxy
Date Fri, 22 May 2015 23:56:14 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.7 a39e7d106 -> 24ea8d141
  refs/heads/master 7eeb4e6ab -> 43c383165


ACCUMULO-3849 Set correct kerberos primary for Proxy


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

Branch: refs/heads/1.7
Commit: 24ea8d1411341e1c2a953bad5904079341619ee0
Parents: a39e7d1
Author: Josh Elser <josh.elser@gmail.com>
Authored: Fri May 22 19:55:40 2015 -0400
Committer: Josh Elser <josh.elser@gmail.com>
Committed: Fri May 22 19:55:40 2015 -0400

----------------------------------------------------------------------
 proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/24ea8d14/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
index 187d408..55431fa 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
@@ -238,6 +238,11 @@ public class Proxy implements KeywordExecutable {
         UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
         log.info("Logged in as " + ugi.getUserName());
 
+        // The kerberosPrimary set in the SASL server needs to match the principal we're
logged in as.
+        final String shortName = ugi.getShortUserName();
+        log.info("Setting server primary to {}", shortName);
+        clientConf.setProperty(ClientProperty.KERBEROS_SERVER_PRIMARY, shortName);
+
         KerberosToken token = new KerberosToken();
         saslParams = new SaslServerConnectionParams(clientConf, token, null);
 


Mime
View raw message