Rule ID
SV-286181r1292138_rule
Version
V1R1
CCIs
If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database code can lead to unauthorized or compromised installations.
Only DEFINERS of routines (functions and procedures) can change them. To view all functions and procedures; their DEFINERS, and source, run: SELECT * from mysql.proc \G Only DEFINERS of triggers can change them. To view all triggers, trigger procedures, their DEFINERS, and source, run: SELECT * from information_schema.triggers \G Find the DATADIR: SHOW GLOBAL VARIABLES LIKE 'datadir'; (usually /var/lib/mysql/ ) Only the OS database owner user (shown here as mysql) or an OS superuser can change links to external software. As the OS DBA (shown here as root), check the permissions of configuration files for the database: Example: $ ls -al -R /var/lib/mysql/ If any files are not owned by the database owner (usually mysql) or have permissions allowing others to modify (write) configuration files, this is a finding. Review monitoring procedures and implementation evidence to verify monitoring of changes to database software libraries, related applications, and configuration files is completed. Verify the list of files and directories being monitored is complete. If monitoring does not occur or is not complete, this is a finding.
Remove privileges from users identified as not authorized to install/uninstall MariaDB Enterprise Server plugins. Inside the MariaDB database, monitoring for unauthorized changes to stored procedures or other similar objects primarily involves auditing Data Definition Language (DDL) operations. This can be achieved through MariaDB's built-in Server Audit. Edit the "mariadb-enterprise.cnf" configuration file located in "/etc/my.cnf.d/". Under [mariadb], add/edit the following: [mariadb] server_audit_events='QUERY_DDL';