Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildChallengeResponse: SASL parameter is incorrectly set for Tinkerpop #88

Open
codepope opened this issue Sep 4, 2017 · 4 comments
Open

Comments

@codepope
Copy link

codepope commented Sep 4, 2017

When the BuildChallengeResponse is triggered it sets the SASL key as "SASL":

https://github.com/jbmusso/gremlin-javascript/blob/master/gremlin-client/src/GremlinClient.js#L246

But, examining the Tinkerpop server side, it is looking for the key in lower case "sasl". The difference means the server sees an authentication challenge response with no parameters and returns a 401 Unauthenticated.

I suggest changing the line into:

    var saslbase64=new Buffer('\0' + this.user + '\0' + this.password).toString('base64');
    var args = { sasl: saslbase64 };

Which also does a base64 encoding of the parameters to make them more resilient to string processing and encoding.

@jbmusso
Copy link
Owner

jbmusso commented Nov 9, 2017

Thanks for catching this. I'll try to post a fix this weekend.

@pfilion
Copy link
Contributor

pfilion commented Dec 13, 2017

Hi @jbmusso , we are also having the same problem and the suggested change by @codepope works :) . I'm asking politely if you are currently working on it or is this something we could help by doing the PR.
Thanks

@dpitera
Copy link

dpitera commented Feb 12, 2018

Looks like this can be closed! Which also means #90 can be closed!

@pluradj
Copy link

pluradj commented Feb 12, 2018

Fix e9c4594 merged on Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants