user2761895
user2761895

Reputation: 1541

You have to be logged in and not anonymous to perform this request in cassandra even though I access it with cassandra userid

This is Cassandra 2.1.13 day2 for me. I've been through 10 min. cassandra tutorial at http://www.planetcassandra.org/try-cassandra/ on my local machine.

% cqlsh -u cassandra -p cassandra
% // create demo keyspace
% // create users table
% //insert a couple of row in the users table

Now I have a problem as you see below.

cassandra@cqlsh:demo> list users;
Unauthorized: code=2100 [Unauthorized] message="You have to be logged in and not anonymous to perform this request"

I accessed to cassandra with username cassdanra, why this message came up? Do I need to set up something else?

Upvotes: 8

Views: 16896

Answers (1)

RobChooses
RobChooses

Reputation: 428

This message comes up if you also have in your cassandra.yaml config settings, authenticator: AllowAllAuthenticator. Even though you're logging in as user cassandra, when you have AllowAllAuthenticator it is effectively allowing all users and therefore does not check if you have logged in. To overcome this message, you should change the setting to authenticator: PasswordAuthenticator and then restart cassandra.

Upvotes: 20

Related Questions