Implementing without downtime in production
To enable access control without downtime, use transitional modes to temporarily support applications and users that do not have accounts without interrupting services.
Procedure
-
Update all applications to provide credentials and ensure that they use the latest DSE 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 Setting security keyspaces replication factors.
-
Run a full repair of the system_auth and dse_auth keyspace.
-
On each node, enable authentication and authorization in transitional mode:
-
Set https://docs.datastax.com/dse/5.1/dse-admin/datastax_enterprise/config/configDseYaml.html#configDseYamlauthentication_options[authentication_options] https://docs.datastax.com/dse/5.1/dse-admin/datastax_enterprise/config/configDseYaml.html#configDseYamltransitional_mode[transitional_mode] to
permissive
-
Set https://docs.datastax.com/dse/5.1/dse-admin/datastax_enterprise/config/configDseYaml.html#configDseYamlauthorization_options[authorization_options] https://docs.datastax.com/dse/5.1/dse-admin/datastax_enterprise/config/configDseYaml.html#configDseYamlauth_transitional_mode[transitional_mode] to
normal
. See Enabling DSE Unified Authentication.
-
-
Turn on logging to allow you to verify that applications are able to authenticate, see Enabling data auditing in DataStax Enterprise.
-
Enable JMX authentication, see Controlling access to JMX MBeans.
-
Perform a rolling restart.
The transactional nodes are vulnerable to malicious activity following the restart. Anybody can access the system using the default cassandra account with password cassandra. DataStax recommends isolating the cluster until after disabling the cassandra account.
-
After the restarts are complete, use cqlsh to replace the cassandra default account, see Creating superuser accounts.
Using the default cassandra account may impact performance, all requests including login execute with consistency level QUORUM. DataStax recommends only using this account to create your root account.
-
Switch to the new root account and configure roles and assign permissions, see Managing roles.
-
Use the audit logs or when using Kerberos the KDC logs to verify that all applications are able to access the transactional nodes and have the permissions required to execute requests, see Formats of DataStax Enterprise logs.
-
In the dse.yaml, set
authentication_options
andauthorization_options
transitional_mode
todisabled
. -
Perform a rolling restart.