-
Notifications
You must be signed in to change notification settings - Fork 28
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
Connect using authentication - Cipher list not correct #104 [JIRA: CLIENTS-640] #104
Comments
Do you have Riak Security enabled? http://docs.basho.com/riak/latest/ops/running/authz/#Security-Checklist |
Hi Luke, Thanks for your reply. Yes, security is configured and enabled on the cluster. Currently I am using riak-pbc for connection to Riak, but I'd like to switch to the official client. In riak-pbc i am using the following code to connect (and its working).
|
I don't think that security is enabled, since an empty user is not allowed. Can you provide the output of these commands?
|
I removed user credentials for security reasons, sorry for not marking it accordingly. Below the output of your requested commands. (removed) means a removed user, password or host.
I am quite sure that the security setup is not the problem, as multiple applications (ruby, java, nodejs-pbc) are working with username and password. |
Thanks for that information, your previous examples were confusing since they showed empty credentials. Can you provide the Please also enable debug logging (example of how: https://github.com/basho/riak-nodejs-client/blob/master/test/debug-log.js) and re-try your connection. We may get more information in that output. I am re-running the tests I have: https://github.com/basho/riak-nodejs-client/blob/master/test/security/security.js I will add a test for connecting a |
Yeah sorry for that, I should have pointed that out.
Output of application: (I did change the Ip adresses)
|
Aha, I just diagnosed this issue the other day. You can read about it here: basho/riak-erlang-client#232 The default cipher list chooses a cipher that the Erlang VM running Riak can't use. I wonder how the other Node.js client you're using is choosing ciphers - can you provide a link to that client? Here is an immediate workaround. Change this: https://github.com/basho/riak-nodejs-client/blob/master/lib/core/riakconnection.js#L55-L57 To this: if (options.auth) {
this.auth = options.auth;
this.auth.ciphers = 'DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:AES128-SHA256:AES128-SHA:AES256-SHA256:AES256-SHA:RC4-SHA';
} You can also use this method to set the cipher list via command-line arguments. I will provide a fix for this in a future client release. |
Works like a charm! Thanks for helping me to debug this problem. The other library can be found here: Thanks again! We removed lots of insecure ciphers, maybe it had something to do with that? (I will leave the issue open for the cipher fix) |
Yep, I bet that was it. How did you remove the insecure ciphers? The |
It has been quite a while ago since we have done that, but for what I remember we altered the ciphers in openssl somewhere. I tried to google it again and I found out that I have clicked this page one day: |
OK good to know. It was a global openssl change on the server running nodejs. Still, I have no idea how |
[~dsomogyi] to be honest this probably affects every client somehow. _[posted via JIRA by Luke Bakken]_ |
Hi,
How can I connect to a cluster using authentication?
Currently I am using
But I cant seem to get a connection so far ( RiakConnection Timed out trying to connect)
I can't seem to find documentation for connecting using credentials either. Is there documentation avialable?
Looking forward to your reply
The text was updated successfully, but these errors were encountered: