mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
test: audit: add cassandra user test case
Audit tests use the `filter_out_noise` function to remove noise from audit logs generated by user authentication. As a result, none of the existing tests covered audit logs for the default `cassandra` user. This change adds a test case for that user. Refs: scylladb/scylladb#25069
This commit is contained in:
@@ -958,6 +958,16 @@ class TestCQLAudit(AuditTester):
|
||||
with self.assert_entries_were_added(session, expected_audit_entries, filter_out_cassandra_auth=True):
|
||||
self.prepare(user="test", password="test", create_keyspace=False)
|
||||
|
||||
def test_cassandra_login(self):
|
||||
"""
|
||||
Test user login to default (cassandra) user
|
||||
"""
|
||||
session = self.prepare(user="cassandra", password="cassandra", create_keyspace=False)
|
||||
expected_audit_entries = [AuditEntry(category="AUTH", statement="LOGIN", user="cassandra", table="", ks="", cl="", error=False)]
|
||||
|
||||
with self.assert_entries_were_added(session, expected_audit_entries, filter_out_cassandra_auth=False):
|
||||
self.prepare(user="cassandra", password="cassandra", create_keyspace=False)
|
||||
|
||||
def test_categories(self):
|
||||
"""
|
||||
Test filtering audit categories
|
||||
|
||||
Reference in New Issue
Block a user