Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18978#discussion_r134018580
  
    --- Diff: 
common/network-common/src/main/java/org/apache/spark/network/sasl/SparkSaslServer.java
 ---
    @@ -182,10 +210,21 @@ public void handle(Callback[] callbacks) throws 
IOException, UnsupportedCallback
               throw new UnsupportedCallbackException(callback, "Unrecognized 
SASL DIGEST-MD5 Callback");
             }
           }
    +      if (pc != null) {
    +        if (conf != null && conf.isConnectionUsingTokens()) {
    +          ClientToAMTokenSecretManager secretManager = new 
ClientToAMTokenSecretManager(null,
    +            decodeMasterKey(secretKeyHolder.getSecretKey(secretKeyId)));
    +          ClientToAMTokenIdentifier identifier = 
getIdentifier(nc.getDefaultName());
    --- End diff --
    
    it would be nice to keep from having to import any of the hadoop security 
classes directly here.  this is also duplicate code from here and AuthEngine.   
So perhaps we can create a function in the HadoopSecurityUtil that does all of 
this. It just needs to take the secretkey and the nc.getDefaultName and return 
an object that has the username and the password.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to