ScyllaDB University LIVE, FREE Virtual Training Event | March 21
Register for Free
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB Open Source ScyllaDB for Administrators Security ScyllaDB Auditing Guide

Caution

You're viewing documentation for a previous version. Switch to the latest stable version.

ScyllaDB Auditing Guide¶

ScyllaDB Enterprise

Auditing allows the administrator to monitor activities on a Scylla cluster, including queries and data changes. The information is stored in a Syslog or a Scylla table.

Prerequisite¶

Enable ScyllaDB Authentication and Authorization.

Enabling Audit¶

Enabling auditing is controlled by the audit: parameter in the scylla.yaml file. You can set the following options:

  • none - Audit is disabled.

  • table - Audit is enabled, and messages are stored in a Scylla table (default).

  • syslog - Audit is enabled, and messages are sent to Syslog.

Configuring any other value results in an error at Scylla startup.

Configuring Audit¶

The audit can be tuned using the following flags or scylla.yaml entries:

Flag

Default Value

Description

audit_categories

“DCL,DDL,AUTH,ADMIN”

Comma-separated list of statement categories that should be audited

audit_tables

“”

Comma-separated list of table names that should be audited, in the format of <keyspacename>.<tablename>

audit_keyspaces

“”

Comma-separated list of keyspaces that should be audited. You must specify at least one keyspace. If you leave this option empty, no keyspace will be audited.

To audit all the tables in a keyspace, set the audit_keyspaces with the keyspace you want to audit and leave audit_tables empty.

You can use DCL, AUTH, and ADMIN audit categories without including any keyspace or table.

audit_categories parameter description¶

Parameter

Logs Description

AUTH

Logs login events

DML

Logs insert, update, delete, and other data manipulation language (DML) events

DDL

Logs object and role create, alter, drop, and other data definition language (DDL) events

DCL

Logs grant, revoke, create role, drop role, and list roles events

QUERY

Logs all queries

ADMIN

Logs service level operations: create, alter, drop, attach, detach, list. For service level auditing, this parameter is available in Scylla Enterprise 2019.1 and later.

Note that audit for every DML or QUERY might impact performance and consume a lot of storage.

Configuring Audit Storage¶

Auditing messages can be sent to Syslog or stored in a Scylla table. Currently, auditing messages can only be saved to one location at a time. You cannot log into both a table and the Syslog.

Storing Audit Messages in Syslog¶

Procedure

  1. Set the audit parameter in the scylla.yaml file to syslog.

    For example:

    # audit setting
    # by default, Scylla does not audit anything.
    # It is possible to enable auditing to the following places:
    #   - audit.audit_log column family by setting the flag to "table"
    audit: "syslog"
    #
    # List of statement categories that should be audited.
    audit_categories: "DCL,DDL,AUTH"
    #
    # List of tables that should be audited.
    audit_tables: "mykespace.mytable"
    #
    # List of keyspaces that should be fully audited.
    # All tables in those keyspaces will be audited
    audit_keyspaces: "mykespace"
    
  2. Restart the Scylla node.

sudo systemctl restart scylla-server
docker exec -it some-scylla supervisorctl restart scylla

(without restarting some-scylla container)

By default, audit messages are written to the same destination as Scylla logging, with scylla-audit as the process name.

Logging output example (drop table):

Mar 18 09:53:52 ip-10-143-2-108 scylla-audit[28387]: "10.143.2.108", "DDL", "ONE", "team_roster", "nba", "DROP TABLE nba.team_roster ;", "127.0.0.1", "anonymous", "false"

To redirect the Syslog output to a file, follow the steps below (available only for CentOS) :

  1. Install rsyslog sudo dnf install rsyslog.

  2. Edit /etc/rsyslog.conf and append the following to the file: if $programname contains 'scylla-audit' then /var/log/scylla-audit.log.

  3. Start rsyslog systemctl start rsyslog.

  4. Enable rsyslog systemctl enable rsyslog.

Storing Audit Messages in a Table¶

Messages are stored in a Scylla table named audit.audit_log.

For example:

CREATE TABLE IF NOT EXISTS audit.audit_log (
      date timestamp,
      node inet,
      event_time timeuuid,
      category text,
      consistency text,
      table_name text,
      keyspace_name text,
      operation text,
      source inet,
      username text,
      error boolean,
      PRIMARY KEY ((date, node), event_time));

