Managing roles

As role-management is part of the user security backend, it requires PasswordAuthenticator to be enabled before its functionality is activated. The role system allows you to assign permissions to a role, and then GRANT access to that role for another user/role. As mentioned in the previous section, role management is new as of Apache Cassandra 2.2, and can greatly simplify user-management and permission-assignment.

Here is an example:

CREATE ROLE cassdba WITH SUPERUSER=true AND LOGIN=true AND PASSWORD='bacon123';CREATE ROLE supply_chain_rw WITH LOGIN=true AND PASSWORD='avbiuo2t48';

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.