Ege Aydın
Ege Aydın

Reputation: 1071

Cassandra: occasional permission errors

I use cqlengine with django. In some occasions Cassandra throws an error indicating that user has no permissions do to something. Sometimes this is select, sometimes this is update or sometimes it is something else. I have no code to share, because there is no specific line that does this. I am very sure that user has all the permissions, and sometimes it works. So if user did not have the permissions it should always throw no permission error.

So what might be the reasons behind this and how to find the problem?

Upvotes: 1

Views: 719

Answers (2)

Vincent Khedkar
Vincent Khedkar

Reputation: 96

If you have authentication enabled, make sure you set appropriate RF for keyspace system_auth (should be equal to number of nodes).

Secondly, make sure the user you have created has following permissions on all keyspaces. {'ALTER', 'CREATE', 'DROP', 'MODIFY', 'SELECT'}. If you have the user as a superuser make sure you add 'AUTHORIZE' as a permission along with the ones listed above for that user.

Thirdly, you can set off a read-repair job for all the data in system_auth keyspace by running CONSISTENCY ALL; SELECT * from system_auth.users ; SELECT * from system_auth.permissions ; SELECT * from system_auth.credentials ;

Hope this will resolve the issue !

Upvotes: 2

questionaire
questionaire

Reputation: 2585

Is the system_auth keyspace RF the same as the amount of nodes? Did you try to run a repair on the system_auth keyspace already? If not do so.

For me it sounds like a consistency issue.

Upvotes: 0

Related Questions