NoSQL: Cassandra introduces Role Based Authentication

Prior to Cassandra 2.2, It supports only User base authentication, but now Cassandra introduces new Role based authentication.

In this post, I am sharing small demonstration to create a Role in Cassandra and How to assign different permissions to that role.
You can directly use this Role for authentication and you can also assign same Role permission to another role.

First, login with Cassandra super user.

Create keyspace if not exists:

Create few sample tables:

Create one sample Role without Superuser access:
If you get this error : “org.apache.cassandra.auth.CassandraRoleManager doesn’t support PASSWORD”, visit this solution.

Grant different permissions to this Role:

If you get any error like ” GRANT operation is not supported by AllowAllAuthorizer”, you have to modify the value of “authorizer” in cassandra.yaml file.

Grant over the all keyspaces:

Create new test Role and make it a replica of the current role:

List out all Roles and its permissions:

Cassandra User Role

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz