SV-253732r961461_rule
V-253732
SRG-APP-000380-DB-000360
MADB-10-007900
CAT II
10
Configure MariaDB to enforce access restrictions associated with changes to the configuration of MariaDB or database(s).
1. Use REVOKE to revoke privileges or roles on objects from users.
MariaDB> REVOKE privileges ON object FROM user ;
2. Use REVOKE to remove a role from a user or another role that it was previously assigned to.
MariaDB> REVOKE role FROM grantee or role ;
To list all the permissions of individual roles, as the database administrator, run the following SQL:
1. For User privileges:
Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account.
Run this script to create the SHOW GRANTS script for each user:
MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N';
Run each SHOW GRANTS command for each user.
2. For role privileges (except admin_option, whether the role can be granted by a particular use):
MariaDB> SELECT CONCAT('SHOW GRANTS FOR ',Role,';' ) FROM mysql.roles_mapping;
Run each SHOW GRANTS command for each role.
If any role has admin_option that should not, this is a finding.
There are no privileges assigned to databases or tables, security is enforced through the traditional way with granting very specific user privileges.
If any database or schema has update or create privileges and should not, this is a finding.
V-253732
False
MADB-10-007900
To list all the permissions of individual roles, as the database administrator, run the following SQL:
1. For User privileges:
Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account.
Run this script to create the SHOW GRANTS script for each user:
MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N';
Run each SHOW GRANTS command for each user.
2. For role privileges (except admin_option, whether the role can be granted by a particular use):
MariaDB> SELECT CONCAT('SHOW GRANTS FOR ',Role,';' ) FROM mysql.roles_mapping;
Run each SHOW GRANTS command for each role.
If any role has admin_option that should not, this is a finding.
There are no privileges assigned to databases or tables, security is enforced through the traditional way with granting very specific user privileges.
If any database or schema has update or create privileges and should not, this is a finding.
M
5475