CIS Apache Cassandra 4.0 v1.1.0 PDF
CIS Apache Cassandra 4.0 v1.1.0 PDF
CIS Apache Cassandra 4.0 v1.1.0 PDF
4.0 Benchmark
v1.1.0 - 08-29-2024
For information on referencing and/or citing CIS Benchmarks in 3rd party documentation
(including using portions of Benchmark Recommendations) please contact CIS Legal
(CISLegal@cisecurity.org) and request guidance on copyright usage.
NOTE: It is NEVER acceptable to host a CIS Benchmark in ANY format (PDF, etc.)
on a 3rd party (non-CIS owned) site.
Page 1
Page 2
Page 3
These tools make the hardening process much more scalable for large numbers of
systems and applications.
NOTE: Some tooling focuses only on the CIS Benchmarks™ Recommendations that
can be fully automated (skipping ones marked Manual). It is important that
ALL Recommendations (Automated and Manual) be addressed, since all
are important for properly securing systems and are typically in scope for
audits.
In addition, CIS has developed CIS Build Kits for some common technologies to assist
in applying CIS Benchmarks™ Recommendations.
Page 4
NOTE: CIS and the CIS Benchmarks™ development communities in CIS WorkBench
do their best to test and have high confidence in the Recommendations, but
they cannot test potential conflicts with all possible system deployments.
Known potential issues identified during CIS Benchmarks™ development are
documented in the Impact section of each Recommendation.
By using CIS and/or CIS Benchmarks™ Certified tools, and being careful with
remediation deployment, it is possible to harden large numbers of deployed systems in
a cost effective, efficient, and safe manner.
NOTE: As previously stated, the PDF versions of the CIS Benchmarks™ are
available for free, non-commercial use on the CIS Website. All other formats
of the CIS Benchmarks™ (MS Word, Excel, and Build Kits) are available for
CIS SecureSuite® members.
Intended Audience
This document is intended for system and application administrators, security
specialists, auditors, help desk, and platform deployment personnel who plan to
develop, deploy, assess, or secure solutions that incorporate Apache Cassandra.
Page 5
Page 7
Convention Meaning
Page 8
Title
Concise description for the recommendation's intended configuration.
Assessment Status
An assessment status is included for every recommendation. The assessment status
indicates whether the given recommendation can be automated or requires manual
steps to implement. Both statuses are equally important and are determined and
supported as defined below:
Automated
Represents recommendations for which assessment of a technical control can be fully
automated and validated to a pass/fail state. Recommendations will include the
necessary information to implement automation.
Manual
Represents recommendations for which assessment of a technical control cannot be
fully automated and requires all or some manual steps to validate that the configured
state is set as expected. The expected state can vary depending on the environment.
Profile
A collection of recommendations for securing a technology or a supporting platform.
Most benchmarks include at least a Level 1 and Level 2 Profile. Level 2 extends Level 1
recommendations and is not a standalone profile. The Profile Definitions section in the
benchmark provides the definitions as they pertain to the recommendations included for
the technology.
Description
Detailed information pertaining to the setting with which the recommendation is
concerned. In some cases, the description will include the recommended value.
Rationale Statement
Detailed reasoning for the recommendation to provide the user a clear and concise
understanding on the importance of the recommendation.
Page 9
Audit Procedure
Systematic instructions for determining if the target system complies with the
recommendation.
Remediation Procedure
Systematic instructions for applying recommendations to the target system to bring it
into compliance according to the recommendation.
Default Value
Default value for the given setting in this recommendation, if known. If not known, either
not configured or not defined will be applied.
References
Additional documentation relative to the recommendation.
Additional Information
Supplementary information that does not correspond to any other field but may be
useful to the user.
Page 10
• Level 1 - Cassandra
Note: The intent of this profile is to include checks that can be assessed by
remotely connecting to Cassandra. Therefore, file system-related checks are not
contained in this profile.
• Level 2 - Cassandra
This profile extends the “Level 1 - Cassandra” profile. Items in this profile apply to
Apache Cassandra and exhibit one or more of the following characteristics:
Note: The intent of this profile is to include checks that can be assessed by
remotely connecting to Cassandra. Therefore, file system-related checks are not
contained in this profile.
This profile extends the “Level 1 - Cassandra” profile. Items in this profile apply to
Apache Cassandra running on Linux and intend to:
This profile extends the “Level 1 - Cassandra on Linux” profile. Items in this
profile apply to Apache Cassandra running on Linux and exhibit one or more of
the following characteristics:
Page 11
Page 12
Author
Joseph Testa
Editor
Randall Mowen
Contributor
Tony Wilwerding
Chirag Shah
Apache Cassandra Community
Page 13
Page 14
Description:
Create separate userid and group for Cassandra.
Rationale:
All processes need to run as a user with least privilege. This mitigates the potential
impact of malware to the system.
Audit:
Logon to the server where Cassandra is installed.
To confirm existence of the group, execute the following command:
$ getent group | grep cassandra
To confirm existence of the user, execute the following command:
$ getent passwd | grep cassandra
If either the group or user do not exist, or if the user is not a member of the group, this is
a finding.
Remediation:
Create a group for cassandra(if it does not already exist)
sudo groupadd cassandra
Create a user which is only used for running Cassandra and its related processes.
sudo useradd -m -d /home/cassandra -s /bin/bash -g cassandra -u
<USERID_NUMBER> cassandra
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 15
Page 16
Description:
A prerequisite to installing Cassandra is the installation of Java. The version of Java
installed should be the most recent that is compatible with the organization's operational
needs.
Rationale:
Using the most recent Java SDK version can help limit the possibilities for vulnerabilities
in the software, the installation version applied during setup should be established
according to the needs of the organization. Ensure you are using a release that is
covered by a level of support which includes regular updates to address vulnerabilities.
Audit:
Remediation:
References:
1. http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-
138363.html#javasejdk
2. http://openjdk.java.net/
3. http://openjdk.java.net/install/index.html
4. http://cassandra.apache.org/doc/latest/getting_started/installing.html#prerequisite
s
5. https://www.java.com/en/download/help/index_installing.xml?os=All+Platforms&j
=8&n=20
Page 17
Controls
Control IG 1 IG 2 IG 3
Version
Page 18
Description:
A prerequisite to installing Cassandra is the installation of Python. The version of
Python installed should be the most recent that is compatible with the organizations'
operational needs.
Rationale:
Using the most recent Python can help limit the possibilities for vulnerabilities in the
software, the installation version applied during setup should be established according
to the needs of the organization. Ensure you are using a release that is covered by a
level of support which includes regular updates to address vulnerabilities.
Audit:
References:
1. https://www.python.org/downloads/
2. http://cassandra.apache.org/doc/latest/getting_started/installing.html#prerequisite
s
Page 19
Controls
Control IG 1 IG 2 IG 3
Version
Page 20
Description:
The Cassandra installation version, along with the patches, should be the most recent
that is compatible with organization's operational needs. When obtaining and installing
software packages (typically via apt-get or you can compile the source code), it's
imperative that packages (or the source code, tarball) are sourced only from valid and
authorized repositories.
For Cassandra, a short list of valid repositories may include:
Rationale:
Using the most recent version of Cassandra can help limit the possibilities for
vulnerabilities in the software, the installation version applied during setup should be
established according to the needs of the organization. Ensure you are using a release
that is covered by a level of support which includes regular updates to address
vulnerabilities.
Audit:
To verify the version of Cassandra you have installed:
cassandra -v
1. Using the nodetool drain command to push all memtables data to SSTables.
2. Stop Cassandra services.
3. Backup the data set and all of your Cassandra configuration files.
4. Download/Update Java if needed.
5. Download/Update Python if needed.
Page 21
References:
1. http://cassandra.apache.org/doc/latest/getting_started/installing.html#prerequisite
s
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 22
Description:
Though Cassandra database may be run as root, it should run as another non-root
user.
Rationale:
One of the best ways to reduce your exposure to attack is to create a unique,
unprivileged user and group for the server application. A best practice is to follow is
ensuring processes run with a user with least privilege.
Audit:
Logon to the server where Cassandra is running and run the following command
ps -aef | grep cassandra | grep java | cut -d' ' -f1
This will show who is running the Cassandra binary.
If the user is root or has excessive privileges then this is a finding.
Remediation:
Create a group for cassandra (if it does not already exist)
sudo groupadd cassandra
Create a user which is only used for running Cassandra and its related processes.
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 23
Page 24
Description:
Enabling Network Time Protocol (NTP), or some equivalent way, to keep clocks on all
nodes in sync is critical.
Rationale:
Cassandra decides which data is most current between all of the nodes in the cluster
based on timestamps. It is paramount to ensure all clocks are in-sync, otherwise the
most current data may not be returned or worse, marked for deletion.
Audit:
Depending on the Linux installation this may be checked by executing the following
command on each node:
ps -aef | grep ntp
OR
OR
Controls
Control IG 1 IG 2 IG 3
Version
Page 25
Page 27
Description:
Authentication is pluggable in Cassandra and is configured using the authenticator
setting in cassandra.yaml. Cassandra ships with two options included in the default
distribution, AllowAllAuthenticator and PasswordAuthenticator. The default,
AllowAllAuthenticator, performs no authentication checks and therefore requires no
credentials. It is used to disable authentication completely. The second option,
PasswordAuthenticator, stores encrypted credentials in a system table. This can be
used to enable simple username/password authentication.
Rationale:
Authentication is a necessary condition of Cassandra’s permissions subsystem, so if
authentication is disabled then so are permissions. Failure to authenticate clients, users,
and/or servers can allow unauthorized access to the Cassandra database and can
prevent tracing actions back to their sources. The authentication mechanism should be
implemented before anyone accesses the Cassandra server.
Audit:
Run the following command to verify whether authentication is enabled (authenticator
values set to PasswordAuthenticator) on the Cassandra server.
The Cassandra configuration files can be found in the conf directory of tarballs. For
packages, the configuration files will be located in /etc/cassandra.
cat cassandra.yaml | grep -in "authenticator:"
Remediation:
To enable the authentication mechanism:
Default Value:
authenticator: AllowAllAuthenticator
Page 28
1. http://cassandra.apache.org/doc/latest/getting_started/configuring.html
2. http://cassandra.apache.org/doc/latest/operating/security.html
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 29
Description:
Authorization is pluggable in Cassandra and is configured using the authorizer setting
in cassandra.yaml. Cassandra ships with two options included in the default
distribution, AllowAllAuthenticator and CassandraAuthorizer. The default,
AllowAllAuthenticator performs no checking which grants all permissions to all
roles. The second option, CassandraAuthorizer, implements full permissions
management functionality and stores its data in Cassandra system tables.
Rationale:
Authorizing roles is an important step towards ensuring only authorized access to the
Cassandra database tables is permitted. It also provides the requisite means of
implementing least privilege best practices. The authorization mechanism should be
implemented before anyone accesses the Cassandra database.
Audit:
Run the following command to verify whether authorization is enabled (authorization
values set to CassandraAuthorizer) on the Cassandra server.
The Cassandra configuration files can be found in the conf directory of tarballs. For
packages, the configuration files will be located in /etc/cassandra.
cat cassandra.yaml | grep -in "authorizer:"
If authorizer is set to AllowAllAuthorizer, then this is a finding.
Remediation:
To enable the authorization mechanism:
Default Value:
authorizer: AllowAllAuthorizer
Page 30
1. http://cassandra.apache.org/doc/latest/getting_started/configuring.html
2. http://cassandra.apache.org/doc/latest/operating/security.html
Additional Information:
The authorizer must be configured to AllowAllAuthorizer if
AllowAllAuthenticator is the configured authenticator.
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 31
Page 32
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
The default installation of Cassandra includes a superuser role named cassandra. This
necessitates the creation of a separate role to be the superuser role.
Rationale:
Superuser permissions allow for the creation, deletion, and permission management of
other users. Considering the cassandra role is well known it should not be a superuser
or one which is used for any administrative tasks.
Impact:
If a separate superuser account is not created and tested for correct functionality prior
to removing the superuser role from the cassandra account you will no longer be able
to perform certain actions, including:
Audit:
To verify the configuration, run the following query:
select role from system_auth.roles where is_superuser= True;
If you get an error 2200 [ INVALID QUERY] due to where clause, add "ALLOW
FILTERING to end of query so it looks like this:
select role from system_auth.roles where is_superuser= True ALLOW FILTERING;
Looking at the role, verify any show up with is_superuser = True and make sure it is not
cassandra or any unapproved role. If any are found then, this is a finding.
Remediation:
To remediate a misconfiguration, perform the following steps:
Page 33
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 34
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
The cassandra role has a default password which must be changed.
Rationale:
Failure to change the default password for the cassandra role may pose a risk to the
database in the form of unauthorized access.
Audit:
Connect to Cassandra database to verify whether the cassandra role has default
password.
cqlsh -u cassandra -p cassandra
If the connection is successful this is a finding.
Remediation:
Change the password for the casssandra role by issuing the following command:
cqlsh -u cassandra -p cassandra
Default Value:
cassandra
References:
1. http://cassandra.apache.org/doc/latest/operating/security.html
Page 35
Controls
Control IG 1 IG 2 IG 3
Version
Page 36
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
Verify each role is require and has only the privileges needed to do its job.
Rationale:
Roles which are unneeded, have super user or other potentially excessive privileges
may be an avenue for a hacker to gain access to or modify data in the database.
Audit:
As a superuser, retrieve all roles:
list roles;
1. http://cassandra.apache.org/doc/latest/cql/security.html
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 37
Page 38
Description:
As with any service installed on a host, it can be provided with its own user context.
Providing a dedicated user to the service provides the ability to precisely constrain the
service within the larger host context.
Rationale:
Utilizing a non-privileged account for Cassandra to execute as may reduce the impact of
a Cassandra-born vulnerability. A restricted account will be unable to access resources
unrelated to Cassandra, such as operating system configurations.
Audit:
Execute the following command at a terminal prompt to assess this recommendation:
ps -ef | egrep "^cassandra.*$"
Remediation:
Create a user which is only used for running Cassandra and directly related processes.
This user must not have administrative rights to the system.
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 39
Page 40
Description:
When listen_address is blank and listen_interface is commented out, this will be
set automatically by InetAddress.getLocalHost(). Presuming the node is configured
correctly, e.g. hostname, name resolution, etc., this will configure the node to use the
address associated with the hostname. The listen_address must not be set to
0.0.0.0.
Rationale:
Setting the address or interface to bind to will tell other Cassandra nodes to which
address or interface to connect. This must be changed from the default in order for
multiple nodes to be able to communicate.
Audit:
Check the value of listen_address or listen_interface in the cassandra.yaml. If
listen_address is set 0.0.0.0 or a non-authorized address or interface is specified,
this is a finding.
Remediation:
Set the listen_address or listen_interface, not both, in the cassandra.yaml to
an authorized address or interface.
Default Value:
listen_address: localhost
listen_interface: eth0, but is commented out by default.
References:
1. http://cassandra.apache.org/doc/3.11/configuration/cassandra_config_file.html#li
sten-address
2. http://cassandra.apache.org/doc/3.11/configuration/cassandra_config_file.html#li
sten-interface
Page 41
Controls
Control IG 1 IG 2 IG 3
Version
Page 42
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
Authorization at Data Center level is pluggable in Cassandra and is configured using the
network_authorizer setting in cassandra.yaml. Cassandra ships with
AllowAllNetworkAuthorizer which allows any role to access any datacenter
effectively disabling datacenter authorization; which is the current behavior.
It should be set to CassandraNetworkAuthorizer which allows the ability to store
permissions which restrict role access to specific datacenters.
Rationale:
Audit:
Run the following command to verify whether network authorization is enabled
(network_authorizer value set to CassandraNetworkAuthorizer) on the Cassandra
server.
The Cassandra configuration files can be found in the conf directory of tarballs. For
packages, the configuration files will be located in /etc/cassandra.
cat cassandra.yaml | grep -in "network_authorizer:"
Remediation:
Default Value:
network_authorizer: AllowAllNetworkAuthorizer
Page 43
Controls
Control IG 1 IG 2 IG 3
Version
Page 44
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
The MEMBER_OF column found in the system_auth.roles table shows roles granted to
roles.
Rationale:
The MEMBER_OF column shows whoever has roles granted to roles and depending on
the role and the privileges grant to the role should be limited . Limiting the accounts that
have the certain roles reduces the chances that an attacker can exploit these
capabilities.
Audit:
Remediation:
Looking at those users from the query that have member_of that is NOT null, decide if
that user truly needs that role, if not, for each user, issue the following SQL statement
(replace <is_member> with the value of member_of returned by the query in the audit
procedure)
revoke <is_member> from role;
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 45
Page 46
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
The IS_SUPERUSER privilege found in the system_auth.roles table governs who can
control the entire Cassandra database and all of its data contained within.
Rationale:
The IS_SUPERUSER privilege allows whoever has it to do anything to the data and full
administrator rights to the database, including changing passwords, creating, dropping
roles. Limiting the accounts that have the IS_SUPERUSER role reduces the chances that
an attacker can exploit these capabilities.
Audit:
Execute the following SQL statement to audit this setting:
select role, is_superuser from system_auth.roles;
Looking for is_superuser = True
Remediation:
Perform the following steps to remediate this setting:
Looking at those users from the query that have is_superuser = True, decide if that
user truly needs that role, if not, for each user, issue the following SQL statement
(replace <role> with the role name from the query):
alter role <role> with superuser=false;
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 47
Page 48
Page 49
• Level 1 - Cassandra
• Level 1 - Cassandra on Linux
Description:
Apache Cassandra uses Logback for logging functionality. While this can be set using
nodetool setlogginglevel changes made using this method will be reverted to the
level specified in the logback.xml file the next time the process restarts.
The configurable logging levels are:
• OFF
• TRACE
• DEBUG
• INFO (Default)
• WARN
• ERROR
Rationale:
If logging is not enabled, issues may go undiscovered, and compromises and other
incidents may occur without being quickly detected. It may also not be possible to
provide evidence of compliance with security laws, regulations, and other requirements.
Audit:
Execute the following command to confirm the setting is correct:
$ nodetool getlogginglevels
Logger Name Log Level
ROOT INFO
org.cisecurity.workbench WARN
Remediation:
To remediate this setting:
Page 50
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<encoder>
<pattern>%-5level [%thread] %date{ISO8601} %F:%L -
%msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
Default Value:
INFO
References:
1. http://cassandra.apache.org/doc/latest/troubleshooting/reading_logs.html?highlig
ht=logging
2. https://logback.qos.ch/manual/configuration.html
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 51
Description:
Audit logging in Cassandra logs every incoming CQL command request, Authentication
(successful as well as unsuccessful login) to C* node. Currently, there are two
implementations provided, the custom logger can be implemented and injected with the
class name as a parameter in cassandra.yaml.
Rationale:
Unauthorized attempts to create, drop or alter users or data should be a concern.
Audit:
Allows logging to filesystem log files using logback or to a Cassandra table. When you
turn on audit logging, the default is to write to logback filesystem log files. You can verify
auditing is turned on:
cat cassandra.yaml | grep "audit_logging_options"
If failure is enabled: true means success
Anything else is a finding.
Remediation:
Open the cassandra.yaml file in a text editor
In the audit_logging_options section, set enabled to true.
# Audit logging options
audit_logging_options:
enabled: true
References:
1. https://docs.datastax.com/en/datastax_enterprise/4.8/datastax_enterprise/sec/se
cAudit.html#secAudit
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 52
Page 53
Page 54
Description:
Cassandra offers the option to encrypt data in transit between nodes on the cluster. By
default, inter-node encryption is turned off.
Rationale:
Data being transferred on the wire should be encrypted to avoid network snooping,
whether legitimate or not.
Audit:
Run the following command to verify whether inter-node encryption is enabled.
cat cassandra.yaml | grep -in "internode_encryption:"
Remediation:
The inter-node encryption should be implemented before anyone accesses the
Cassandra server.
To enable the inter-node encryption mechanism:
Default Value:
internode_encryption: none
References:
1. http://cassandra.apache.org/doc/latest/operating/security.html
Page 55
Controls
Control IG 1 IG 2 IG 3
Version
Page 56
Description:
Cassandra offers the option to encrypt data in transit between the client and nodes on
the cluster. By default client encryption is turned off.
Rationale:
Data in transit between the client and node on the cluster should be encrypted to avoid
network snooping, whether legitimate or not.
Audit:
The Cassandra configuration files can be found in the conf directory of tarballs. For
packages, the configuration files will be located in /etc/cassandra.
Open up the cassandra.yaml file, look for client_encryption_options section.
Look for enabled: and optional:
enabled: true
optional: false
If neither is true, then all client connections are unencrypted which makes this a finding.
If enabled is true and optional is false, then all client connections must be encrypted
which makes this not a finding.
If enabled is false and optional is true, then enabled wins and all client connections are
unencrypted which makes this a finding.
If both are set to true, then both unencrypted and encrypted connections are allowed on
the same port which makes this not a finding.
Remediation:
The client encryption should be implemented before anyone accesses the Cassandra
server.
To enable the client encryption mechanism:
Page 57
This will force all connections to be encrypted between client and node on the
cluster.
Default Value:
enabled: false
optional: false
References:
1. http://cassandra.apache.org/doc/latest/operating/security.html
CIS Controls:
Controls
Control IG 1 IG 2 IG 3
Version
Page 58
Yes No
Page 59
Yes No
5 Encryption
Page 60
Page 61
Page 62
Page 63
Page 64
Page 65
Page 66
Page 67
Page 68
Page 69