Posts

Showing posts from September, 2021

Authorization in Cassandra

Image
Authorization in Cassandra  Authorization in Cassandra is disabled by default. This grants all permissions to all roles. But disabling authorization is not used in production deployment. Cassandra has role based access control and using this we can configure proper access profile and schema access limitations. To enable authorization we must enable authorizer in cassandra.yaml file. By default: After enabling authorization: Now restart the node using the following command: ndoetool drain; nodetool stopdaemon; cassandra Once we enable authorization we have to start creating roles.  Let's create a dba role, which has to have all the permissions on all the keyspaces. Create an sales_admin role, which has to have all permissions on that particular keysapce. Create an read_only role, which has to have only select access on all the keyspace. High level roles as place holder for all roles. create role 'dba_role' with login=false; create role 'sales_admin' login=false; crea...

Authentication in Cassandra

Image
Authentication in Cassandra Authentication in Cassandra is disabled by default. Which allows any one on your network to connect to the database.  To enable authentication we must make changes in the main configuration file in Cassandra, the "Cassandra.yaml" file.  The default file: Changes to perform in cassandra.yaml file in order to enable authentication: Make the above changes and save the file. The changes to make effect on the node we must restart the node. Command used for restarting the node: nodetool drain; nodetool stopdaemon; cassandra  Now if we try to connect with the database. It throws the following error. Now it is asking for username and password. The default username and password after enabling authentication is  username = cassandra password = cassandra cqlsh -u cassandra -p cassandra Every one who uses Cassandra knows about this default username and password. So, if we continue with the same user and password then there is no need of enabling authe...