Procedure

  1. Set the audit parameter in the scylla.yaml file to table.

    For example:

    # audit setting
    # by default, Scylla does not audit anything.
    # It is possible to enable auditing to the following places:
    #   - audit.audit_log column family by setting the flag to "table"
    audit: "table"
    #
    # List of statement categories that should be audited.
    audit_categories: "DCL,DDL,AUTH"
    #
    # List of tables that should be audited.
    audit_tables: "mykespace.mytable"
    #
    # List of keyspaces that should be fully audited.
    # All tables in those keyspaces will be audited
    audit_keyspaces: "mykespace"
    
  2. Restart Scylla node.

    sudo systemctl restart scylla-server
    
    docker exec -it some-scylla supervisorctl restart scylla
    

    (without restarting some-scylla container)

    Table output example (drop table):

    SELECT * FROM audit.audit_log ;
    

    returns:

     date                    | node         | event_time                           | category | consistency | error | keyspace_name | operation                    | source          | table_name  | username |
    -------------------------+--------------+--------------------------------------+----------+-------------+-------+---------------+------------------------------+-----------------+-------------+----------+
    2018-03-18 00:00:00+0000 | 10.143.2.108 | 3429b1a5-2a94-11e8-8f4e-000000000001 |      DDL |         ONE | False |           nba | DROP TABLE nba.team_roster ; | 127.0.0.1       | team_roster | Scylla   |
    (1 row)
    

Additional Resources¶

  • Authorization

  • Authentication

Was this page helpful?

PREVIOUS
Role Based Access Control (RBAC)
NEXT
Encryption: Data in Transit Client to Node
  • Create an issue
  • Edit this page

On this page

  • ScyllaDB Auditing Guide
    • Prerequisite
    • Enabling Audit
    • Configuring Audit
      • audit_categories parameter description
    • Configuring Audit Storage
      • Storing Audit Messages in Syslog
      • Storing Audit Messages in a Table
        • Additional Resources
