SV-253673r960885_rule
V-253673
SRG-APP-000091-DB-000325
MADB-10-000800
CAT II
10
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging:
MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active';
Check what filters are in place by running the following as an administrative user:
MariaDB> SELECT * FROM mysql.server_audit_filters;
Update the filters as necessary.
As the database administrator, create a user by running the following SQL:
MariaDB> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'test_user_password';
In one terminal, tail the audit log file:
tail -F /var/lib/mysql/server_audit.log (default location)
In another terminal attempt to retrieve information from the MariaDB table, mysql.roles_mapping, by logging in as the test_user and running a query which it does not have privileges to do, for example:
$ mariadb -u test_user -p
MariaDB> SELECT * FROM mysql.roles_mapping;
The audit log will show:
20190321 21:39:20,5a7e16cc51f7, test_user ,localhost,127,394,QUERY,, select * from mysql.roles_mapping ,1142
To find failed queries, look for two elements: The notation indicating that it is a QUERY entry, and the last value for the entry. If the query is unsuccessful, the value will be NOT EQUAL TO 0.
If the above steps cannot verify that audit records are produced when MariaDB denies retrieval of privileges/permissions/role memberships, this is a finding.
If an audit record is not produced in the first terminal, this is a finding.
V-253673
False
MADB-10-000800
As the database administrator, create a user by running the following SQL:
MariaDB> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'test_user_password';
In one terminal, tail the audit log file:
tail -F /var/lib/mysql/server_audit.log (default location)
In another terminal attempt to retrieve information from the MariaDB table, mysql.roles_mapping, by logging in as the test_user and running a query which it does not have privileges to do, for example:
$ mariadb -u test_user -p
MariaDB> SELECT * FROM mysql.roles_mapping;
The audit log will show:
20190321 21:39:20,5a7e16cc51f7, test_user ,localhost,127,394,QUERY,, select * from mysql.roles_mapping ,1142
To find failed queries, look for two elements: The notation indicating that it is a QUERY entry, and the last value for the entry. If the query is unsuccessful, the value will be NOT EQUAL TO 0.
If the above steps cannot verify that audit records are produced when MariaDB denies retrieval of privileges/permissions/role memberships, this is a finding.
If an audit record is not produced in the first terminal, this is a finding.
M
5475