Mitigation Strategy: Enable Cassandra Authentication
- Description:
- Edit
cassandra.yaml
: Locate theauthenticator
property in yourcassandra.yaml
configuration file. - Set Authenticator: Change the value of
authenticator
fromAllowAllAuthenticator
(default, insecure) to a secure authenticator likePasswordAuthenticator
. - Restart Cassandra Nodes: Restart all Cassandra nodes in your cluster for the configuration change to take effect.
- Create Users: Use
cqlsh
or a Cassandra client to create administrative users with strong passwords using CQL commands likeCREATE USER 'admin' WITH PASSWORD 'StrongPassword' SUPERUSER;
. - Grant Permissions: Grant appropriate permissions to users based on their roles using
GRANT
statements. For example,GRANT ALL PERMISSIONS ON KEYSPACE keyspace_name TO 'user';
.
- Edit
- Threats Mitigated:
- Unauthorized Access (High Severity): Prevents anyone without credentials from directly accessing and manipulating Cassandra data through Cassandra interfaces (CQL, Thrift if enabled).
- Data Breaches (High Severity): Reduces the risk of data leaks due to unauthorized direct access to Cassandra.
- Data Manipulation (High Severity): Prevents unauthorized modification or deletion of data directly through Cassandra.
- Impact:
- Unauthorized Access: High Risk Reduction
- Data Breaches: High Risk Reduction
- Data Manipulation: High Risk Reduction
- Currently Implemented: Yes, enabled in the production and staging Cassandra clusters. Configured using
PasswordAuthenticator
and user roles are managed via scripts during infrastructure provisioning. - Missing Implementation: Authentication is not enforced in the development environment Cassandra instances for ease of local development. This should be addressed by providing secure default credentials for development or using containerized instances with authentication enabled.
Mitigation Strategy: Implement Role-Based Access Control (RBAC)
- Description:
- Define Roles: Identify different user roles within your application's interaction with Cassandra (e.g., admin, read-only, application user).
- Create Cassandra Roles: Use CQL commands in
cqlsh
to create roles corresponding to your application roles. For example,CREATE ROLE 'app_read_role' WITH LOGIN = false;
. SetLOGIN = false
for roles not intended for direct user login. - Grant Permissions to Roles: Grant specific permissions to each role based on the principle of least privilege within Cassandra. For example,
GRANT SELECT ON KEYSPACE keyspace_name TO ROLE 'app_read_role';
. - Assign Roles to Users: Assign roles to Cassandra users. For example,
GRANT ROLE 'app_read_role' TO 'application_user';
. - Application Integration: Ensure your application authenticates as a specific Cassandra user with assigned roles, rather than using a generic superuser account when connecting to Cassandra.
- Threats Mitigated:
- Privilege Escalation within Cassandra (Medium Severity): Limits the impact of compromised Cassandra accounts by restricting their permissions within Cassandra.
- Accidental Data Modification/Deletion (Medium Severity): Reduces the risk of unintended data changes by users with overly broad Cassandra permissions.
- Insider Threats (Medium Severity): Limits potential damage from malicious insiders with direct Cassandra access by enforcing least privilege within Cassandra.
- Impact:
- Privilege Escalation within Cassandra: Medium Risk Reduction
- Accidental Data Modification/Deletion: Medium Risk Reduction
- Insider Threats: Medium Risk Reduction
- Currently Implemented: Partially implemented. Basic roles like
admin
andread-only
are defined and used in production. - Missing Implementation: Granular roles for specific application functionalities are not fully defined and implemented within Cassandra's RBAC. Need to expand RBAC to cover more fine-grained permissions based on application features and user workflows interacting with Cassandra. Also, role management is currently manual; consider automating role assignment and revocation within Cassandra.
Mitigation Strategy: Enable Encryption in Transit (TLS/SSL) for Client-to-Node Communication
- Description:
- Generate Keystore and Truststore: Create Java keystore and truststore files containing certificates for TLS/SSL. You can use
keytool
utility. - Configure
cassandra.yaml
:- Set
client_encryption_options.enabled: true
. - Specify paths to your keystore and truststore files using
client_encryption_options.keystore
andclient_encryption_options.truststore
. - Set keystore and truststore passwords using
client_encryption_options.keystore_password
andclient_encryption_options.truststore_password
. - Configure cipher suites and protocols as needed in
client_encryption_options
.
- Set
- Restart Cassandra Nodes: Restart all Cassandra nodes for the changes to take effect.
- Configure Client Applications: Update your application's Cassandra driver configuration to enable TLS/SSL and point to the truststore containing the Cassandra server certificate to establish secure connections to Cassandra.
- Generate Keystore and Truststore: Create Java keystore and truststore files containing certificates for TLS/SSL. You can use
- Threats Mitigated:
- Eavesdropping on Cassandra Client Traffic (High Severity): Prevents attackers from intercepting and reading data transmitted between applications and Cassandra nodes.
- Man-in-the-Middle (MITM) Attacks on Cassandra Client Connections (High Severity): Protects against attackers intercepting and manipulating communication between applications and Cassandra.
- Impact:
- Eavesdropping on Cassandra Client Traffic: High Risk Reduction
- Man-in-the-Middle (MITM) Attacks on Cassandra Client Connections: High Risk Reduction
- Currently Implemented: Yes, TLS/SSL is enabled for client-to-node communication in production and staging environments. Certificates are managed by our internal certificate authority.
- Missing Implementation: Need to automate certificate rotation for TLS/SSL to ensure ongoing security and reduce manual maintenance for Cassandra client connections.
Mitigation Strategy: Enable Encryption in Transit (TLS/SSL) for Internode Communication
- Description:
- Configure
cassandra.yaml
:- Set
internode_encryption: all
to encrypt all internode traffic within the Cassandra cluster. Alternatively, usedc
orrack
for more granular control if needed. - Configure keystore and truststore paths and passwords under
server_encryption_options
incassandra.yaml
, similar to client encryption.
- Set
- Restart Cassandra Nodes: Restart all Cassandra nodes in a rolling fashion to apply the configuration changes without downtime.
- Verify Configuration: After restart, check Cassandra logs to confirm that internode encryption is enabled and functioning correctly within the Cassandra cluster.
- Configure
- Threats Mitigated:
- Eavesdropping on Cassandra Internode Traffic (Medium Severity): Prevents attackers who have compromised the internal network from eavesdropping on data exchanged between Cassandra nodes within the cluster.
- Data Breaches within the Cassandra Cluster Network (Medium Severity): Reduces the risk of data leaks if internal network traffic between Cassandra nodes is compromised.
- Impact:
- Eavesdropping on Cassandra Internode Traffic: Medium Risk Reduction
- Data Breaches within the Cassandra Cluster Network: Medium Risk Reduction
- Currently Implemented: No, internode encryption is currently not implemented in any environment.
- Missing Implementation: Internode encryption needs to be implemented in production and staging environments. This is a critical missing Cassandra-specific security measure, especially in environments where network security within the Cassandra cluster is not fully trusted or in cloud environments. Implementation should be prioritized.