Filter roles

Locate the cassandra.yaml configuration file. The location of this file depends on your installation type.

  • Package installations

  • Tarball installations

/etc/hcd/cassandra/cassandra.yaml
INSTALLATION_LOCATION/resources/cassandra/conf/cassandra.yaml

Replace INSTALLATION_LOCATION with the path where you extracted the HCD tarball.

Set up activity tracking of specific login roles in the audit_logging_options section of the cassandra.yaml.

audit_logging_options:
    enabled: true
    logger:
      - class_name: LOGGER_NAME
#    included_categories:
#    excluded_categories:
#    included_keyspaces:
#    excluded_keyspaces:
#    included_roles:
#    excluded_roles:

where LOGGER_NAME is SLF4JAuditWriter or CassandraAuditWriter.

By default, both roles parameters are commented out and therefore events are captured for all roles. Use only one of the following parameters to limit the roles whose activity is tracked:

  • included_roles: Includes only matching roles; excludes all others.

  • excluded_roles: Excludes matching roles; includes all others.

Match roles using a comma-separated list of names.

Example

Events of all roles except for hcd_admin and jim are captured.

audit_logging_options:
    enabled: true
    logger:
      - class_name: CassandraAuditWriter
#    included_categories:
#    excluded_categories:
#    included_keyspaces:
#    excluded_keyspaces:
#    included_roles:
    excluded_roles: hcd_admin, jim

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com