Configuring and using data auditing
Set options in dse.yaml for configuring and using data auditing.
Installer-Services | /etc/dse/dse.yaml |
Package installations | /etc/dse/dse.yaml |
Installer-No Services | install_location/resources/dse/conf/dse.yaml |
Tarball installations | install_location/resources/dse/conf/dse.yaml |
The audit logger logs information on the node set up for logging. For example, node 0 has audit turned on, node 1 does not. Issuing updates and other commands on node 1 does not generally show up on node 0’s audit log. To get the maximum information from data auditing, turn on data auditing on every node.
Audit logs can be written to filesystem log files using log4j, or to a Cassandra table. When you turn on audit logging, the default logger is to log to log4j filesystem log files.
For simple installations, logging to log4j files is typically easier. The log files can be read from a terminal to troubleshoot queries or manage security. However, larger clusters can make log4j audit logs cumbersome. The log files grow extremely large, and it's difficult to analyze all the messages. The format of the log file is also not flexible. Each node's log files are local to the machine, making it difficult to find out what is happening across the cluster.
As your cluster scales up, logging audit data to a Cassandra table is more useful. The data can be queried like any other table, making analysis easier and custom audit reports possible.
Audit logging of queries and prepared statements submitted to the DataStax drivers, which use the CQL binary protocol, is supported.
When using audit logging with Kerberos authentication, the login events take place on Kerberos and are not logged in DataStax Enterprise. Authentication history is available only on Kerberos. When DataStax Enterprise is unable to authenticate a client with Kerberos, a LOGIN_ERROR event is logged.
When using audit logging with Cassandra native protocol authentication, the login events take place as part of connection negotiation and are not logged in DataStax Enterprise.
Procedure
Example
The following example sets the audit logger to log to a Cassandra table.
# Audit logging options audit_logging_options: enabled: true logger: CassandraAuditWriter