Whenever you’re installing a new DataStax\Apache Cassandra cluster, you need to remember to remove the user cassandra.
We’ve seen this at a couple of customer installations now. If you do not change the user cassandra or at least alter the roles for the user cassandra. then you’re liable to see all sort of nasty repercussions. The cassandra user uses a consistency level of QUORUM when querying keyspaces like ‘system_auth’. Hence, you may see significant performance degradation because each query will need to have confirmation.
In your Cassandra system log files, you’ll most likely see
For security and performance reasons, you will almost always want to remove or alter the cassandra user and create a new super user.
We usually prescribe the following steps to alter the super user and create a new super user.
1. Login with cqlsh.
cqlsh -u cassandra -p cassandra
2. Create a new superuser.
[email protected]> CREATE ROLE [new_superuser] WITH PASSWORD = '[secure_password]' AND SUPERUSER = true AND LOGIN = true;
3. Logout by typing exit at the command prompt.
4. Log back in with your new credentials
cqlsh -u [new_superuser] -p [secure_password]
5. For security purposes, change the cassandra user password
alter user cassandra with password '[new_password]';
6. Remove the super privileges from the cassandra user.
[email protected]> ALTER ROLE cassandra WITH PASSWORD = 'cassandra' AND SUPERUSER = false AND LOGIN = false; [email protected]> REVOKE ALL PERMISSIONS ON ALL KEYSPACES FROM cassandra;
7. Grant all permissions to your super account.
[email protected]> GRANT ALL PERMISSIONS ON ALL KEYSPACES TO [superuser];