Followed this procedure to enable DSE authentication and authorization.
cqlsh
is able to login super users, but unable to login normal users(superuser=false).
Below is the error when tried to login a normal user:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Failed to authenticate to 127.0.0.1: Error from server: code=0100 [Bad credentials] message="Failed to login. Please re-try."',)})
It was also able to login cassandra
superuser.
Below is the description of system_auth
keyspace:
CREATE KEYSPACE system_auth WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
cassandra@cqlsh> show version;
[cqlsh 5.0.1 | Cassandra 3.0.9.1346 | DSE 5.0.3 | CQL spec 3.4.0 | Native protocol v4]
cassandra@cqlsh>
I am running cassandra locally on my ubuntu box. Please help me out with the error.
EDIT - 03/24/2017
Running Cassandra on 1 node (Ubuntu). The version details of DSE, Cassandra, CQL are above.
$ nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 127.0.0.1 1.3 MB 32 ? aaa1b7c1-6049-4a08-ad3e-3697a0e30e10 rack1
I created users like this as per documentation:
cassandra@cqlsh> create role krishna with password='krishna' and login=true;
cassandra@cqlsh> list roles **(This gave me expected output, krishna is not superuser)**
cassandra@cqlsh> login krishna
Password:
'Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Failed to authenticate to 127.0.0.1: Error from server: code=0100 [Bad credentials] message="Failed to login. Please re-try."',)}
I also tried logging in using cqlsh:
$ cqlsh -u krishna -p krishna
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Failed to authenticate to 127.0.0.1: Error from server: code=0100 [Bad credentials] message="Failed to login. Please re-try."',)})
The same worked when I created a super user:
cassandra@cqlsh> create role superuser with password='superuser' and login=true and superuser=true;
cassandra@cqlsh> login superuser
Password:
superuser@cqlsh> **(Logged in correctly)**
Also with cqlsh:
$ cqlsh -u superuser -p superuser
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.9.1346 | DSE 5.0.3 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
superuser@cqlsh