Steps for production environments
To enable access control without downtime or interrupting services, use transitional modes to temporarily support applications and users that do not have accounts.
Procedure
-
Update all applications to provide credentials and ensure that they use the latest HCD driver, see DataStax drivers. When using
authentication.transitional_mode
, you can provide a blank username and password to log in with theanonymous
role.When authentication and authorization are disabled, the credentials portion of the connection request is ignored. After authentication is enabled all connections must provide credentials.
-
Change the replication factor for the security keyspaces, see Configure the security keyspaces replication factors.
-
Run a full repair of the
system_auth
keyspace. -
On each node, enable authentication and authorization in transitional mode:
-
Set
authentication.transitional_mode
topermissive
in thecassandra.yaml
file. -
Set
authorization.transitional_mode
tonormal
in thecassandra.yaml
file.
-
-
Turn on logging to allow verification that applications can authenticate. See Set up database auditing.
-
Enable JMX authentication, see Control access to JMX MBeans.
-
Perform a rolling restart of all nodes in the cluster.
The transactional nodes are vulnerable to malicious activity following the restart. Anybody can access the system using the default
cassandra
account with passwordcassandra
. DataStax recommends isolating the cluster until after disabling thecassandra
account. -
After the restarts are complete, use
cqlsh
to replace thecassandra
default account, see Add a superuser login.Using the default
cassandra
account may impact performance. All requests including login execute with consistency levelQUORUM
. DataStax recommends using this account only to create yourroot
account. -
Switch to the new
root
account and configure roles and assign permissions, see Set up logins and users. -
Use the
audit
logs to verify that all applications can access the transactional nodes and have the permissions required to execute requests. See Log formats. -
In the
cassandra.yaml
file, setauthenticator.parameters.enabled
totrue
and ensure authentication is properly configured. -
Perform a rolling restart.