Rule ID
SV-286199r1292241_rule
Version
V1R1
CCIs
Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access. The separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate. An example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources. This may include isolating the administrative interface on a different domain and with additional access controls. If administrative functionality or information regarding MariaDB management is presented on an interface available for users, information on MariaDB settings may be inadvertently made available to the user.
Check MariaDB settings to verify that administrative functionality is separate from user functionality. Loop over all the MariaDB users and SHOW GRANTS for each using the command below. Run this database query to create the "SHOW GRANTS" script for each user: SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Example output: +----------------------------------------+ | grantQuery | +----------------------------------------+ | SHOW GRANTS FOR mariadb.sys@localhost; | | SHOW GRANTS FOR root@localhost; | Run each "SHOW GRANTS" command for each user. If any nonadministrative role has any one of the following privileges, this is a finding. - Create user. - Event. - Process. - Proxy. - Reload. - Replication client. - Replication slave. - Show databases. - Shutdown. - Super. - Usage. If administrator and general user functionality are not separated either physically or logically, this is a finding.
Configure to separate database administration and general user functionality. Do not grant the following privileges to users and roles that do not require it: - Create user. - Event. - Process. - Proxy. - Reload. - Replication client. - Replication slave. - Show databases. - Shutdown. - Super. - Create tablespace. - Usage. Revoke privileges from a specific user: REVOKE SUPER, PROCESS ON *.* FROM user @ localhost ; Revoke privileges from a role: REVOKE role FROM grantee [, grantee2 ... ]