Github user mattallenuk commented on the issue:

    https://github.com/apache/tinkerpop/pull/889
  
    @jorgebay I've modified the Sasl Authenticator so that a mechanism can now 
be passed in along with any mechanism options. I've changed the Sasl Plain 
Authenticator to mimic the Java handler code as discussed, however I had to do 
some fudging as I couldn't get the flow to work right. 
    
    From my understanding of the Java code the 
Driver/Handler/GremlinSaslAuthenticationHandler class receives a 407 from the 
Gremlin Server and then sends a message containing { saslMechanism: 'PLAIN', 
sasl: (A base64 encoded null byte string) }, the server then returns an initial 
response and the client then sends the actual sasl authentication message... I 
tried that and I was getting a message that "Authentication ID must not be 
null". Having looked at the Gremlin Server code and the 
Handler/SaslAuthenticationHandler class and the Auth/SimpleAuthentication class 
it doesn't appear that saslMechanism token is actually parsed and the the 
server expects the actual sasl message right away. So, currently, in the JS 
SaslAuthenticator class I've passed the full Sasl message with the initial 
SaslMechanism argument. 
    
    I hope that makes sense and if it needs changing I'm happy to do so.


---

Reply via email to