Files
scylla/audit/CMakeLists.txt
Paweł Zakrzewski 384641194a audit: Add the audit subsystem
This change introduces a new audit subsystem that allows tracking and logging of database operations for security and compliance purposes. Key features include:

- Configurable audit logging to either syslog or a dedicated system table (audit.audit_log)
- Selective auditing based on:
  - Operation categories (QUERY, DML, DDL, DCL, AUTH, ADMIN)
  - Specific keyspaces
  - Specific tables
- New configuration options:
  - audit: Controls audit destination (none/syslog/table)
  - audit_categories: Comma-separated list of operation categories to audit
  - audit_tables: Specific tables to audit
  - audit_keyspaces: Specific keyspaces to audit
  - audit_unix_socket_path: Path for syslog socket
  - audit_syslog_write_buffer_size: Buffer size for syslog writes

The audit logs capture details including:
- Operation timestamp
- Node and client IP addresses
- Operation category and query
- Username
- Success/failure status
- Affected keyspace and table names
2025-01-15 11:10:35 +01:00

20 lines
396 B
CMake

include(add_whole_archive)
add_library(scylla_audit STATIC)
target_sources(scylla_audit
PRIVATE
audit.cc
audit_cf_storage_helper.cc
audit_syslog_storage_helper.cc)
target_include_directories(scylla_audit
PUBLIC
${CMAKE_SOURCE_DIR})
target_link_libraries(scylla_audit
PUBLIC
Seastar::seastar
xxHash::xxhash
PRIVATE
cql3)
add_whole_archive(audit scylla_audit)