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

Authentication provider not set exception when i pass Cassandra credentials #15

Open
raghavbn opened this issue May 27, 2015 · 1 comment
Labels
Milestone

Comments

@raghavbn
Copy link

Authentication fails when I try to connect to Cassandra using username and password.

var apollo = new Apollo(
{
hosts: ['127.0.0.1'],
keyspace: 'goodkeyspace',
username: 'cassandra',
password: 'cassandra'
}
);

Throws an "Authentication provider not set" exception from the 'cassandra-driver' side.

I have currently added the below change in _get_system_client() of apollo-cassandra/libs/apollo.js file to make it work.

var authProvider = new cql.auth.PlainTextAuthProvider('cassandra', 'cassandra');
temp_connection['authProvider'] = authProvider;
return new cql.Client(temp_connection);

Do we need to explicitly set this in the apollo-cassandra node module,OR am i missing something in my configuration?

@ramiel ramiel added the bug label May 27, 2015
@ramiel ramiel added this to the 1.1.0 milestone May 27, 2015
@ramiel
Copy link
Member

ramiel commented May 27, 2015

Node cassandra driver seems to support only PlainTextAuthProvider
http://docs.datastax.com/en/developer/nodejs-driver/2.1/common/drivers/reference/clientOptions.html
and
http://docs.datastax.com/en/drivers/nodejs/2.1/module-auth.html
so it seems we have to support only this kind of authentication.
We have to write test anyway

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

No branches or pull requests

2 participants