ScyllaDB Open Source
  • 5.2
    • master
    • 6.2
    • 6.1
    • 6.0
    • 5.4
    • 5.2
    • 5.1
  • Getting Started
    • Install ScyllaDB
      • ScyllaDB Web Installer for Linux
      • ScyllaDB Unified Installer (relocatable executable)
      • Air-gapped Server Installation
      • What is in each RPM
      • ScyllaDB Housekeeping and how to disable it
      • ScyllaDB Developer Mode
      • ScyllaDB Configuration Reference
    • Configure ScyllaDB
    • ScyllaDB Requirements
      • System Requirements
      • OS Support by Linux Distributions and Version
      • ScyllaDB in a Shared Environment
    • Migrate to ScyllaDB
      • Migration Process from Cassandra to Scylla
      • Scylla and Apache Cassandra Compatibility
      • Migration Tools Overview
    • Integration Solutions
      • Integrate Scylla with Spark
      • Integrate Scylla with KairosDB
      • Integrate Scylla with Presto
      • Integrate Scylla with Elasticsearch
      • Integrate Scylla with Kubernetes
      • Integrate Scylla with the JanusGraph Graph Data System
      • Integrate Scylla with DataDog
      • Integrate Scylla with Kafka
      • Integrate Scylla with IOTA Chronicle
      • Integrate Scylla with Spring
      • Shard-Aware Kafka Connector for Scylla
      • Install Scylla with Ansible
      • Integrate Scylla with Databricks
    • Tutorials
  • ScyllaDB for Administrators
    • Administration Guide
    • Procedures
      • Cluster Management
      • Backup & Restore
      • Change Configuration
      • Maintenance
      • Best Practices
      • Benchmarking Scylla
      • Migrate from Cassandra to Scylla
      • Disable Housekeeping
    • Security
      • ScyllaDB Security Checklist
      • Enable Authentication
      • Enable and Disable Authentication Without Downtime
      • Generate a cqlshrc File
      • Reset Authenticator Password
      • Enable Authorization
      • Grant Authorization CQL Reference
      • Role Based Access Control (RBAC)
      • ScyllaDB Auditing Guide
      • Encryption: Data in Transit Client to Node
      • Encryption: Data in Transit Node to Node
      • Generating a self-signed Certificate Chain Using openssl
      • Encryption at Rest
      • LDAP Authentication
      • LDAP Authorization (Role Management)
    • Admin Tools
      • Nodetool Reference
      • CQLSh
      • REST
      • Tracing
      • Scylla SStable
      • Scylla Types
      • SSTableLoader
      • cassandra-stress
      • SSTabledump
      • SSTable2json
      • Scylla Logs
      • Seastar Perftune
      • Virtual Tables
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
    • ScyllaDB Manager
    • Upgrade Procedures
      • ScyllaDB Open Source Upgrade
      • ScyllaDB Open Source to ScyllaDB Enterprise Upgrade
      • ScyllaDB Image
      • ScyllaDB Enterprise
    • System Configuration
      • System Configuration Guide
      • scylla.yaml
      • ScyllaDB Snitches
    • Benchmarking ScyllaDB
  • ScyllaDB for Developers
    • Learn To Use ScyllaDB
      • Scylla University
      • Course catalog
      • Scylla Essentials
      • Basic Data Modeling
      • Advanced Data Modeling
      • MMS - Learn by Example
      • Care-Pet an IoT Use Case and Example
    • Scylla Alternator
    • Scylla Features
      • Scylla Open Source Features
      • Scylla Enterprise Features
    • Scylla Drivers
      • Scylla CQL Drivers
      • Scylla DynamoDB Drivers
    • Workload Attributes
  • CQL Reference
    • CQLSh: the CQL shell
    • Appendices
    • Compaction
    • Consistency Levels
    • Consistency Level Calculator
    • Data Definition
    • Data Manipulation
    • Data Types
    • Definitions
    • Global Secondary Indexes
    • Additional Information
    • Expiring Data with Time to Live (TTL)
    • Additional Information
    • Functions
    • JSON Support
    • Materialized Views
    • Non-Reserved CQL Keywords
    • Reserved CQL Keywords
    • ScyllaDB CQL Extensions
  • ScyllaDB Architecture
    • ScyllaDB Ring Architecture
    • ScyllaDB Fault Tolerance
    • Consistency Level Console Demo
    • ScyllaDB Anti-Entropy
      • Scylla Hinted Handoff
      • Scylla Read Repair
      • Scylla Repair
    • SSTable
      • ScyllaDB SSTable - 2.x
      • ScyllaDB SSTable - 3.x
    • Compaction Strategies
    • Raft Consensus Algorithm in ScyllaDB
  • Troubleshooting ScyllaDB
    • Errors and Support
      • Report a Scylla problem
      • Error Messages
      • Change Log Level
    • ScyllaDB Startup
      • Ownership Problems
      • Scylla will not Start
      • Scylla Python Script broken
    • Upgrade
      • Inaccessible configuration files after ScyllaDB upgrade
    • Cluster and Node
      • Failed Decommission Problem
      • Cluster Timeouts
      • Node Joined With No Data
      • SocketTimeoutException
      • NullPointerException
    • Data Modeling
      • Scylla Large Partitions Table
      • Scylla Large Rows and Cells Table
      • Large Partitions Hunting
    • Data Storage and SSTables
      • Space Utilization Increasing
      • Disk Space is not Reclaimed
      • SSTable Corruption Problem
      • Pointless Compactions
      • Limiting Compaction
    • CQL
      • Time Range Query Fails
      • COPY FROM Fails
      • CQL Connection Table
      • Reverse queries fail
    • ScyllaDB Monitor and Manager
      • Manager and Monitoring integration
      • Manager lists healthy nodes as down
  • Knowledge Base
    • Upgrading from experimental CDC
    • Compaction
    • Counting all rows in a table is slow
    • CQL Query Does Not Display Entire Result Set
    • When CQLSh query returns partial results with followed by “More”
    • Run Scylla and supporting services as a custom user:group
    • Decoding Stack Traces
    • Snapshots and Disk Utilization
    • DPDK mode
    • Debug your database with Flame Graphs
    • How to Change gc_grace_seconds for a Table
    • Gossip in Scylla
    • Increase Permission Cache to Avoid Non-paged Queries
    • How does Scylla LWT Differ from Apache Cassandra ?
    • Map CPUs to Scylla Shards
    • Scylla Memory Usage
    • NTP Configuration for Scylla
    • Updating the Mode in perftune.yaml After a ScyllaDB Upgrade
    • POSIX networking for Scylla
    • Scylla consistency quiz for administrators
    • Recreate RAID devices
    • How to Safely Increase the Replication Factor
    • Scylla and Spark integration
    • Increase Scylla resource limits over systemd
    • Scylla Seed Nodes
    • How to Set up a Swap Space
    • Scylla Snapshots
    • Scylla payload sent duplicated static columns
    • Stopping a local repair
    • System Limits
    • How to flush old tombstones from a table
    • Time to Live (TTL) and Compaction
    • Scylla Nodes are Unresponsive
    • Update a Primary Key
    • Using the perf utility with Scylla
    • Configure Scylla Networking with Multiple NIC/IP Combinations
  • ScyllaDB FAQ
  • Contribute to ScyllaDB
  • Glossary
  • Alternator: DynamoDB API in Scylla
    • Getting Started With ScyllaDB Alternator
    • ScyllaDB Alternator for DynamoDB users
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 08 May 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6