storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/2] storm git commit: Fix Sasl Plugin to use WorkerToken
Date Thu, 30 Aug 2018 16:20:53 GMT
Repository: storm
Updated Branches:
  refs/heads/master 066c96799 -> 288eb7fad


Fix Sasl Plugin to use WorkerToken


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/9f815caa
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/9f815caa
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/9f815caa

Branch: refs/heads/master
Commit: 9f815caafe82164e1b22ddfacdc227f28cb4afad
Parents: aa6bc4d
Author: Kishor Patil <kpatil@yahoo-inc.com>
Authored: Tue Aug 28 12:34:52 2018 -0400
Committer: Kishor Patil <kpatil@yahoo-inc.com>
Committed: Tue Aug 28 12:34:52 2018 -0400

----------------------------------------------------------------------
 .../security/auth/kerberos/KerberosSaslTransportPlugin.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/9f815caa/storm-client/src/jvm/org/apache/storm/security/auth/kerberos/KerberosSaslTransportPlugin.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/security/auth/kerberos/KerberosSaslTransportPlugin.java
b/storm-client/src/jvm/org/apache/storm/security/auth/kerberos/KerberosSaslTransportPlugin.java
index 2007e9a..081037b 100644
--- a/storm-client/src/jvm/org/apache/storm/security/auth/kerberos/KerberosSaslTransportPlugin.java
+++ b/storm-client/src/jvm/org/apache/storm/security/auth/kerberos/KerberosSaslTransportPlugin.java
@@ -90,7 +90,7 @@ public class KerberosSaslTransportPlugin extends SaslTransportPlugin {
         factory.addServerDefinition(KERBEROS, serviceName, hostName, props, server_callback_handler);
 
         //Also add in support for worker tokens
-        factory.addServerDefinition(DIGEST, ClientAuthUtils.SERVICE, "localhost", null,
+        factory.addServerDefinition(DIGEST, ClientAuthUtils.SERVICE, hostName, null,
                                     new SimpleSaslServerCallbackHandler(impersonationAllowed,
new WorkerTokenAuthorizer(conf, type)));
 
         //create a wrap transport factory so that we could apply user credential during connections
@@ -119,7 +119,7 @@ public class KerberosSaslTransportPlugin extends SaslTransportPlugin {
     @Override
     public TTransport connect(TTransport transport, String serverHost, String asUser) throws
IOException, TTransportException {
         WorkerToken token = WorkerTokenClientCallbackHandler.findWorkerTokenInSubject(type);
-        if (token != null && asUser != null) {
+        if (token != null) {
             CallbackHandler clientCallbackHandler = new WorkerTokenClientCallbackHandler(token);
             TSaslClientTransport wrapperTransport = new TSaslClientTransport(DIGEST,
                                                                              null,


Mime
View raw message