Ensure that logging is enabled (Automated)
Profile Applicability
- 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:
OFFTRACEDEBUGINFO(Default)WARNERROR
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.
Impact
None
Audit Procedure
Execute the following command to confirm the setting is correct:
$ nodetool getlogginglevels
Logger Name Log Level
ROOT INFO
org.clisecurity.workbench WARN
If set to OFF then this is a finding.
Remediation
To remediate this setting:
- Edit the
logback-test.xmlif present; otherwise, edit thelogback.xml
<configuration scan="true">
<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>
<logger name="org.clisecurity.workbench" level="WARN"/>
</configuration>
- Restart the Apache Cassandra
Default Value
INFO
References
- http://cassandra.apache.org/doc/latest/troubleshooting/reading_logs.html?highlight=logging
- https://logback.qos.ch/manual/configuration.html
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 8.5 Collect Detailed Audit LogsConfigure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation. | ● | ● | |
| v7 | 6.3 Enable Detailed LoggingEnable system logging to include detailed information such as an event source, date, user, timestamp, source addresses, destination addresses, and other useful elements. | ● | ● |