DataSunrise Achieves AWS DevOps Competency Status in AWS DevSecOps and Monitoring, Logging, Performance

Cassandra Data Activity History

Cassandra Data Activity History

Cassandra Data Activity Historyis an essential feature for tracking and managing database interactions, especially when dealing with sensitive data. This functionality helps database administrators monitor activities, ensure compliance with security standards, and troubleshoot anomalies. Cassandra’s native auditing capabilities, complemented by advanced tools like DataSunrise, provide robust solutions for auditing and managing data activity.

In this article, we will explore Cassandra’s native auditing features and demonstrate how to implement them using Python. We will also highlight the benefits of using DataSunrise for centralized auditing and discuss its configuration settings.

Native Cassandra Data Activity History

Cassandra’s native auditing capabilities allow for tracking specific operations, including Data Definition Language (DDL) and Data Manipulation Language (DML) actions. This helps ensure security and compliance while offering a transparent view of database activities.

Configuring Native Auditing

To enable native auditing in Cassandra, you need to modify its configuration files. Below is a sample configuration that enables auditing:

INFO [RMI TCP Connection(2)-127.0.0.1] 2024-12-24 07:37:25,301 StorageService.java:6926 - AuditLog is enabled with configuration:
AuditLogOptions{
enabled=true,
logger='FileAuditLogger',
included_keyspaces='test_keyspace',
excluded_keyspaces='system,system_schema',
included_categories='DDL,DML',
excluded_categories='',
included_users='',
excluded_users='',
audit_logs_dir='/var/log/cassandra/audit',
archive_command='',
roll_cycle='HOURLY',
block=true,
max_queue_weight=268435456,
max_log_size=17179869184,
max_archive_retries=10
}

Key Configuration Details

  1. Enabled Audit: Auditing is active.
  2. Included Categories: Logs DDL and DML operations.
  3. Included Keyspaces: Focuses on the test_keyspace keyspace while excluding system schemas.
  4. Audit Logs Directory: Logs are stored in /var/log/cassandra/audit.

Example: Auditing an INSERT Operation

Performing an INSERT operation generates the following log:

INFO [Native-Transport-Requests-1] 2024-12-24 07:38:01,753 FileAuditLogger.java:51 -
user:anonymous
host:/172.17.0.2:7000
source:/127.0.0.1
port:45862
timestamp:1735025881749
type:UPDATE
category:DML
ks:test_keyspace
scope:audit_test
operation:INSERT INTO audit_test (id, name, age) VALUES (uuid(), 'Charlie', 35);

This log entry includes details like the user, operation type, keyspace, and executed query.

Verifying Audit Configuration

Logs confirm that auditing operates as configured:

INFO [RMI TCP Connection(4)-127.0.0.1] 2024-12-24 07:41:58,298 StorageService.java:6926 -

Using Python for Native Auditing

Python provides an efficient way to interact with Cassandra and retrieve audit logs. Below is an example of setting up a connection, enabling auditing, and querying the logs.

Connecting to Cassandra

from cassandra.cluster import Cluster
# Connect to Cassandra cluster
cluster = Cluster(["127.0.0.1"])
session = cluster.connect()
# Select keyspace
session.set_keyspace('test_keyspace')
print("Connected to Cassandra")

Performing an Audited Operation

# Create a table and insert data
session.execute("CREATE TABLE IF NOT EXISTS audit_test (id UUID PRIMARY KEY, name TEXT, age INT)")
session.execute("INSERT INTO audit_test (id, name, age) VALUES (uuid(), 'Charlie', 35)")
print("Data inserted")

Viewing Audit Logs

Audit logs are stored in the directory specified during configuration. You can parse them programmatically if needed.

Auditing with DataSunrise

DataSunrise enhances Cassandra Data Activity History by offering robust centralized and customizable auditing features. It integrates seamlessly with Cassandra to provide unparalleled control over auditing processes, real-time activity tracking, and detailed reporting capabilities.

Configuring DataSunrise for Cassandra

General Settings

  • Define the Cassandra database connection settings, such as host address and authentication credentials.

Action Settings

  • Configure rules for both allowed and prohibited database actions, specifying where logs will be stored and what to include or ignore.

Filter Sessions

  • Apply session filters to segregate logs based on criteria like user roles, IP address ranges, or connection protocols.
  • Create distinct session filters for administrative users and regular clients to differentiate activity logs.

Filter Statements

  • Use statement filters to log only specific database operations involving sensitive data.
  • Exclude non-critical queries to focus on crucial activities for auditing purposes.

Notification Settings

  • Configure automated alerts for unauthorized or suspicious database activities.
  • Integrate notifications with external systems for real-time incident management and escalations.

Viewing Audited Data Activity

  1. Access the DataSunrise interface through your browser.
  2. Navigate to the dedicated audit dashboard, providing an intuitive overview of logged activities.
  3. Use filters to analyze specific logs by user, operation type, timestamp, or database object.
  4. Export logs for external compliance checks or deeper investigations.

Advanced Benefits of DataSunrise

  1. Centralized Control: Maintain uniform auditing rules across multiple Cassandra nodes and other databases.
  2. Real-Time Monitoring: Get instant visibility into ongoing operations and quickly identify anomalies.
  3. Compliance Made Easy: Generate audit trails that align with regulatory requirements such as GDPR, HIPAA, or PCI DSS.
  4. Enhanced Security: Proactively detect unauthorized access attempts and mitigate risks before they escalate.
  5. Scalable Management: Adaptable to both small-scale and enterprise-level database infrastructures, ensuring consistent performance.

DataSunrise’s comprehensive feature set makes it an essential tool for database administrators aiming to safeguard data integrity and maintain regulatory compliance effortlessly.

Summary

Cassandra Data Activity History empowers organizations to audit and safeguard sensitive data effectively. Its native auditing capabilities allow fine-grained control, helping to monitor database activities transparently and ensure compliance with security standards. Meanwhile, DataSunrise amplifies these benefits by providing advanced features for centralized auditing, real-time monitoring, and customizable rule management.

By integrating these solutions, businesses can secure their database environments against unauthorized access and achieve regulatory compliance effortlessly. Native auditing tracks DDL and DML operations with precision, while DataSunrise simplifies management by offering an intuitive interface and comprehensive reporting tools.

To better understand how DataSunrise improves database security, visit thewebsite. You can explore features or schedule an online demonstration of our strong security suite.





Next

Cassandra Database Activity History

Cassandra Database Activity History

Learn More

Need Our Support Team Help?

Our experts will be glad to answer your questions.

General information:
[email protected]
Customer Service and Technical Support:
support.datasunrise.com
Partnership and Alliance Inquiries:
[email protected]