DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

igor.rmarinho_185445 avatar image
igor.rmarinho_185445 asked ·

How to import grants and roles from Source Cassandra DB?

Hi,

I did a copy of one Cassandra DB to a test environment using COPY, but I didn't find a way to transfer all roles and grants from the source.

What would be the way to go?

Where are the grants and roles stored?


I was study about this subject, but I didn't find much information.

Thank you!

cassandrasecurity
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@igor.rmarinho_185445 The system_auth keyspace holds the data on roles and their associated permissions.

Run the following commands to get the complete list of roles and permissions on the source cluster:

cqlsh> LIST ALL ROLES;
cqlsh> LIST ALL PERMISSIONS;

NOTE: Only superusers can list all items.

You can then cherry-pick the roles and permissions you need on the target cluster and construct the necessary CREATE ROLE and GRANT commands from the list. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi Erick,

So if I import the data from this keyspace I can “migrate” all the roles and grants, right?

Thank you again!

0 Likes 0 · ·
Erick Ramirez avatar image Erick Ramirez ♦♦ igor.rmarinho_185445 ·

@igor.rmarinho_185445 I've never tried to do that specifically so I can't recommend it. Cheers!

0 Likes 0 · ·