MariaDB Enterprise 10.x Security Technical Implementation Guide
Pick two releases to diff their requirements.
Open a previous version of this STIG.
Digest of Updates −1 ✎ 1
Comparison against the immediately-prior release (V2R2). Rule matching uses the Group Vuln ID. Content-change detection compares the rule’s description, check, and fix text after stripping inline markup — cosmetic-only edits aren’t flagged.
Removed rules 1
- V-253777 Medium MariaDB must be configured in accordance with the security configuration settings based on DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, DTMs, and IAVMs.
Content changes 1
- V-253705 Medium checkfix MariaDB must separate user functionality (including user interface services) from database management functionality.
- RMF Control
- AC-10
- Severity
- L
- CCI
- CCI-000054
- Version
- MADB-10-000100
- Vuln IDs
-
- V-253666
- Rule IDs
-
- SV-253666r960735_rule
Checks: C-57118r841521_chk
To check the number of connections allowed for each user, as the database administrator, run the following SQL: MariaDB> SELECT user, max_user_connections FROM mysql.user; If any users have more connections configured than documented, this is a finding. A value of 0 indicates unlimited and is a finding.
Fix: F-57069r841522_fix
To limit the number of connections allowed by a specific user, as a user with appropriate privileges, run the following SQL: MariaDB> GRANT USAGE ON *.* TO 'username'@'host' WITH MAX_USER_CONNECTIONS number_of_connections;
- RMF Control
- AC-2
- Severity
- H
- CCI
- CCI-000015
- Version
- MADB-10-000200
- Vuln IDs
-
- V-253667
- Rule IDs
-
- SV-253667r1043176_rule
Checks: C-57119r841524_chk
If all accounts are authenticated by the organization-level authentication/access mechanism such as LDAP, Kerberos, Active Directory and not by MariaDB, this is not a finding. If there are any accounts managed by the DBMS, review the system documentation for justification and approval of these accounts. If any DBMS-managed accounts exist that are not documented and approved, this is a finding. As the OS administrator, review the configuration files /etc/pam.d and /etc/pam.conf. If file is missing or not configured, this is a finding. Example for LDAP authentication and authorization via PAM would be /etc/pam.d/mariadb_ldap: ############################# auth required pam_ldap.so account required pam_ldap.so ############################# Verify that PAM is by installed the following SQL: MariaDB> SHOW PLUGINS; If pam is not listed as active, this is a finding. To find users not using PAM plugin for authentication: MariaDB> SELECT user, host, plugin FROM mysql.user WHERE plugin != 'pam'; If any users are returned, this is a finding.
Fix: F-57070r841525_fix
Integrate MariaDB security with an organization-level authentication/access mechanism providing account management for all users, groups, roles, and any other principals. As the database administrator, install and configure the PAM authentication module: MariaDB> INSTALL SONAME 'auth_pam'; PAM supports many authentication methods including LDAP, Active Directory, and Kerberos. Each method must be configured properly in /etc/pam.d and /etc/pam.conf. To alter non-PAM authenticated users to using PAM: MariaDB> ALTER USER 'username'@'host' IDENTIFIED VIA pam USING mariadb_ldap;
- RMF Control
- AC-3
- Severity
- H
- CCI
- CCI-000213
- Version
- MADB-10-000300
- Vuln IDs
-
- V-253668
- Rule IDs
-
- SV-253668r960792_rule
Checks: C-57120r841527_chk
From the system security plan or equivalent documentation, determine the appropriate permissions on database objects for each kind (group role) of user. If this documentation is missing, this is a finding. First, as the database administrator, check the privileges of all users and roles in the database. Find all users: MariaDB> SELECT user, host FROM mysql.user WHERE is_role = 'N'; Find all roles: MariaDB> SELECT user FROM mysql.user WHERE is_role = 'Y'; For each user found, check grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; For each role found, check grants: MariaDB> SHOW GRANTS FOR 'rolename'; Review all users and roles and their associated privileges. If any users and/or roles privileges exceed those documented, this is a finding. As the database administrator, check the configured authentication settings: MariaDB> SHOW PLUGINS; To find users not using PAM plugin for authentication: MariaDB> SELECT user, host, plugin FROM mysql.user WHERE plugin != 'pam'; If any users are returned, this is a finding. Review all entries and their associated authentication methods. If any entries do not have their documented authentication requirements, this is a finding.
Fix: F-57071r841528_fix
Create and/or maintain documentation of each group roles appropriate permissions on database objects. Implement these permissions in the database and remove any permissions that exceed those documented. The following are examples of how to use role privileges in MariaDB to enforce access controls. Run these as the database administrator. For a complete list of privileges, see the official documentation: https://mariadb.com/kb/en/grant/ #### Roles Example 1 The following example demonstrates how to create an admin role with SHUTDOWN privileges. As the database administrator, run the following SQL: MariaDB> CREATE ROLE admin; MariaDB> GRANT SHUTDOWN ON *.* TO admin; #### Roles Example 2 The following example demonstrates how to create a user make the user a member of the admin role. As the database administrator, run the following SQL: MariaDB> CREATE USER 'admin_user'@'host' IDENTIFIED VIA PAM; MariaDB> GRANT admin TO 'admin_user'@'%'; #### Roles Example 3 The following demonstrates how to revoke privileges from a role using REVOKE. As the database administrator, run the following SQL: MariaDB> REVOKE admin FROM 'admin_user'@'host'; #### Roles Example 4 The following demonstrates how to modify privileges for a role using GRANT. As the database administrator, run the following SQL: MariaDB> GRANT PROCESS ON *.* TO admin; The following are examples of how to use grant privileges in MariaDB to enforce access controls on objects. #### Grant Example 1 The following example demonstrates how to grant INSERT on a table to a role. As the database administrator, run the following SQL: MariaDB> GRANT INSERT ON test.t1 TO admin; #### Grant Example 2 The following example demonstrates how to grant ALL PRIVILEGES on a table to a role. As the database administrator, run the following SQL: MariaDB> GRANT ALL PRIVILEGES ON test.t1 TO admin; #### Grant Example 3 The following example demonstrates how to grant a role to a role. As the database administrator, run the following SQL: MariaDB> CREATE ROLE admin_master; MariaDB> GRANT admin TO admin_master; #### Revoke Example 1 The following example demonstrates how to revoke access from a role. As the database administrator, run the following SQL: MariaDB> REVOKE PROCESS ON *.* FROM admin; To change authentication requirements for the database, as the OS administrator, review the configuration files /etc/pam.d and /etc/pam.conf. After changes to the configuration files /etc/pam.d and /etc/pam.conf, reload the server: # SYSTEMD SERVER ONLY $ sudo systemctl reload mariadb # INITD SERVER ONLY $ sudo service mariadb reload
- RMF Control
- AU-10
- Severity
- M
- CCI
- CCI-000166
- Version
- MADB-10-000400
- Vuln IDs
-
- V-253669
- Rule IDs
-
- SV-253669r960864_rule
Checks: C-57121r841530_chk
All users should have individual accounts with appropriate privileges. The root user should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB> SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.
Fix: F-57072r841531_fix
Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000169
- Version
- MADB-10-000500
- Vuln IDs
-
- V-253670
- Rule IDs
-
- SV-253670r960879_rule
Checks: C-57122r841533_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify audit filters match organization-defined auditing requirements. If not, this is a finding.
Fix: F-57073r841534_fix
Configure MariaDB to generate audit records for at least the DoD minimum set of events. Edit the mariadb-enterprise.cnf configuration file located in /etc/my.cnf.d/. Under [mariadb], add the following: server_audit_logging = ON Save the configuration file. This change will not take effect until MariaDB Enterprise Server is restarted. Using the MariaDB Enterprise Audit plugin, MariaDB can be configured to audit these requests. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters. Ex: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' )); More information about MariaDB auditing can be found here: https://mariadb.com/docs/security/mariadb-enterprise-audit/
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- MADB-10-000600
- Vuln IDs
-
- V-253671
- Rule IDs
-
- SV-253671r960882_rule
Checks: C-57123r841536_chk
MariaDB Enterprise Audit plugin stores audit filters in the table mysql.server_audit_filters. Any users with update/delete/insert access to this table can modify the audit filters. Users with global insert, update, delete, and/or drop privileges can modify audit filters. Find users with global insert, update, delete, and/or drop privileges: MariaDB> SELECT user, host, insert_priv, update_priv, delete_priv, drop_priv FROM mysql.user WHERE insert_priv = 'y' OR update_priv = 'y' OR delete_priv = 'y' OR drop_priv = 'y'; Users with insert, update, delete, and/or drop privileges on the mysql database can modify audit filters. Find users with insert, update, delete, and/or drop privileges on the mysql database: MariaDB> SELECT user, host, insert_priv, update_priv, delete_priv, drop_priv FROM mysql.db WHERE db = 'mysql' AND (insert_priv = 'y' OR update_priv = 'y' OR delete_priv = 'y' OR drop_priv = 'y' ); Users with insert, update, delete, and/or drop privileges on the server_audit_filters and server_audit_users tables can modify audit filters. Find users with insert, update, delete, and/or drop privileges on the mysql database: MariaDB> SELECT user, host, db, table_name, grantor, table_priv, timestamp, column_priv FROM mysql.tables_priv WHERE db = 'mysql' AND table_name IN ('server_audit_filters','server_audit_users') AND (table_priv LIKE '%Insert%' OR table_priv LIKE '%Update%' OR table_priv LIKE '%Delete%' OR table_priv LIKE '%Drop%' ); If any users with the above privileges are found which should not have access to modify audit filters, this is a finding.
Fix: F-57074r841537_fix
Grant the necessary privileges to authorized users. Example: MariaDB> GRANT ALL PRIVILEGES ON mysql.server_audit_filters TO 'username'@'host'; MariaDB> GRANT ALL PRIVILEGES ON mysql.server_audit_users TO 'username'@'host'; For users found with access who are not authorized to modify audit filters, review the user's privileges, and update accordingly.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-000700
- Vuln IDs
-
- V-253672
- Rule IDs
-
- SV-253672r960885_rule
Checks: C-57124r841539_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; As a Linux user with sufficient privileges to view logs, tail the audit log file. $ tail -f /var/log/mysql/server_audit.log (default location) In another terminal run: MariaDB> SHOW GRANTS; If an audit record is not produced in the first terminal, this is a finding.
Fix: F-57075r841540_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-000800
- Vuln IDs
-
- V-253673
- Rule IDs
-
- SV-253673r960885_rule
Checks: C-57125r841542_chk
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.
Fix: F-57076r841543_fix
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.
- RMF Control
- AU-14
- Severity
- M
- CCI
- CCI-001464
- Version
- MADB-10-000900
- Vuln IDs
-
- V-253674
- Rule IDs
-
- SV-253674r960888_rule
Checks: C-57126r841545_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place for user by running the following as an administrative user: MariaDB> SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G Verify the corresponding audit filters are in place. If not, this is a finding.
Fix: F-57077r841546_fix
If not already exists, create a named filter with the required auditing for the user in question. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('session_auditing', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "table_event":[ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ] }' )); Then assign the named filter to the user. Example: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "username", "session_auditing"); Reload filters. MariaDB> SET GLOBAL server_audit_reload_filters = ON;
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000130
- Version
- MADB-10-001000
- Vuln IDs
-
- V-253675
- Rule IDs
-
- SV-253675r960891_rule
Checks: C-57127r841548_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Log in to MariaDB Enterprise Server and verify the audit log location. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; Verify the necessary audit filters are in place: MariaDB> SELECT * FROM mysql.server_audit_filters; In another terminal, view the audit log file: $ tail -f /var/log/mysql/audit.log Back in the MariaDB shell, run a query which matches an audit filter. Example if query_events is ALL: MariaDB> SELECT * FROM mysql.help_topic; Verify the entry was logged in the audit log and contains the necessary event type information. If not, this is a finding.
Fix: F-57078r841549_fix
Update necessary audit filters. For example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- MADB-10-001600
- Vuln IDs
-
- V-253676
- Rule IDs
-
- SV-253676r960909_rule
Checks: C-57128r841551_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Log in to MariaDB Enterprise Server and verify the audit log location. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; Verify the necessary audit filters are in place: MariaDB> SELECT * FROM mysql.server_audit_filters; In another terminal, view the audit log file: $ tail -f /var/log/mysql/audit.log Back in the MariaDB shell, run a query which matches an audit filter. Example if query_events is ALL: MariaDB> SELECT * FROM mysql.help_topic; Verify the entry was logged in the audit log and contains the necessary event user information. If not, this is a finding.
Fix: F-57079r841552_fix
Update necessary audit filters. For example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000140
- Version
- MADB-10-001700
- Vuln IDs
-
- V-253677
- Rule IDs
-
- SV-253677r1043188_rule
Checks: C-57129r841554_chk
If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable (NA). Otherwise, review the procedures, manual and/or automated, for monitoring the space used by audit trail(s) and for off-loading audit records to a centralized log management system. If the procedures do not exist, this is a finding. If the procedures exist, request evidence that they are followed. If the evidence indicates that the procedures are not followed, this is a finding. If the procedures exist, inquire if the system has ever run out of audit trail space in the last two years or since the last system upgrade, whichever is more recent. If it has run out of space in this period, and the procedures have not been updated to compensate, this is a finding.
Fix: F-57080r841555_fix
Modify DBMS, OS, or third-party logging application settings to alert appropriate personnel when a specific percentage of log storage capacity is reached.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000140
- Version
- MADB-10-001800
- Vuln IDs
-
- V-253678
- Rule IDs
-
- SV-253678r1043188_rule
Checks: C-57130r841557_chk
If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable (NA). If an externally managed and monitored partition or logical volume that can be grown dynamically is being used for logging, this is not a finding. If MariaDB is auditing to a directory that is not being actively checked for availability of disk space, and if a tool, utility, script, or other mechanism is not being used to ensure sufficient disk space is available for the creation of new audit logs, this is a finding. If a tool, utility, script, or other mechanism is being used to rotate audit logs, and oldest logs are not being removed to ensure sufficient space for newest logs, or oldest logs are not being replaced by newest logs, this is a finding.
Fix: F-57081r841558_fix
Establish a process with accompanying tools for monitoring available disk space and ensuring that sufficient disk space is maintained to continue generating audit logs, overwriting the oldest existing records if necessary. To set up the audit logs to write to sylog: Edit the mariadb-enterprise.cnf file. Add the following under the [mariadb] section: server_audit_output_type = 'syslog' After the .cnf file is updated and saved, the mariadb database service must be restarted. If not writing to syslog, log rotation and purging should be configured.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- MADB-10-002000
- Vuln IDs
-
- V-253679
- Rule IDs
-
- SV-253679r960930_rule
Checks: C-57131r841560_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57082r841561_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000163
- Version
- MADB-10-002100
- Vuln IDs
-
- V-253680
- Rule IDs
-
- SV-253680r960933_rule
Checks: C-57132r841563_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57083r841564_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000164
- Version
- MADB-10-002200
- Vuln IDs
-
- V-253681
- Rule IDs
-
- SV-253681r960936_rule
Checks: C-57133r841566_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57084r841567_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001493
- Version
- MADB-10-002300
- Vuln IDs
-
- V-253682
- Rule IDs
-
- SV-253682r960939_rule
Checks: C-57134r841569_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57085r841570_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001494
- Version
- MADB-10-002400
- Vuln IDs
-
- V-253683
- Rule IDs
-
- SV-253683r960942_rule
Checks: C-57135r841572_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57086r841573_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-001495
- Version
- MADB-10-002500
- Vuln IDs
-
- V-253684
- Rule IDs
-
- SV-253684r960945_rule
Checks: C-57136r841575_chk
Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
Fix: F-57087r841576_fix
If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MADB-10-002600
- Vuln IDs
-
- V-253685
- Rule IDs
-
- SV-253685r960960_rule
Checks: C-57137r841578_chk
Review documentation to determine which users are authorized to modify the MariaDB Enterprise Server binary files and shared library paths. If any unauthorized users are granted modify rights, this is a finding. Check what users have access to install/uninstall MariaDB Enterprise Server plugins. This privilege can be listed in one of three places: Table level, database level, or global. Table level: MariaDB> SELECT user, host FROM mysql.tables_priv WHERE db = 'mysql' and table_name = ' plugin'; Database level: MariaDB> SELECT user, host FROM mysql.db WHERE db = 'mysql' and (insert_priv = 'y') or (delete_priv = 'y') or (insert_priv = 'y' and delete_priv = 'y'); Global: SELECT user, host FROM mysql.user WHERE (insert_priv = 'y') or (delete_priv = 'y') or (insert_priv = 'y' and delete_priv = 'y'); If any user identified by the above queries is not authorized to install/uninstall MariaDB Enterprise Server plugins, 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 done. Verify the list of files and directories being monitored is complete. If monitoring does not occur or is not complete, this is a finding.
Fix: F-57088r841579_fix
Remove privileges from users identified as not authorized to install/uninstall MariaDB Enterprise Server plugins. Implement procedures to monitor for unauthorized changes to DBMS software libraries, related software application libraries, and configuration files. If a third-party automated tool is not employed, an automated job that reports file information on the directories and files of interest and compares them to the baseline report for the same will meet the requirement.
- RMF Control
- CM-5
- Severity
- H
- CCI
- CCI-001499
- Version
- MADB-10-002700
- Vuln IDs
-
- V-253686
- Rule IDs
-
- SV-253686r960960_rule
Checks: C-57138r841581_chk
Review procedures for controlling, granting access to, and tracking use of the MariaDB software installation account. If access or use of this account is not restricted to the minimum number of personnel required or if unauthorized access to the account has been granted, this is a finding.
Fix: F-57089r841582_fix
Develop, document, and implement procedures to restrict and track use of the MariaDB software installation account.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MADB-10-002800
- Vuln IDs
-
- V-253687
- Rule IDs
-
- SV-253687r960960_rule
Checks: C-57139r841584_chk
Review the MariaDB software library directory and note other root directories located on the same disk directory or any subdirectories. The default install directory is /var/lib/mysql. If any non-MariaDB software directories exist on the disk directory, examine or investigate their use. If any of the directories are used by other applications, including third-party applications that use MariaDB, this is a finding. Only applications that are required for the functioning and administration, not use, of MariaDB should be located in the same disk directory as the MariaDB software libraries. If other applications are located in the same directory as MariaDB, this is a finding.
Fix: F-57090r841585_fix
Install all applications on directories separate from the MariaDB software library directory. Relocate any directories or reinstall other application software that currently shares the MariaDB software library directory.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MADB-10-002900
- Vuln IDs
-
- V-253688
- Rule IDs
-
- SV-253688r960960_rule
Checks: C-57140r841587_chk
Review system documentation to identify accounts authorized to have privileges against database objects. Review account privileges on objects in the database(s). To show the list of system privileges that the MariaDB server supports, run: MariaDB> SHOW PRIVILEGES; Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this database query 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. MariaDB> SHOW GRANTS FOR 'user'@'host'; Verify that all users have the correct privileges, if they do not, this is a finding. Only DEFINERS of routines (functions and procedures) can change routines. To view the DEFINERS of all functions and procedures, as database administrator run the following SQL: MariaDB> SELECT * FROM mysql.proc \G Only DEFINERS of triggers can change triggers. To view all triggers and their DEFINERS, as database administrator run the following SQL: MariaDB> SELECT * FROM information_schema.triggers \G If any database users are found to have unauthorized privileges on database objects, this is a finding.
Fix: F-57091r841588_fix
Assign ownership of authorized objects to authorized object owner accounts.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001499
- Version
- MADB-10-003000
- Vuln IDs
-
- V-253689
- Rule IDs
-
- SV-253689r960960_rule
Checks: C-57141r841590_chk
Gather a list of SHOW GRANTS commands. This list will include users and roles: MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user; Run each SHOW GRANTS commands and verify that all objects have the correct privileges, if they do not, this is a finding. MariaDB> SHOW GRANTS FOR 'user'@'host'; Find the data directory and verify its operating system privileges. MariaDB> SHOW GLOBAL VARIABLES LIKE '%datadir%'; # ls -al /path/to/datadir If permissions of the database directory are not limited to an authorized user account, this is a finding.
Fix: F-57092r841591_fix
As the database administrator, revoke any permissions from a role that are deemed unnecessary by running the following SQL: MariaDB> REVOKE PERMISSION FROM ROLE_NAME ; Revoke any roles from a user if they are deemed unnecessary by running the following SQL: MariaDB> REVOKE ROLE_NAME FROM test_user ; If the revoked role is the default role for the user, the REVOKE command should be followed by a command to set a new default role that has appropriate permissions, or no default role: MariaDB> SET DEFAULT ROLE NONE FOR test_user ; MariaDB> SET DEFAULT ROLE ROLE_NAME for test_user ;
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- MADB-10-003100
- Vuln IDs
-
- V-253690
- Rule IDs
-
- SV-253690r960963_rule
Checks: C-57142r841593_chk
As the database administrator, show all databases by running the following SQL: MariaDB> SHOW DATABASES; Determine if the test database still exists. If it does, this is a finding.
Fix: F-57093r841594_fix
If a test database is found, this is a sign that the mysql_secure_installation script was not ran when the database software was installed. It is recommended to do so. This script will prompt the user to set the MariaDB root user's password, remove all anonymous users, disallow the root user from logging in remotely to the database, remove the test database and access to it, and then reload the privilege tables. $ mariadb-secure-installation reply Y to setting a root password if one is not already set. reply Y to Remove anonymous users reply Y to disallow root login remotely reply Y to Remove test database and access to it reply Y to Reload privilege tables now (this ensures that all changes made so far will take effect immediately) Note: For this request only the "reply Y to Remove" test database and access to it is necessary, but "Y" to all the questions is recommended. Alternatively, simply dropping the test database will remedy the finding. MariaDB> DROP DATABASE test;
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- MADB-10-003200
- Vuln IDs
-
- V-253691
- Rule IDs
-
- SV-253691r960963_rule
Checks: C-57143r841596_chk
List all plugins and determine which are acceptable. MariaDB> SHOW PLUGINS; If unused plugins are installed and are not documented and authorized, this is a finding.
Fix: F-57094r841597_fix
To uninstall the plugin but leave the libraries in place: MariaDB> UNINSTALL PLUGIN plugin_name; To uninstall the plugin and the associated libraries: MariaDB> UNINSTALL SONAME plugin_name;
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000381
- Version
- MADB-10-003400
- Vuln IDs
-
- V-253692
- Rule IDs
-
- SV-253692r960963_rule
Checks: C-57144r841599_chk
MariaDB's LOAD DATA LOCAL INFILE command can interact with the server's underlying OS. To check the value of this option, run the following command as the database administrator: MariaDB> SHOW GLOBAL VARIABLES LIKE 'local_infile'; Verify the option is set according to the security guide. If it is not, this is a finding. If the value of local_infile is set to ON per the security guide, user privileges must be checked. Only users with FILE privilege can use the LOAD DATA LOCAL INFILE command. To check the users who have FILE privilege against the security guide, run the following commands as the database administrator. 1. Check which users have FILE privilege and GRANT OPTION privileges and compare to the security guide to determine if a user has FILE privilege that should not or if a user has GRANT OPTION and should not. If the users have privileges they should not have, this is a finding. 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. MariaDB> SHOW GRANTS FOR 'user'@'host'; 2. Check which roles have FILE privilege and GRANT OPTION privileges and compare to the security guide to determine if a role has FILE privilege that should not or if a role has GRANT OPTION and should not. If the roles have privileges they should not have, this is a finding. MariaDB> SELECT DISTINCT CONCAT('SHOW GRANTS FOR ',role, ';') FROM mysql.roles_mapping; Run each SHOW GRANTS command for each role. 3. From the two outputs above, check which users and roles can set roles and grant privileges by checking who has GRANT OPTION and FILE privileges and comparing to the security guide. If any user or role has GRANT OPTION or FILE privileges they should not have, this is a finding.
Fix: F-57095r841600_fix
To disable LOAD DATA LOCAL INFILE make the following update as the database administrator: Edit the mariadb-enterprise.cnf configuration file located in /etc/my.cnf.d/. Under [mariadb], add the following: local_infile = 0 Save the configuration file. This change will not take effect until MariaDB Enterprise Server is restarted. To remove FILE and GRANT OPTION privileges use the right combination of the following commands: 1. revoke FILE privilege from a user MariaDB> REVOKE FILE FROM 'user'@'host'; 2. revoke FILE privilege from a role MariaDB> REVOKE FILE FROM role; 3. revoke GRANT OPTION privilege from a user MariaDB> REVOKE GRANT OPTION FROM 'user'@'host'; 4. revoke a role grant from a user MariaDB> REVOKE ROLE FROM grantee;
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-000382
- Version
- MADB-10-003500
- Vuln IDs
-
- V-253693
- Rule IDs
-
- SV-253693r1043177_rule
Checks: C-57145r841602_chk
Review system documentation for a list of approved ports. As the database administrator, run the following command to determine the currently defined port: MariaDB> SHOW GLOBAL VARIABLES LIKE '%port%'; If the currently defined port is deemed prohibited, this is a finding.
Fix: F-57096r841603_fix
Modify the MariaDB configuration file located within /etc/my.cnf.d/ and update the variable port to an acceptable port. Restart MariaDB Enterprise Server. Example: [server] port = 4008
- RMF Control
- IA-2
- Severity
- M
- CCI
- CCI-000764
- Version
- MADB-10-003600
- Vuln IDs
-
- V-253694
- Rule IDs
-
- SV-253694r1051115_rule
Checks: C-57146r841605_chk
All users should have individual accounts with appropriate privileges. The root users should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB> SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.
Fix: F-57097r841606_fix
Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';
- RMF Control
- Severity
- H
- CCI
- CCI-004066
- Version
- MADB-10-003700
- Vuln IDs
-
- V-253695
- Rule IDs
-
- SV-253695r1018598_rule
Checks: C-57147r998222_chk
Check the simple_password_check plugin variables to ensure they match the password requirements. MariaDB> SHOW GLOBAL VARIABLES LIKE 'simple_password_check_%'; Determine whether the following rules are enforced. If they do not meet the following password requirements, this is a finding. a. minimum of 15 characters, including at least one of each of the following character sets: - Uppercase - Lowercase - Numerics - Special characters (e.g., ~ ! @ # $ % ^ & * ( ) _ + = - ' [ ] / ? > <) b. Minimum number of characters changed from previous password: 50 percent of the minimum password length; that is, eight.
Fix: F-57098r841609_fix
Locate the MariaDB Enterprise Server configuration file (mariadb-enterprise.cnf) which contains the simple_password_check plugin variables within /etc/my.cnf.d/. Edit the variables. Example: simple_password_check_digits = 2 simple_password_check_letters_same_case = 2 simple_password_check_minimal_length = 15 simple_password_check_other_characters = 2
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- MADB-10-003750
- Vuln IDs
-
- V-253696
- Rule IDs
-
- SV-253696r1018599_rule
Checks: C-57148r841611_chk
Check the default password lifetime variable to verify it matches the password requirement. MariaDB> SHOW GLOBAL VARIABLES LIKE 'default_password_lifetime%'; If the value returned is not 60 or less, this is a finding.
Fix: F-57099r841612_fix
Locate the MariaDB Enterprise Server configuration file (mariadb-enterprise.cnf) that contains the password variables within /etc/my.cnf.d/. Edit the variables. Example: default_password_lifetime = 60
- RMF Control
- Severity
- H
- CCI
- CCI-004062
- Version
- MADB-10-003800
- Vuln IDs
-
- V-253697
- Rule IDs
-
- SV-253697r1018600_rule
Checks: C-57149r841614_chk
MariaDB stores passwords encrypted. When querying users, the passwords are displayed encrypted. However, third-party applications, scripts, etc., might be storing passwords. In such cases, it is important to ensure these passwords are encrypted. Check all third-party applications, scripts, etc., which connect to the database and verify the passwords are encrypted. If any passwords are found in clear text, this is a finding.
Fix: F-57100r841615_fix
Document all applications, scripts, etc., which connect to the database server. Ensure passwords, if stored, are encrypted and secure.
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000197
- Version
- MADB-10-003900
- Vuln IDs
-
- V-253698
- Rule IDs
-
- SV-253698r961029_rule
Checks: C-57150r841617_chk
MariaDB by default only sends passwords encrypted. However, when authenticating via the PAM Authentication Plugin, the password is sent in cleartext. Thus when using PAM authentication, it is recommended to use TLS/SSL encryption for all database connections. If using PAM authentication, verify TLS/SSL is in use. Run the following database command: MariaDB> STATUS; Verify the line which starts with "SSL:" is as expected. If it returns "Not in use", this is a finding.
Fix: F-57101r841618_fix
As the administrator locate the MariaDB configuration file to change. This varies depending on setup and how configuration files are managed but should be in /etc/my.cnf.d/. It is recommended to have a separate configuration file within this directory for SSL connection information. In the [server] section add the lines for SSL: ssl ssl-ca=/path/to/ssl/ca-cert.pem ssl-cert=/path/to/ssl/server-cert.pem ssl-key=/path/to/ssl/server-key.pem Restart of the MariaDB Server and verify SSL is being used. MariaDB> STATUS; Verify line beginning with "SSL:".
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000185
- Version
- MADB-10-004000
- Vuln IDs
-
- V-253699
- Rule IDs
-
- SV-253699r961038_rule
Checks: C-57151r841620_chk
As the database administrator, list all users and their SSL setup by running the following: MariaDB> SELECT user, host, ssl_type FROM mysql.user; Use the result of the next query to verify the MariaDB Server is using certificates: MariaDB> STATUS; Verify the line beginning with "SSL:" returns expected SSL information. Using the following query, verify SSL is configured as expected: MariaDB> SHOW GLOBAL VARIABLES LIKE %ssl% ; If not configured as expected, this is a finding.
Fix: F-57102r841621_fix
As the administrator locate the MariaDB configuration file to change. This varies depending on setup and how configuration files are managed but should be in /etc/my.cnf.d/. It is recommended to have a separate configuration file within this directory for SSL connection information. In the [server] section add the lines for SSL: ssl-ca=/path/to/ssl/ca-cert.pem ssl-cert=/path/to/ssl/server-cert.pem ssl-key=/path/to/ssl/server-key.pem To fully implement SSL for MariaDB, the client settings and user accounts need to be set up as well. More information can be found here: https://mariadb.com/kb/en/securing-connections-for-client-and-server/
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000186
- Version
- MADB-10-004100
- Vuln IDs
-
- V-253700
- Rule IDs
-
- SV-253700r961041_rule
Checks: C-57152r841623_chk
First, as the database administrator, verify the following settings: Note: If no specific directory given before the filename, the files are stored in DATADIR. MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_key'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_crlpath'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'datadir'; Verify the permissions of the above files. Example: ls -al /path/to/ssl_cert MariaDB Enterprise Server runs as the mysql operating system user, thus should be owned by user mysql and group mysql with user read and group read file level permissions. Example: -r-------. 1 mysql If the files and directories are not properly secured, this is a finding.
Fix: F-57103r841624_fix
If the SSL files are not secured properly in the file system, change the ownership and permissions with operating system operations. Example: chown mysql:mysql /path/to/file chmod 440 /path/to/file
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000187
- Version
- MADB-10-004200
- Vuln IDs
-
- V-253701
- Rule IDs
-
- SV-253701r961044_rule
Checks: C-57153r841626_chk
Query all users to confirm issuer and subject are configured correctly: MariaDB>SELECT user, host, ssl_type, CAST(x509_issuer AS CHAR) AS issuer, CAST(x509_subject AS CHAR) AS subject FROM mysql.user; If users are not mapped correctly, this is a finding.
Fix: F-57104r841627_fix
Example command to create users with proper X509 certificate subject and issuer: MariaDB>CREATE USER 'janedoe'@'%' IDENTIFIED BY 'Some_Password_Here_$9' REQUIRE SUBJECT '/C=US/ST=Ohio/L=Columbus/O=MariaDB Corporation/CN=Jane Doe' AND ISSUER '/C=US/ST=Ohio/L=Columbus/O=MariaDB Corporation/CN=MariaDB CA';
- RMF Control
- IA-6
- Severity
- H
- CCI
- CCI-000206
- Version
- MADB-10-004300
- Vuln IDs
-
- V-253702
- Rule IDs
-
- SV-253702r961047_rule
Checks: C-57154r841629_chk
Verify best practices are documented and users trained to use the password command line interface flags appropriately. For example, the command line option --password (or -p) prompts for a password to be entered and obscures feedback on the typed in password. Ensure users are trained to use alternatives to command line password parameters, if they are not, this is a finding.
Fix: F-57105r841630_fix
When connecting to the database, the username and password are sent to the server via the command line interface or other connector interface. Using the command line interface, passing the -p or --password flags but not including the password in the command will prompt for the password and not display it on the screen as typed. Example: mariadb -u username -p
- RMF Control
- IA-7
- Severity
- H
- CCI
- CCI-000803
- Version
- MADB-10-004400
- Vuln IDs
-
- V-253703
- Rule IDs
-
- SV-253703r961050_rule
Checks: C-57155r841632_chk
As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE '%have_openssl'; If the value of have_openssl is not YES, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE '%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to verify it does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.
Fix: F-57106r841633_fix
If crypto.fips_enabled = 0, for Red Hat Linux, configure the operating system to implement DoD-approved encryption by following the steps below: To enable strict FIPS compliance, the fips=1 kernel option must be added to the kernel command line during system installation so key generation is done with FIPS-approved algorithms and continuous monitoring tests in place. Enable FIPS mode with the following command: # sudo fips-mode-setup --enable Modify the kernel command line of the current kernel in the "grub.cfg" file by adding the following option to the GRUB_CMDLINE_LINUX key in the "/etc/default/grub" file and then rebuild the "grub.cfg" file: fips=1 Changes to "/etc/default/grub" require rebuilding the "grub.cfg" file as follows: On BIOS-based machines, use the following command: # sudo grub2-mkconfig -o /boot/grub2/grub.cfg On UEFI-based machines, use the following command: # sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg If /boot or /boot/efi reside on separate partitions, the kernel parameter "boot=<partition of /boot or /boot/efi>" must be added to the kernel command line. Identify a partition by running the df /boot or df /boot/efi command: # sudo df /boot Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 495844 53780 416464 12% /boot To ensure the "boot=" configuration option will work even if device naming changes occur between boots, identify the universally unique identifier (UUID) of the partition with the following command: # sudo blkid /dev/sda1 /dev/sda1: UUID="05c000f1-a213-759e-c7a2-f11b7424c797" TYPE="ext4" For the example above, append the following string to the kernel command line: boot=UUID=05c000f1-a213-759e-c7a2-f11b7424c797 Reboot the system for the changes to take effect. More information can be found here: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
- RMF Control
- IA-8
- Severity
- M
- CCI
- CCI-000804
- Version
- MADB-10-004500
- Vuln IDs
-
- V-253704
- Rule IDs
-
- SV-253704r961053_rule
Checks: C-57156r841635_chk
All users should have individual accounts with appropriate privileges. The root users should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB> SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.
Fix: F-57107r841636_fix
Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';
- RMF Control
- SC-2
- Severity
- M
- CCI
- CCI-001082
- Version
- MADB-10-004600
- Vuln IDs
-
- V-253705
- Rule IDs
-
- SV-253705r1051299_rule
Checks: C-57157r1051297_chk
To show the list of system privileges that the MariaDB server supports, run: MariaDB> SHOW PRIVILEGES; Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this database query 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. MariaDB> SHOW GRANTS FOR 'user'@'host'; 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 If administrator and general user functionality are not separated either physically or logically, this is a finding.
Fix: F-57108r1051298_fix
Configure MariaDB Enterprise Server to separate database administration and general user functionality. Do not grant Create user, Event, Process, Proxy, Reload, Replication client, Replication slave, Show databases, Shutdown, Super, Create tablespace privileges to users and roles that do not require it. To remove privileges, refer to the following examples: 1. Revoke privileges from a specific user: MariaDB> REVOKE SUPER, PROCESS ON *.* FROM 'user'@'host'; 2. Revoke privileges from a role: MariaDB> REVOKE 'role' FROM 'user'@'host';
- RMF Control
- SC-23
- Severity
- M
- CCI
- CCI-001185
- Version
- MADB-10-004700
- Vuln IDs
-
- V-253706
- Rule IDs
-
- SV-253706r1043179_rule
Checks: C-57158r841641_chk
As the database administrator, run the following SQL: MariaDB> SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_interval'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_probes'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_time'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'tcp_nodelay'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'max_statement_time'; If these settings are not set, this is a finding.
Fix: F-57109r841642_fix
As the administrator locate the my.cnf file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: tcp_keepalive_interval == seconds https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_interval/ tcp_keepalive_probes == number of probes https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_probes/ tcp_keepalive_time == seconds https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_time/ tcp_nodelay == boolean (off or on) https://mariadb.com/docs/reference/mdb/system-variables/tcp_nodelay/ max_statement_time == seconds https://mariadb.com/docs/reference/mdb/system-variables/max_statement_time/
- RMF Control
- SC-23
- Severity
- M
- CCI
- CCI-001188
- Version
- MADB-10-004900
- Vuln IDs
-
- V-253707
- Rule IDs
-
- SV-253707r1043181_rule
Checks: C-57159r841644_chk
Determine if MariaDB is configured to require SSL. MariaDB> SHOW GLOBAL VARIABLES LIKE 'require_secure_transport'; If require_secure_transport is not "ON", this is a finding.
Fix: F-57110r841645_fix
Modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable require_secure_transport to "ON" under the server section. Restart MariaDB Enterprise Server. Example: [server] require_secure_transport = ON
- RMF Control
- SC-24
- Severity
- M
- CCI
- CCI-001190
- Version
- MADB-10-005000
- Vuln IDs
-
- V-253708
- Rule IDs
-
- SV-253708r961122_rule
Checks: C-57160r841647_chk
Verify InnoDB logging is configured. As the database administrator, verify the following settings: Note: If no specific directory is given before the filename, the files are stored in DATADIR. MariaDB> SHOW GLOBAL VARIABLES LIKE 'log_bin'; If value is "OFF", this is a finding.
Fix: F-57111r841648_fix
If value of log_bin is "OFF", modify the MariaDB configuration file. This can be found in /etc/my.cnf.d/. Optionally specify the location of the binary logs by specifying the full path for the binary logs. [mariadb] log_bin=mariadb_bin
- RMF Control
- SC-24
- Severity
- M
- CCI
- CCI-001665
- Version
- MADB-10-005100
- Vuln IDs
-
- V-253709
- Rule IDs
-
- SV-253709r961125_rule
Checks: C-57161r841650_chk
Verify InnoDB logging is configured. As the database administrator, verify the following settings: Note: If no specific directory is given before the filename, the files are stored in DATADIR. MariaDB> SHOW GLOBAL VARIABLES LIKE 'log_bin'; If value is "OFF", this is a finding.
Fix: F-57112r841651_fix
If value of log_bin is "OFF", modify the MariaDB configuration file. This can be found in /etc/my.cnf.d/. Optionally specify the location of the binary logs by specifying the full path for the binary logs. [mariadb] log_bin=mariadb_bin
- RMF Control
- SC-28
- Severity
- H
- CCI
- CCI-001199
- Version
- MADB-10-005200
- Vuln IDs
-
- V-253710
- Rule IDs
-
- SV-253710r961128_rule
Checks: C-57162r841653_chk
If the application owner and Authorizing Official have determined that encryption of data at rest is NOT required, this is not a finding. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed, check the following variables as the Database administrator: MariaDB> SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB> SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm these are ON. If disk or filesystem requires encryption, ask the system owner, DBA, and SA to demonstrate the use of disk-level encryption. If this is required and is not found, this is a finding. If controls do not exist or are not enabled, this is a finding.
Fix: F-57113r841654_fix
MariaDB's data-at-rest encryption requires the use of a key management and encryption plugin. These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data. MariaDB supports the use of multiple encryption keys. Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports key rotation, then encryption keys can also be rotated, which creates a new version of the encryption key. The File Key Management plugin that ships with MariaDB is a key management and encryption plugin that reads encryption keys from a plain-text file. Although the plugin's shared library is distributed with MariaDB by default, the plugin is not installed by MariaDB by default. The plugin can be installed by providing the --plugin-load or the --plugin-load-add options. This can be specified as a command-line argument to mysqld or it can be specified in a relevant server option group in an option file. For example: [mariadb] ... plugin_load_add = file_key_management Creating the Key File: To encrypt tables with encryption keys using the File Key Management plugin, first create the file that contains the encryption keys. The file must contain two pieces of information for each encryption key. First, each encryption key must be identified with a 32-bit integer as the key identifier. Second, the encryption key itself must be provided in hex-encoded form. These two pieces of information must be separated by a semicolon. For example, the file is formatted in the following way: <encryption_key_id1>;<hex-encoded_encryption_key1> <encryption_key_id2>;<hex-encoded_encryption_key2> The key file can also be optionally encrypted to make it less accessible from the file system. That is explained further in the section below. The File Key Management plugin uses Advanced Encryption Standard (AES) to encrypt data, which supports 128-bit, 192-bit, and 256-bit encryption keys. Therefore, the plugin also supports 128-bit, 192-bit, and 256-bit encryption keys. Random encryption keys can be generated using the openssl rand command. For example, to create a random 256-bit (32-byte) encryption key, run the following command: $ openssl rand -hex 32 a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a Copy this encryption key to the key file using a text editor, or append a series of keys to a new key file. For example, to append three new encryption keys to a new key file, execute the following: $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile The new key file would look something like the following after this step: a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a 49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b 8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3 The key file still needs to have a key identifier for each encryption key added to the beginning of each line. Key identifiers do not need to be contiguous. Open the new key file in the preferred text editor and add the key identifiers. For example, the key file would look something like the following after this step: 1;a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a 2;49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b 100;8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3 The key identifiers give the user a way to reference the encryption keys from MariaDB. In the example above, encryption keys can be referenced using the key identifiers 1, 2, or 100 with the ENCRYPTION_KEY_ID table option or with system variables such as innodb_default_encryption_key_id. Multiple encryption keys are not always necessary; the encryption key with the key identifier "1" is the only mandatory encryption key. Once the File Key Management Plugin is enabled, use it by creating an encrypted table: CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES Now, table t will be encrypted using the encryption key from the key file.
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- MADB-10-005400
- Vuln IDs
-
- V-253711
- Rule IDs
-
- SV-253711r961149_rule
Checks: C-57163r841656_chk
Review the procedures for the refreshing of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose. Verify that copies of production data are not left in unprotected locations. If the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.
Fix: F-57114r841657_fix
Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy, and to ensure copies of production data are not left in unsecured locations.
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- MADB-10-005500
- Vuln IDs
-
- V-253712
- Rule IDs
-
- SV-253712r961149_rule
Checks: C-57164r841659_chk
Review the procedures for the refreshing of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose. Verify that copies of production data are not left in unprotected locations. If the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.
Fix: F-57115r841660_fix
Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy, and to ensure copies of production data are not left in unsecured locations.
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- MADB-10-005600
- Vuln IDs
-
- V-253713
- Rule IDs
-
- SV-253713r961149_rule
Checks: C-57165r841662_chk
By default, all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql. To find the location of the datadir run this command: Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir'; Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name, that file will still be in the default directory. error_log innodb_log_group_home_dir innodb_temp_data_file_path innodb_tmpdir innodb_undo_directory innodb_temp_data_file_path innodb_tmpdir log_bin_basename log_error relay_log_basename relay_log_file_info sql_error_log_filename tmpdir Review the permissions granted to users by the operating system/file system on the database files, database log files, and database backup files. To verify that all files are owned by the database administrator and have the correct permissions, run the following as the database administrator: $ sudo su - root $ ls -lR {datadir} $ ls -lR other directories defined by variables above If using mysqldump or another tool for backups, also run the "ls" command as above on the directory that will be containing the backup file. If any files are not owned by the database administrator or allow anyone but the database administrator to read/write/execute, this is a finding. If any user/role who is not an authorized system administrator with a need-to-know, database administrator with a need-to-know, or system account for running MariaDB processes is permitted to read/view any of these files, this is a finding.
Fix: F-57116r841663_fix
By default all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql. To find the location of the datadir run this command: Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir'; Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name that file will still be in the datadir directory. error_log innodb_log_group_home_dir innodb_temp_data_file_path innodb_tmpdir innodb_undo_directory innodb_temp_data_file_path innodb_tmpdir log_bin_basename log_error relay_log_basename relay_log_file_info sql_error_log_filename tmpdir Configure the permissions granted by the operating system/file system on the database files, database log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files. Any files (e.g., extra configuration files) created in datadir, or a nondefault directory defined by a variable above, must be owned by the database administrator, with only owner permissions to read, write, and execute.
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-001310
- Version
- MADB-10-005700
- Vuln IDs
-
- V-253714
- Rule IDs
-
- SV-253714r961158_rule
Checks: C-57166r841665_chk
Review MariaDB code (trigger procedures, functions), application code, settings, column and field definitions, and constraints to determine whether the database is protected against invalid input. If code exists that allows invalid data to be acted upon or input into the database, this is a finding. If column/field definitions do not exist in the database, this is a finding. If columns/fields do not contain constraints and validity checking where required, this is a finding. Where a column/field is noted in the system documentation as necessarily free-form, even though its name and context suggest that it should be strongly typed and constrained, the absence of these protections is not a finding. Where a column/field is clearly identified by name, caption or context as Notes, Comments, Description, Text, etc., the absence of these protections is not a finding. Check application code that interacts with MariaDB for the use of prepared statements. If prepared statements are not used, this is a finding.
Fix: F-57117r841666_fix
Modify database code to properly validate data before it is put into the database or acted upon by the database. Modify the database to contain constraints and validity checking on database columns and tables that require them for data integrity. Use prepared statements when taking user input. Do not allow general users direct console access to MariaDB.
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-001310
- Version
- MADB-10-005800
- Vuln IDs
-
- V-253715
- Rule IDs
-
- SV-253715r961158_rule
Checks: C-57167r841668_chk
Review MariaDB source code (stored procedures, functions, triggers) and application source code, to identify cases of dynamic code execution. To list all stored procedures, functions, and triggers in the database, as the database administrator, run the following SQL: MariaDB> SHOW FUNCTION STATUS; MariaDB> SHOW PROCEDURE STATUS; MariaDB> SHOW TRIGGERS; Any user input should be handled through prepared statements. If dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, this is a finding.
Fix: F-57118r841669_fix
Where dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, modify the code to do so.
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-001310
- Version
- MADB-10-005900
- Vuln IDs
-
- V-253716
- Rule IDs
-
- SV-253716r961158_rule
Checks: C-57168r841671_chk
Review MariaDB source code (stored procedures, functions, triggers) and application source code to identify cases of dynamic code execution. If dynamic code execution is employed without protective measures against code injection, this is a finding.
Fix: F-57119r841672_fix
Where dynamic code execution is used, modify the code to implement protections against code injection.
- RMF Control
- AC-12
- Severity
- M
- CCI
- CCI-002361
- Version
- MADB-10-006200
- Vuln IDs
-
- V-253717
- Rule IDs
-
- SV-253717r1043182_rule
Checks: C-57169r841674_chk
MariaDB has five global variables that can be set so that connections will be closed after a certain period of inactivity. Check the values for these variables and verify they correspond to security procedures defined: MariaDB> SHOW GLOBAL VARIABLES LIKE '%timeout%'; interactive_timeout - Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it. See also wait_timeout. wait_timeout - Time in seconds that the server waits for a connection to become active before closing it. The session value is initialized when a thread starts up from either the global value, if the connection is noninteractive, or from the interactive_timeout value, if the connection is interactive. In situations where transactions may be started, but not committed or rolled back, more granular control and a shorter timeout may be desirable so as to avoid locks being held for too long. idle_transaction_timeout idle_write_transaction_timeout idle_readonly_transaction_timeout Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the security procedures require server-side session termination within a specified amount of time but MariaDB is not configured accordingly, this is a finding.
Fix: F-57120r841675_fix
Configure MariaDB to automatically terminate a user's session based on security procedures requirements regarding conditions or trigger events that require session termination. To change the values of the following timeout variables to conform to organization-defined values for triggering conditions or events requiring session termination select the appropriate variable to change and as the database administrator. As the administrator locate the MariaDB Enterprise Server configuration file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: interactive_timeout = value wait_timeout = value idle_transaction_timeout = value idle_write_transaction_timeout = value idle_readonly_transaction_timeout = value Where value is in seconds and corresponds to the company defined value. Restart MariaDB Enterprise Server for these changes to take effect.
- RMF Control
- AC-12
- Severity
- M
- CCI
- CCI-002363
- Version
- MADB-10-006300
- Vuln IDs
-
- V-253718
- Rule IDs
-
- SV-253718r961224_rule
Checks: C-57170r841677_chk
MariaDB has five global variables which can be set so that connections will be closed after a certain period of inactivity. Check the values for these variables and verify they correspond to security procedures defined: MariaDB> SHOW GLOBAL VARIABLES LIKE '%timeout%'; interactive_timeout - Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it. See also wait_timeout. wait_timeout - Time in seconds that the server waits for a connection to become active before closing it. The session value is initialized when a thread starts up from either the global value, if the connection is noninteractive, or from the interactive_timeout value, if the connection is interactive. In situations where transactions may be started, but not committed or rolled back, more granular control and a shorter timeout may be desirable so as to avoid locks being held for too long. idle_transaction_timeout idle_write_transaction_timeout idle_readonly_transaction_timeout Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the security procedures require server-side session termination within a specified amount of time but MariaDB is not configured accordingly, this is a finding.
Fix: F-57121r841678_fix
As an authorized user locate the session to be terminated and terminate that session. To locate a session and terminate the session follow the following steps: 1. Connect to the MariaDB database using an authorized user: mariadb -u admin_user -p 2. At the MariaDB prompt run either of the following commands: MariaDB> SHOW PROCESSLIST; MariaDB> SELECT id, user, host, db, command, time, state, info, progress FROM information_schema.processlist; 3. Identify the session to be terminated and issue kill process number from display. (**This will kill the session.**) Example: MariaDB> KILL 192; 4. A kill query process number can be issued from display. (**This will kill the active query but leave the session active for run-away queries. **) Configure MariaDB to automatically terminate a user session based on security procedures requirements regarding conditions or trigger events that require session termination. To change the values of the following timeout variables to conform to organization-defined values for triggering conditions or events requiring session termination, select the appropriate variable to change as the database administrator. As the administrator locate the MariaDB Enterprise Server configuration file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: interactive_timeout = value wait_timeout = value idle_transaction_timeout = value idle_write_transaction_timeout = value idle_readonly_transaction_timeout = value Where value is in seconds and corresponds to the company defined value. Restart MariaDB Enterprise Server for these changes to take effect.
- RMF Control
- AC-16
- Severity
- M
- CCI
- CCI-002262
- Version
- MADB-10-006400
- Vuln IDs
-
- V-253719
- Rule IDs
-
- SV-253719r961269_rule
Checks: C-57171r841680_chk
If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in storage, this is a finding.
Fix: F-57122r841681_fix
Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/
- RMF Control
- AC-16
- Severity
- M
- CCI
- CCI-002263
- Version
- MADB-10-006500
- Vuln IDs
-
- V-253720
- Rule IDs
-
- SV-253720r961272_rule
Checks: C-57172r841683_chk
If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in process, this is a finding.
Fix: F-57123r841684_fix
Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/
- RMF Control
- AC-16
- Severity
- M
- CCI
- CCI-002264
- Version
- MADB-10-006600
- Vuln IDs
-
- V-253721
- Rule IDs
-
- SV-253721r961275_rule
Checks: C-57173r841686_chk
If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in transmission, this is a finding.
Fix: F-57124r841687_fix
Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/
- RMF Control
- AC-3
- Severity
- M
- CCI
- CCI-002165
- Version
- MADB-10-006700
- Vuln IDs
-
- V-253722
- Rule IDs
-
- SV-253722r961317_rule
Checks: C-57174r841689_chk
Review system documentation to identify the required DAC. Review the security configuration of the database and MariaDB. If applicable, review the security configuration of the application(s) using the database. If the discretionary access control defined in the documentation is not implemented in the security configuration, this is a finding. To check the permissions granted to a user use the following queries: As the database administrator, run the following SQL: **For user privileges: 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. Verify that all users have the correct privileges. If they do not, this is a finding. **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. Verify that all roles have the correct privileges. If they do not, this is a finding. **To determine if a role has admin_option (Whether the role can be granted by a particular user) MariaDB> SELECT * FROM mysql.roles_mapping; Verify that all privileges are correct. If they are not, this is a finding.
Fix: F-57125r841690_fix
Implement the organization's DAC policy in the security configuration of the database and DBMS, and, if applicable, the security configuration of the application(s) using the database. To grant and revoke privileges, as the database administrator, use the following SQL syntax: **To Grant User and Role privileges: MariaDB> GRANT privilege ON database . table TO user|role ; **To Revoke User and Role privileges: MariaDB> REVOKE privilege_type ON database . table FROM user|role ;
- RMF Control
- AC-6
- Severity
- M
- CCI
- CCI-002235
- Version
- MADB-10-006800
- Vuln IDs
-
- V-253723
- Rule IDs
-
- SV-253723r961353_rule
Checks: C-57175r841692_chk
Review the system documentation to obtain the definition of the database/MariaDB functionality considered privileged in the context of the system in question. Review the MariaDB security configuration and/or other means used to protect privileged functionality from unauthorized use. If the configuration does not protect all of the actions defined as privileged, this is a finding.
Fix: F-57126r841693_fix
Configure MariaDB security to protect all privileged functionality.
- RMF Control
- AC-6
- Severity
- M
- CCI
- CCI-002233
- Version
- MADB-10-006900
- Vuln IDs
-
- V-253724
- Rule IDs
-
- SV-253724r961359_rule
Checks: C-57176r841695_chk
Functions and Procedures in MariaDB all have DEFINER and SECURITY_TYPE options. If SECURITY_TYPE = DEFINER then the function or procedure is run using the privileges of the DEFINER account. If SECURITY_TYPE = INVOKER, then they will be run using the privileges of the user invoking the function or procedure. To list the values of the DEFINER and SECURITY_TYPE in functions and procedures as the database administrator, run the following SQL: MariaDB> SELECT ROUTINE_NAME, ROUTINE_SCHEMA, ROUTINE_TYPE, DEFINER, SECURITY_TYPE FROM information_schema.routines WHERE ROUTINE_SCHEMA NOT IN ('sys','mysql'); Triggers in MariaDB have a DEFINER option. For Triggers the value of the DEFINER determines the privileges to be used at trigger activation time. To list the values of the DEFINER in Triggers, as the database administrator, run the following SQL: MariaDB> SELECT trigger_schema, trigger_name, action_statement, definer FROM information_schema.triggers; If elevation of MariaDB privileges is utilized but not documented, this is a finding. If elevation of MariaDB privileges is documented, but not implemented as described in the documentation, this is a finding. If the privilege-elevation logic can be invoked in ways other than intended, or in contexts other than intended, or by subjects/principals other than intended, this is a finding.
Fix: F-57127r841696_fix
Determine where, when, how, and by what principals/subjects elevated privilege is needed. To change the values of the SECURITY_TYPE for functions and procedures: MariaDB> USE <database>; MariaDB> ALTER FUNCTION procedure_name | function_name sql security INVOKER | DEFINER ; To change the values of the DEFINER for functions, procedures, and triggers, run the following SQL as the database administrator: MariaDB> SHOW CREATE function | procedure ; MariaDB> DROP function | procedure ; Recreate the function or procedure using the results of the create statement (from the SHOW CREATE results above), with the definer set to the desired user.
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001849
- Version
- MADB-10-007300
- Vuln IDs
-
- V-253727
- Rule IDs
-
- SV-253727r961392_rule
Checks: C-57179r841704_chk
Investigate whether there have been any incidents where MariaDB ran out of audit file log disk space since the last time the space was allocated or other corrective measures were taken. If there have been incidents where MariaDB ran out of audit log file disk space, this is a finding. MariaDB can be configured to use syslog or any OS system file to store audit records to designated disk directories. Check the log file location: To check how much storage capacity is available for audit records, first determine the location where the audit logs are being written by executing the following command. Run the following SQL: show global variables like 'server_audit%' ; For system logs (syslog): From the query above verify the value of: server_audit_output_type=SYSLOG For OS file: From the query above verify the value of: server_audit_output_type=FILE If written to SYSLOG, follow the procedure for storage in the corresponding OS STIG. If written to FILE, check the remaining storage on the disk. If it does not meet organizationally defined audit record storage requirements, this is a finding.
Fix: F-57130r841705_fix
MariaDB audit log file location either goes to the syslog directory (if logging is set to SYSLOG) or is controlled by the server_audit_file_path in the MariaDB my.cnf configuration file. If the audit log file directory does not have enough disk space available, then increase the diskspace available for the audit log file directory or move the audit log file directory to another location that has more disk space available. Allocate sufficient audit file space to support peak demand. If server_audit_output_type=FILE set the directory in /etc/my.cnf to one that is managed by the centralized management system. [mariadb] server_audit_file_path= mydir / mylogfilename .log Now, as the system administrator, restart the server with the new configuration: $ systemctl restart mysqld Allocate sufficient audit file space to support peak demand for the log files.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001855
- Version
- MADB-10-007400
- Vuln IDs
-
- V-253728
- Rule IDs
-
- SV-253728r961398_rule
Checks: C-57180r841707_chk
Review OS, or third-party logging application settings to determine whether a warning will be provided when 75 percent of DBMS audit log storage capacity is reached. If no warning will be provided, this is a finding.
Fix: F-57131r841708_fix
Configure the system to notify appropriate support staff immediately upon storage volume utilization reaching 75 percent. MariaDB does not monitor storage, however, it is possible to monitor storage with a script. ##### Example Monitoring Script #!/bin/bash DATADIR=/var/lib/psql/mysql CURRENT=$(df ${DATADIR?} | grep / | awk '{ print $5}' | sed 's/%//g') THRESHOLD=75 if [ "$CURRENT" -gt "$THRESHOLD" ] ; then mail -s 'Disk Space Alert' mail@support.com << EOF The data directory volume is almost full. Used: $CURRENT %EOF fi Schedule this script in cron to run around the clock.
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-001858
- Version
- MADB-10-007500
- Vuln IDs
-
- V-253729
- Rule IDs
-
- SV-253729r961401_rule
Checks: C-57181r841710_chk
Review MariaDB Server settings, OS, or third-party logging software settings to determine whether a real-time alert will be sent to the appropriate personnel when auditing fails for any reason. If real-time alerts are not sent upon auditing failure, this is a finding.
Fix: F-57132r841711_fix
Configure the system to provide an immediate real-time alert to appropriate support staff when a specified audit failure occurs. It is possible to create scripts or implement third-party tools to enable real-time alerting for audit failures in MariaDB.
- RMF Control
- AU-8
- Severity
- M
- CCI
- CCI-001890
- Version
- MADB-10-007600
- Vuln IDs
-
- V-253730
- Rule IDs
-
- SV-253730r961443_rule
Checks: C-57182r841713_chk
Check the current timezone value by running the following command as an administrative user: MariaDB> SHOW GLOBAL VARIABLES LIKE '%zone%'; If time_zone = SYSTEM, and system_time_zone is not equal to UTC, this is a finding. If time_zone is not SYSTEM and is not UTC, this is a finding.
Fix: F-57133r841714_fix
On the OS command line run the following command to get the time zone the system is in: date | awk '{print $5;}' If the system is in UTC, to set the time zone for timestamps to UTC, modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable time_zone to SYSTEM under the server section. Restart MariaDB Enterprise Server. Example: [server] Timezone = SYSTEM If the OS system timezone is not set to UTC, to set the time zone for timestamps to UTC, modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable time_zone to UTC under the server section. Restart MariaDB Enterprise Server. Example: [server] Timezone = UTC
- RMF Control
- Severity
- M
- CCI
- CCI-003980
- Version
- MADB-10-007800
- Vuln IDs
-
- V-253731
- Rule IDs
-
- SV-253731r1018601_rule
Checks: C-57183r998226_chk
If MariaDB supports only software development, experimentation and/or developer-level testing (that is, excluding production systems, integration testing, stress testing, and user acceptance testing), this is not a finding. Review MariaDB and database security settings with respect to nonadministrative users ability to create, alter, or replace logic modules, to include but not necessarily only stored procedures, functions, triggers, and views. 1. To list the privileges for all users on all tables and schemas, as the database administrator, do the following: 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. Only DEFINERS of routines (functions and procedures) can change routines. To view the DEFINERS of all functions and procedures, as database administrator run the following SQL: MariaDB> SELECT * FROM mysql.proc \G 3. Only DEFINERS of triggers can change triggers. To view all triggers and their DEFINERS, as database administrator run the following SQL: MariaDB> SELECT * FROM information_schema.triggers \G 4. Views: At view definition time, the view creator must have the privileges needed to use the top-level objects accessed by the view. For example, if the view definition refers to table columns, the creator must have privileges for the columns, as described previously. If the definition refers to a stored function, only the privileges needed to invoke the function can be checked. The privileges required when the function runs can be checked only as it executes. For different invocations of the function, different execution paths within the function might be taken. If any such permissions exist and are not documented and approved, this is a finding.
Fix: F-57134r841717_fix
Document and obtain approval for any nonadministrative users who require the ability to create, alter, or replace logic modules. Check the security guide to implement the approved permissions. Revoke any unapproved permissions.
- RMF Control
- CM-5
- Severity
- M
- CCI
- CCI-001813
- Version
- MADB-10-007900
- Vuln IDs
-
- V-253732
- Rule IDs
-
- SV-253732r961461_rule
Checks: C-57184r841719_chk
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.
Fix: F-57135r841720_fix
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 ;
- RMF Control
- Severity
- M
- CCI
- CCI-003938
- Version
- MADB-10-008000
- Vuln IDs
-
- V-253733
- Rule IDs
-
- SV-253733r1018602_rule
Checks: C-57185r841722_chk
To verify that system denies are logged when unprivileged users attempt to change database configuration, run the following commands using the database administrator, and a newly created user shown here as test_user: MariaDB> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'TEst_Password!2'; MariaDB> CREATE DATABASE myapp; MariaDB> CREATE TABLE myapp.mytable (a int, b char(10)); As the newly created test_user, alter the table: $ mariadb -u test_user -p Enter password: MariaDB> ALTER TABLE mytable ADD COLUMN (c int); Check the latest log to determine if the denial is logged. For example: $ tail -f /var/log/mysql/audit.log 20190909 12:14:29,osboxes,test_user9,localhost,21,0,CONNECT,,,0 20190909 12:14:29,osboxes,test_user9,localhost,21,10,QUERY,, alter table myapp.mytable add column (c int) ,1142 20190909 12:14:29,osboxes,test_user9,localhost,21,0,DISCONNECT,,,0 If the denial is not produced, this is a finding. By default MariaDB configuration files are owned by the OS Administrator user (here root) and cannot be edited by nonprivileged users: $ ls -la /etc | grep my.cnf -rw-r--r--. 1 root root 301 Aug 25 12:45 my.cnf If my.cnf is not owned by the OS administrator (chown here as root) and does not have read and write permissions for the owner, this is a finding.
Fix: F-57136r841723_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' )); If the config files are not secured properly in the file system, change the ownership and permissions with operating system operations. Example: chown root:root /etc/my.cnf.d chmod 644 /etc/my.cnf.d
- RMF Control
- CM-7
- Severity
- M
- CCI
- CCI-001762
- Version
- MADB-10-008100
- Vuln IDs
-
- V-253734
- Rule IDs
-
- SV-253734r961470_rule
Checks: C-57186r841725_chk
Check the ports in use by running the following command as the administrator user: MariaDB > SHOW GLOBAL VARIABLES LIKE 'port'; If the currently defined port configuration is deemed prohibited, this is a finding.
Fix: F-57137r841726_fix
To verify that mariadb system denies specific network functions, locate cnf file and specifically bind ip address to deny (or port): $ ls -la /etc | grep my.cnf -rw-r--r--. 1 root root 301 Aug 25 12:45 my.cnf bind-address = 127.0.0.1 #just an example To specifically change default port (3306) is something different: port = 1234 bind = 10.10.10.10 #as an example After making changes to the .cnf file, stop and restart the database service.
- RMF Control
- Severity
- M
- CCI
- CCI-004895
- Version
- MADB-10-008200
- Vuln IDs
-
- V-253735
- Rule IDs
-
- SV-253735r1050788_rule
Checks: C-57187r841728_chk
Determine all situations where a user must reauthenticate. Check if the mechanisms that handle such situations use the following SQL: To make a single user reauthenticate, an existing connection must be present: To search for a specific user: MariaDB> SELECT * FROM information_schema.PROCESSLIST where user ='<name>' and host like '%'; To review all connections: MariaDB> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; Note the ID(s) (processlist_id) of the connection(s) for the user that must reauthenticate. To make a user reauthenticate, run the following for each ID returned above (as they can have multiple connections): MariaDB> KILL CONNECTION processslist_id; If the provided SQL does not force reauthentication, this is a finding.
Fix: F-57138r841729_fix
To force a single user reauthenticate, the user must be currently authenticated to the database server. Find the process ID of the user in question: MariaDB> SELECT id FROM information_schema.processlist WHERE user = 'username'; Use the id to kill the process, which kills the connection and forces the user to reauthenticate: MariaDB> KILL id; To force all users to reauthenticate, run the following as the database administrator: MariaDB> SELECT concat( KILL ,id, ; ) FROM information_schema.processlist INTO OUTFILE /tmp/x.txt; MariaDB> SOURCE /tmp/x.txt;
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-002007
- Version
- MADB-10-008300
- Vuln IDs
-
- V-253736
- Rule IDs
-
- SV-253736r961521_rule
Checks: C-57188r841731_chk
The system parameter idle_transaction_timeout specifies in seconds when a connection will be terminated due to inactivity. After a connection is terminated, a new request to the database must be preceded by an authentication, which is not cached within the database. Run the following SQL: MariaDB> SHOW GLOBAL VARIABLES LIKE 'idle_transaction_timeout'; If the value is 0, this is a finding.
Fix: F-57139r841732_fix
Verify that the idle_transaction_wait is set to a value greater than 0 or is set to the value needed by the administrator. The value of idle_transaction_wait can be validated by issuing SHOW VARIABLES. Example: Locate the MariaDB Enterprise Server configuration files in /etc/my.cnf.d/. Add the following: Under the [mariadb] section: idle_transaction_timeout = 60 After making changes to the .cnf file, stop and restart the database service.
- RMF Control
- SC-13
- Severity
- H
- CCI
- CCI-002450
- Version
- MADB-10-008400
- Vuln IDs
-
- V-253737
- Rule IDs
-
- SV-253737r962034_rule
Checks: C-57189r841734_chk
If MariaDB is deployed in an unclassified environment, this is not applicable (NA). If MariaDB is not using NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards, this is a finding. To check if MariaDB is configured to use SSL, as the database administrator: MariaDB> SHOW GLOBAL VARIABLES LIKE 'have_ssl'; If have_ssl is not YES, this is a finding. Consult network administration staff to determine whether the server is protected by NSA-approved encrypting devices. If not, this a finding.
Fix: F-57140r841735_fix
Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/
- RMF Control
- SC-23
- Severity
- M
- CCI
- CCI-002470
- Version
- MADB-10-008500
- Vuln IDs
-
- V-253738
- Rule IDs
-
- SV-253738r961596_rule
Checks: C-57190r841737_chk
As the database administrator, check the following variables: MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; The Value column will show the fully qualified file name of the ssl_ca and ssl_cert respectively. The issuer can be found by running the following command: $ openssl x509 -in fully-qualified-file-name-of-ssl_ca -noout -issuer $ openssl x509 -in fully-qualified-file-name-of-ssl_cert -noout -issuer The issuer should be checked against the authoritative list of DoD-approved PKIs, which is published at https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/pdf/unclass-ss_using_commercial_pki_certificates.pdf. If the DBMS will accept non-DoD approved PKI end-entity certificates, this is a finding.
Fix: F-57141r841738_fix
Revoke trust in any certificates not issued by a DoD-approved certificate authority. Configure MariaDB to accept only DoD and DoD-approved PKI end-entity certificates.
- RMF Control
- SC-28
- Severity
- H
- CCI
- CCI-002475
- Version
- MADB-10-008600
- Vuln IDs
-
- V-253739
- Rule IDs
-
- SV-253739r1018554_rule
Checks: C-57191r841740_chk
Review the security guide to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. Review the configuration of MariaDB, operating system/file system, and additional software as relevant. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed, check the following variables as the Database administrator: MariaDB> SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB> SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm that these are ON. If any of the information defined as requiring cryptographic protection from modification is not encrypted in a manner that provides the required level of protection, this is a finding.
Fix: F-57142r841741_fix
Configure MariaDB, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection. Once the File Key Management Plugin is enabled, use it by creating an encrypted table: MariaDB> CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES; Now, table t will be encrypted using the encryption key from the key file.
- RMF Control
- SC-28
- Severity
- H
- CCI
- CCI-002476
- Version
- MADB-10-008700
- Vuln IDs
-
- V-253740
- Rule IDs
-
- SV-253740r1018555_rule
Checks: C-57192r841743_chk
Review the security guide to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. Review the configuration of MariaDB, operating system/file system, and additional software as relevant. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed check the following variables as the Database administrator: MariaDB> SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB> SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm that these are ON. If any of the information defined as requiring cryptographic protection from modification is not encrypted in a manner that provides the required level of protection, this is a finding.
Fix: F-57143r841744_fix
Configure MariaDB, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection for information requiring cryptographic protection against disclosure. Secure the premises, equipment, and media to provide the required level of physical protection. One possible way to encrypt data within MariaDB is: How to Set Up and Configure MariaDB for Data-at-Rest Encryption Generate random encryption keys using openssl rand command. $ mkdir -p /etc/mysql/encryption $ for i in {1..5}; do openssl rand -hex 32 >> /etc/mysql/encryption/keyfile; done; Open and edit the file /etc/mysql/encryption/keyfile and add the key IDs that will be referenced when creating encrypted tables as the encryption key id. See ENCRYPTION_KEY_ID for more details. The format will be as follows: <encryption_key_id1>;<hex-encoded_encryption_key1> <encryption_key_id2>;<hex-encoded_encryption_key2> In the example keyfile, this looks similar to the following: $ cat keyfile 1;687a90b4423c10417f2483726a5901007571c16331d2ee9534333fef4e323075 2;e7bf20f1cbde9632587c2996871cff74871890d19b49e273d13def123d781e17 3;9284c9c80da9a323b3ac2c82427942dfbf1718b57255cc0bc0e2c3d6f15ac3ac 4;abf80c3a8b10643ef53a43c759227304bcffa263700a94a996810b0f0459a580 5;bdbc5f67d34a4904c4adc9771420ac2ab2bd9c6af1ec532e960335e831f02933 Create or generate a random password using the similar command from step 1: $ openssl rand -hex 128 > /etc/mysql/encryption/keyfile.key Before proceeding to the next step, it is important to take note of the following details about encrypting the key file: The only algorithm that MariaDB currently supports to encrypt the key file is Cipher Block Chaining (CBC) mode of Advanced Encryption Standard (AES). The encryption key size can be 128-bits, 192-bits, or 256-bits. The encryption key is created from the SHA-1 hash of the encryption password. The encryption password has a max length of 256 characters. To encrypt the key file using openssl enc command, run the following command: $ openssl enc -aes-256-cbc -md sha1 -pass file:/etc/mysql/encryption/keyfile.key -in /etc/mysql/encryption/keyfile -out /etc/mysql/encryption/keyfile.enc Add the following variables in the MySQL configuration file (i.e., /etc/my.cnf on RHEL-based Linux OS or /etc/mysql/my.cnf in Debian/Ubuntu Linux based OS) [mysqld] … #################### DATABASE ENCRYPTION ############################## plugin_load_add = file_key_management file_key_management_filename = /etc/mysql/encryption/keyfile.enc file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key file_key_management_encryption_algorithm = aes_cbc encrypt_binlog = 1 innodb_encrypt_tables = ON innodb_encrypt_log = ON innodb_encryption_threads = 4 innodb_encryption_rotate_key_age = 0 # Do not rotate key Restart MariaDB Server now $ systemctl start mariadb Once the File Key Management Plugin is enabled, use it by creating an encrypted table: CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES Table t will be encrypted using the encryption key from the key file.
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002420
- Version
- MADB-10-008900
- Vuln IDs
-
- V-253741
- Rule IDs
-
- SV-253741r961638_rule
Checks: C-57193r841746_chk
If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. First, as the database administrator, verify the following settings: MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_key'; If SSL is not enabled, this is a finding. If MariaDB does not employ protective measures against unauthorized disclosure and modification during preparation for transmission, this is a finding.
Fix: F-57144r841747_fix
Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/
- RMF Control
- SC-8
- Severity
- M
- CCI
- CCI-002422
- Version
- MADB-10-009000
- Vuln IDs
-
- V-253742
- Rule IDs
-
- SV-253742r961641_rule
Checks: C-57194r841749_chk
If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. First, as the database administrator, verify the following settings: MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_key'; If SSL is not enabled, this is a finding. If MariaDB, associated applications, and infrastructure do not employ protective measures against unauthorized disclosure and modification during reception, this is a finding.
Fix: F-57145r841750_fix
Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/
- RMF Control
- SI-10
- Severity
- M
- CCI
- CCI-002754
- Version
- MADB-10-009100
- Vuln IDs
-
- V-253743
- Rule IDs
-
- SV-253743r961656_rule
Checks: C-57195r841752_chk
As the database administrator, make a small SQL syntax error by running the following: MariaDB> CREAT TABLEincorrect_syntax(id INT) ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near CREAT TABLEincorrect_syntax(id INT) at line 1 Now verify the syntax error was logged (change the log file name and part to suit the circumstances): $ cat $DATADIR/sql_errors.log 2019-09-05 14:31:22 root[root] @ localhost [] ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near CREAT TABLEincorrect_syntax(id INT) at line 1 : CREAT TABLEincorrect_syntax(id INT) Review security guide to determine how input errors from application to MariaDB are to be handled in general and if any special handling is defined for specific circumstances. If it does not implement the documented behavior, this is a finding.
Fix: F-57146r841753_fix
All errors and denials are logged to the sql errorlog. If the sql error log does not exist, install the sql error log plugin as follows: MariaDB> INSTALL SONAME 'sql_errlog'; The error log should by default be located as sql_errors.log within the data directory (/var/lib/mysql by default).
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002617
- Version
- MADB-10-009200
- Vuln IDs
-
- V-253744
- Rule IDs
-
- SV-253744r961677_rule
Checks: C-57196r841755_chk
If updating through a repository using yum, apt, etc., all MariaDB packages should be updated/upgraded at the same time. Use the package manager to verify no outdated packages remain. Example: $ sudo yum list installed | grep -i mariadb If older packages remain, this is a finding.
Fix: F-57147r841756_fix
If after the upgrade outdated packages remain, update them if needed or remove. Example: $ sudo yum remove package_name
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002605
- Version
- MADB-10-009300
- Vuln IDs
-
- V-253745
- Rule IDs
-
- SV-253745r1001008_rule
Checks: C-57197r841758_chk
If new packages are available for MariaDB, they can be reviewed in the package manager appropriate for the server operating system. To list the version of installed MariaDB, run the following Linux commands as the system administrator: MariaDB> SELECT @@version; Check the list of installed packages: $ sudo yum list installed | grep -i mariadb All versions of MariaDB will be listed on: https://mariadb.com/downloads/#mariadb_platform-mariadb_server All security-relevant software updates for MariaDB will be listed on: https://mariadb.com/kb/en/library/security/ If MariaDB is not at the latest version, this is a finding. If MariaDB is not at the latest version and the evaluated version has CVEs (IAVAs), this is a CAT I finding.
Fix: F-57148r841759_fix
Institute and adhere to policies and procedures to ensure that patches are consistently applied to MariaDB within the time allowed.
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009400
- Vuln IDs
-
- V-253746
- Rule IDs
-
- SV-253746r961791_rule
Checks: C-57198r841761_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.
Fix: F-57149r841762_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009500
- Vuln IDs
-
- V-253747
- Rule IDs
-
- SV-253747r961791_rule
Checks: C-57199r841764_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.
Fix: F-57150r841765_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009600
- Vuln IDs
-
- V-253748
- Rule IDs
-
- SV-253748r961797_rule
Checks: C-57200r841767_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.
Fix: F-57151r841768_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009700
- Vuln IDs
-
- V-253749
- Rule IDs
-
- SV-253749r961797_rule
Checks: C-57201r841770_chk
If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.
Fix: F-57152r841771_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009800
- Vuln IDs
-
- V-253750
- Rule IDs
-
- SV-253750r961800_rule
Checks: C-57202r841773_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB> CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB> GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB> GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT SELECT ON db_name_here TO 'role_name_here'; As the database administrator, modify privileges for testuser and user_role: MariaDB> GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for successful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.
Fix: F-57153r841774_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-009900
- Vuln IDs
-
- V-253751
- Rule IDs
-
- SV-253751r961800_rule
Checks: C-57203r841776_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB> CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB> GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser : MariaDB> GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT SELECT ON db_name_here TO 'role_name_here'; As a regular user, modify privileges for testuser and user_role: MariaDB> GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for unsuccessful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.
Fix: F-57154r841777_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010000
- Vuln IDs
-
- V-253752
- Rule IDs
-
- SV-253752r961800_rule
Checks: C-57204r841779_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB> CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB> GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB> GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT SELECT ON db_name_here TO 'role_name_here'; As the database administrator, modify privileges for testuser and user_role: MariaDB> GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for successful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.
Fix: F-57155r841780_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010100
- Vuln IDs
-
- V-253753
- Rule IDs
-
- SV-253753r961800_rule
Checks: C-57205r841782_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB> CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB> GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB> GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT SELECT ON db_name_here TO 'role_name_here'; As a regular user, modify privileges for testuser and user_role: MariaDB> GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB> GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for unsuccessful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.
Fix: F-57156r841783_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010200
- Vuln IDs
-
- V-253754
- Rule IDs
-
- SV-253754r961803_rule
Checks: C-57206r841785_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57157r841786_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010300
- Vuln IDs
-
- V-253755
- Rule IDs
-
- SV-253755r961803_rule
Checks: C-57207r841788_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57158r841789_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010400
- Vuln IDs
-
- V-253756
- Rule IDs
-
- SV-253756r961809_rule
Checks: C-57208r841791_chk
If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57159r841792_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010500
- Vuln IDs
-
- V-253757
- Rule IDs
-
- SV-253757r961809_rule
Checks: C-57209r841794_chk
If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57160r841795_fix
The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010600
- Vuln IDs
-
- V-253758
- Rule IDs
-
- SV-253758r961812_rule
Checks: C-57210r841797_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB> CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB> GRANT user_role to testuser As the database administrator, add 2 privileges to user_role for testdb and then delete one of the privileges: MariaDB> GRANT SELECT,DELETE on testdb to testuser MariaDB> GRANT SELECT on testdb to testuser As the database administrator, revoke grant from testuser: MariaDB> REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.
Fix: F-57161r841798_fix
No super/administrative users should not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010700
- Vuln IDs
-
- V-253759
- Rule IDs
-
- SV-253759r961812_rule
Checks: C-57211r841800_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB> CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB> GRANT user_role to testuser As the database administrator, add two privileges to user_role for testdb and then delete one of the privileges: MariaDB> GRANT SELECT,DELETE on testdb to testuser As the testuser, remove the users delete privilege by granting only SELECT, and revoke grant from test user: MariaDB> GRANT SELECT on testdb to testuser MariaDB> REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.
Fix: F-57162r841801_fix
No super/administrative users should not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010800
- Vuln IDs
-
- V-253760
- Rule IDs
-
- SV-253760r961818_rule
Checks: C-57212r841803_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE user_role As the database administrator, delete the user_role: MariaDB> DROP ROLE user_role If the audit records for DROP are not produced in the first terminal, this is a finding.
Fix: F-57163r841804_fix
Super/administrative users must not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-010900
- Vuln IDs
-
- V-253761
- Rule IDs
-
- SV-253761r961818_rule
Checks: C-57213r841806_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB> CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB> CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB> GRANT user_role to testuser As the database administrator, add two privileges to user_role for testdb and then delete one of the privileges: MariaDB> GRANT SELECT,DELETE on testdb to testuser MariaDB> GRANT SELECT on testdb to testuser As the database administrator, revoke grant from testuser: MariaDB> REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.
Fix: F-57164r841807_fix
Super/administrative users must not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011000
- Vuln IDs
-
- V-253762
- Rule IDs
-
- SV-253762r961821_rule
Checks: C-57214r841809_chk
If category tracking is not required in the database, this is not applicable. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57165r841810_fix
Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011100
- Vuln IDs
-
- V-253763
- Rule IDs
-
- SV-253763r961821_rule
Checks: C-57215r841812_chk
If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.
Fix: F-57166r841813_fix
Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011200
- Vuln IDs
-
- V-253764
- Rule IDs
-
- SV-253764r961824_rule
Checks: C-57216r844266_chk
Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding. Log in to and out of the MariaDB database server. Verify the connect is logged in the audit logfile or syslog depending on how it is configured. If connect is not logged this is a finding.
Fix: F-57167r841816_fix
Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011300
- Vuln IDs
-
- V-253765
- Rule IDs
-
- SV-253765r961824_rule
Checks: C-57217r841818_chk
Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding. Log in to and out of the MariaDB database server with both valid and invalid users. Verify the connect and disconnect are logged in the audit logfile or syslog depending on how it is configured. If connect/disconnect and invalid logins are not logged, this is a finding.
Fix: F-57168r841819_fix
Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011400
- Vuln IDs
-
- V-253766
- Rule IDs
-
- SV-253766r961827_rule
Checks: C-57218r841821_chk
Review the security plan to obtain the definition of the database/DBMS functionality considered privileged in the context of the system in question. If audit logging covers at least all of the actions defined as privileged, this is not a finding, otherwise, this is a finding. Review the MariaDB audit settings. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit plugin is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Review the filters to verify TABLE and QUERY are included. If QUERY and TABLE are not included, this is a finding.
Fix: F-57169r841822_fix
Edit the necessary filters to include the desired logging actions. Exact steps vary depending on desired logging. Example named audit filter assigned to specific user: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "user1", "filter_example"); MariaDB> SET GLOBAL server_audit_reload_filters=ON;
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011500
- Vuln IDs
-
- V-253767
- Rule IDs
-
- SV-253767r961827_rule
Checks: C-57219r841824_chk
Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify audit filters are correctly configured to log desired actions per user. If not, this is a finding.
Fix: F-57170r841825_fix
Edit the necessary filters to include the desired logging actions. Exact steps vary depending on desired logging. Example named audit filter assigned to specific user: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "user1", "filter_example"); MariaDB> SET GLOBAL server_audit_reload_filters=ON;
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011600
- Vuln IDs
-
- V-253768
- Rule IDs
-
- SV-253768r961830_rule
Checks: C-57220r841827_chk
Log in to and out of the MariaDB database server. Verify the connect and disconnect are logged in the audit logfile or syslog depending on how it is configured. If connect and disconnect are not logged, this is a finding.
Fix: F-57171r841828_fix
Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011700
- Vuln IDs
-
- V-253769
- Rule IDs
-
- SV-253769r961833_rule
Checks: C-57221r841830_chk
Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding.
Fix: F-57172r841831_fix
Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event":"CONNECT" }' ));
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011800
- Vuln IDs
-
- V-253770
- Rule IDs
-
- SV-253770r961836_rule
Checks: C-57222r841833_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; Default Audit Filter is applied to all users by default. Named Audit Filters are assigned to specific users. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Check what Named Audit Filters are assigned to what users: MariaDB> SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G If the MariaDB Enterprise Audit plugin is not active and/or necessary auditing is not in place, this is a finding.
Fix: F-57173r841834_fix
If the MariaDB Enterprise Audit plugin is not active, enable it in one of the two following ways. 1. Config file (requires restart): [mariadb] server_audit_logging = ON 2. SQL (does not require restart): MariaDB> SET GLOBAL server_audit_logging=ON; Once the MariaDB Enterprise Audit plugin is loaded, verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the necessary auditing is not in place for all or specific users, modify the filters. To modify the default filter, delete, and recreate: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "logging":"ON", "connect_event":"ALL", "query_event":"ALL", "table_event":"ALL" }' )); Specific objects can be added to filters with inclusion or exclusion. ignore_databases: Do not log actions on these databases. ignore_tables: Do not log actions on these tables. databases: Log actions on these databases. tables: Log actions on these tables. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ( 'reporting', JSON_COMPACT( '{ "tables": [ "production.*", "reporting.*", { "table_event": [ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ], "query_event": [ "DML", "DDL", { "ignore_tables": [ "production.customer_profiles", "production.customer_addresses" ] } ] } ] }' ) );
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-011900
- Vuln IDs
-
- V-253771
- Rule IDs
-
- SV-253771r961836_rule
Checks: C-57223r841836_chk
Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; Default Audit Filter is applied to all users by default. Named Audit Filters are assigned to specific users. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Check what Named Audit Filters are assigned to what users: MariaDB> SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G If the MariaDB Enterprise Audit plugin is not active and/or necessary auditing is not in place, this is a finding.
Fix: F-57174r841837_fix
If the MariaDB Enterprise Audit plugin is not active, enable it in one of the two following ways. 1. Config file (requires restart): [mariadb] server_audit_logging = ON 2. SQL (does not require restart): MariaDB> SET GLOBAL server_audit_logging=ON; Once the MariaDB Enterprise Audit plugin is loaded, verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the necessary auditing is not in place for all or specific users, modify the filters. To modify the default filter, delete and recreate: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "logging":"ON", "connect_event":"ALL", "query_event":"ALL", "table_event":"ALL" }' )); Specific objects can be added to filters with inclusion or exclusion. ignore_databases: Do not log actions on these databases. ignore_tables: Do not log actions on these tables. databases: Log actions on these databases. tables: Log actions on these tables. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ( 'reporting', JSON_COMPACT( '{ "tables": [ "production.*", "reporting.*", { "table_event": [ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ], "query_event": [ "DML", "DDL", { "ignore_tables": [ "production.customer_profiles", "production.customer_addresses" ] } ] } ] }' ) );
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- MADB-10-012000
- Vuln IDs
-
- V-253772
- Rule IDs
-
- SV-253772r961839_rule
Checks: C-57224r841839_chk
Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding.
Fix: F-57175r841840_fix
Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event":"CONNECT" }' ));
- RMF Control
- SC-13
- Severity
- M
- CCI
- CCI-002450
- Version
- MADB-10-012100
- Vuln IDs
-
- V-253773
- Rule IDs
-
- SV-253773r961857_rule
Checks: C-57225r841842_chk
As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient this is a finding.
Fix: F-57176r841843_fix
If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
- RMF Control
- SC-13
- Severity
- M
- CCI
- CCI-002450
- Version
- MADB-10-012200
- Vuln IDs
-
- V-253774
- Rule IDs
-
- SV-253774r961857_rule
Checks: C-57226r841845_chk
As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.
Fix: F-57177r841846_fix
If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
- RMF Control
- SC-13
- Severity
- M
- CCI
- CCI-002450
- Version
- MADB-10-012300
- Vuln IDs
-
- V-253775
- Rule IDs
-
- SV-253775r961857_rule
Checks: C-57227r841848_chk
As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.
Fix: F-57178r841849_fix
If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips
- RMF Control
- AU-4
- Severity
- M
- CCI
- CCI-001851
- Version
- MADB-10-012400
- Vuln IDs
-
- V-253776
- Rule IDs
-
- SV-253776r961860_rule
Checks: C-57228r841851_chk
Check if the variable server_audit_output_type is set to syslog, and verify the operating system is using a centralized syslog utility such as rsyslogd. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If not, this is a finding.
Fix: F-57179r841852_fix
To set up the audit logs to write to sylog: Edit the mariadb-enterprise.cnf file. Add the following under the [mariadb] section: server_audit_output_type = 'syslog' After the .cnf file is updated and saved, the mariadb database service must be restarted.
- RMF Control
- SA-22
- Severity
- H
- CCI
- CCI-003376
- Version
- MADB-10-012600
- Vuln IDs
-
- V-265882
- Rule IDs
-
- SV-265882r999552_rule
Checks: C-69801r999550_chk
Review the version and release information. Verify the MariaDB Enterprise Server version via one of the following methods: MariaDB> SELECT VERSION(); # mariadb --version Verify the version is supported per the MariaDB support policy: https://mariadb.com/engineering-policies/ If the installed version of MariaDB is not supported by the vendor, this is a finding.
Fix: F-69705r999551_fix
Remove or decommission all unsupported software products. Upgrade unsupported DBMS or unsupported components to a supported version of the product.