acceptedMariaDB Enterprise 10.x Security Technical Implementation GuideThis Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DoD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.DISASTIG.DOD.MILRelease: 2 Benchmark Date: 24 Aug 20223.4.0.342221.10.01I - Mission Critical Classified<ProfileDescription></ProfileDescription>I - Mission Critical Public<ProfileDescription></ProfileDescription>I - Mission Critical Sensitive<ProfileDescription></ProfileDescription>II - Mission Support Classified<ProfileDescription></ProfileDescription>II - Mission Support Public<ProfileDescription></ProfileDescription>II - Mission Support Sensitive<ProfileDescription></ProfileDescription>III - Administrative Classified<ProfileDescription></ProfileDescription>III - Administrative Public<ProfileDescription></ProfileDescription>III - Administrative Sensitive<ProfileDescription></ProfileDescription>SRG-APP-000001-DB-000031<GroupDescription></GroupDescription>MADB-10-000100MariaDB must limit the number of concurrent sessions to an organization-defined number per user for all accounts and/or account types.<VulnDiscussion>Database management includes the ability to control the number of users and user sessions utilizing MariaDB. Unlimited concurrent connections to MariaDB could allow a successful Denial of Service (DoS) attack by exhausting connection resources; and a system can also fail or be degraded by an overload of legitimate users. Limiting the number of concurrent sessions per user is helpful in reducing these risks.
This requirement addresses concurrent session control for a single account. It does not address concurrent sessions by a single user via multiple system accounts; and it does not deal with the total number of sessions across all accounts.
The capability to limit the number of concurrent sessions per user must be configured in or added to MariaDB (for example, by use of a logon trigger), when this is technically feasible. Note that it is not sufficient to limit sessions via a web server or application server alone, because legitimate users and adversaries can potentially connect to MariaDB by other means.
The organization will need to define the maximum number of concurrent sessions by account type, by account, or a combination thereof. In deciding on the appropriate number, it is important to consider the work requirements of the various types of users. For example, 2 might be an acceptable limit for general users accessing the database via an application; but 10 might be too few for a database administrator using a database management GUI tool, where each query tab and navigation pane may count as a separate session.
(Sessions may also be referred to as connections or logons, which for the purposes of this requirement are synonyms.)</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000054To 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;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.SRG-APP-000023-DB-000001<GroupDescription></GroupDescription>MADB-10-000200MariaDB must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.<VulnDiscussion>Enterprise environments make account management for applications and databases challenging and complex. A manual process for account management functions adds the risk of a potential oversight or other error. Managing accounts for the same person in multiple places is inefficient and prone to problems with consistency and synchronization.
A comprehensive application account management process that includes automation helps to ensure that accounts designated as requiring attention are consistently and promptly addressed.
Examples include, but are not limited to, using automation to take action on multiple accounts designated as inactive, suspended, or terminated, or by disabling accounts located in noncentralized account stores, such as multiple servers. Account management functions can also include assignment of group or role membership; identifying account type; specifying user access authorizations (i.e., privileges); account removal, update, or termination; and administrative alerts. The use of automated mechanisms can include, for example: using email or text messaging to notify account managers when users are terminated or transferred; using the information system to monitor account usage; and using automated telephone notification to report atypical system account usage.
MariaDB must be configured to automatically utilize organization-level account management functions, and these functions must immediately enforce the organizations current account policy.
Automation may be comprised of differing technologies that when placed together contain an overall mechanism supporting an organizations automated account management requirements.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000015Integrate 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;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.SRG-APP-000033-DB-000084<GroupDescription></GroupDescription>MADB-10-000300MariaDB must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.<VulnDiscussion>Authentication with a DoD-approved PKI certificate does not necessarily imply authorization to access MariaDB. To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DoD-approved PKIs, all DoD systems, including databases, must be properly configured to implement access control policies.
Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.
Access control policies include identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system.
This requirement is applicable to access control enforcement applications, a category that includes database management systems. If MariaDB does not follow applicable policy when approving access, it may be in conflict with networks or other applications in the information system. This may result in users either gaining or being denied access inappropriately and in conflict with applicable policy.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000213Create 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 reloadFrom 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.SRG-APP-000080-DB-000063<GroupDescription></GroupDescription>MADB-10-000400MariaDB must protect against a user falsely repudiating having performed organization-defined actions.<VulnDiscussion>Nonrepudiation of actions taken is required in order to maintain data integrity. Examples of particular actions taken by individuals include creating information, sending a message, approving information (e.g., indicating concurrence or signing a contract), and receiving a message.
Nonrepudiation protects against later claims by a user of not having created, modified, or deleted a particular data item or collection of data in the database.
In designing a database, the organization must define the types of data and the user actions that must be protected from repudiation. The implementation must then include building audit features into the application data tables and configuring MariaDB’s audit tools to capture the necessary audit trail. Design and implementation also must ensure that applications pass individual user identification to MariaDB, even where the application connects to MariaDB with a standard, shared account.
It is recommended to not allow shared accounts, including root. The root user is known by all attackers, and often used in attempted attacks on the database servers.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000166Remove shared accounts which are not documented and have been determined to not be necessary.
MariaDB> DROP USER 'user'@'hostname';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.SRG-APP-000089-DB-000064<GroupDescription></GroupDescription>MADB-10-000500MariaDB must provide audit record generation capability for DoD-defined auditable events within all DBMS/database components.<VulnDiscussion>Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Audit records can be generated from various components within MariaDB (e.g., process, module). Certain specific application functionalities may be audited as well. The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records.
DoD has defined the list of events for which MariaDB will provide an audit record generation capability as the following:
(i) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels);
(ii) Access actions, such as successful and unsuccessful logon attempts, privileged activities, or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; and
(iii) All account creation, modification, disabling, and termination actions.
Organizations may define additional events requiring continuous or ad hoc auditing.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000169Configure 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/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.SRG-APP-000090-DB-000065<GroupDescription></GroupDescription>MADB-10-000600MariaDB must allow only the ISSM (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited.<VulnDiscussion>Without the capability to restrict which roles and individuals can select which events are audited, unauthorized personnel may be able to prevent or interfere with the auditing of critical events.
Suppression of auditing could permit an adversary to evade detection.
Misconfigured audits can degrade the systems performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000171Grant 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.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.SRG-APP-000091-DB-000066<GroupDescription></GroupDescription>MADB-10-000700MariaDB must be able to generate audit records when privileges/permissions are retrieved.<VulnDiscussion>Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. MariaDB makes such information available through an audit log file.
This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that MariaDB continually performs to determine if any and every action on the database is permitted.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000091-DB-000325<GroupDescription></GroupDescription>MADB-10-000800MariaDB must be able to generate audit records when unsuccessful attempts to retrieve privileges/permissions occur.<VulnDiscussion>Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. MariaDB makes such information available through an audit log file.
This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that MariaDB continually performs to determine if any and every action on the database is permitted.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Verify the MariaDB Enterprise Audit plugin is loaded and actively logging:
MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active';
Check what filters are in place by running the following as an administrative user:
MariaDB> SELECT * FROM mysql.server_audit_filters;
Update the filters as necessary.As the database administrator, create a user by running the following SQL:
MariaDB> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'test_user_password';
In one terminal, tail the audit log file:
tail -F /var/lib/mysql/server_audit.log (default location)
In another terminal attempt to retrieve information from the MariaDB table, mysql.roles_mapping, by logging in as the test_user and running a query which it does not have privileges to do, for example:
$ mariadb -u test_user -p
MariaDB> SELECT * FROM mysql.roles_mapping;
The audit log will show:
20190321 21:39:20,5a7e16cc51f7, test_user ,localhost,127,394,QUERY,, select * from mysql.roles_mapping ,1142
To find failed queries, look for two elements: The notation indicating that it is a QUERY entry, and the last value for the entry. If the query is unsuccessful, the value will be NOT EQUAL TO 0.
If the above steps cannot verify that audit records are produced when MariaDB denies retrieval of privileges/permissions/role memberships, this is a finding.
If an audit record is not produced in the first terminal, this is a finding.SRG-APP-000092-DB-000208<GroupDescription></GroupDescription>MADB-10-000900MariaDB must initiate session auditing upon startup.<VulnDiscussion>Session auditing is for use when a user's activities are under investigation. To be sure of capturing all activity during those periods when session auditing is in use, it must be in operation for the whole time MariaDB is running.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001464If 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;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.SRG-APP-000095-DB-000039<GroupDescription></GroupDescription>MADB-10-001000MariaDB must produce audit records containing sufficient information to establish what type of events occurred.<VulnDiscussion>Information system auditing capability is critical for accurate forensic analysis. Without establishing what type of event occurred, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Audit record content that may be necessary to satisfy the requirement of this policy includes, for example, time stamps, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked.
Associating event types with detected events in the application and audit logs provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application.
Database software is capable of a range of actions on data stored within the database. It is important, for accurate forensic analysis, to know exactly what actions were performed. This requires specific information regarding the event type an audit record is referring to. If event type information is not recorded and stored with the audit record, the record itself is of very limited use.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000130Update 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"
]
}'
));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.SRG-APP-000101-DB-000044<GroupDescription></GroupDescription>MADB-10-001600MariaDB must include additional, more detailed, organization-defined information in the audit records for audit events identified by type, location, or subject.<VulnDiscussion>Information system auditing capability is critical for accurate forensic analysis. Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. To support analysis, some types of events will need information to be logged that exceeds the basic requirements of event type, time stamps, location, source, outcome, and user identity. If additional information is not available, it could negatively impact forensic investigations into user actions or other malicious events.
The organization must determine what additional information is required for complete analysis of the audited events. The additional information required is dependent on the type of information (e.g., sensitivity of the data and the environment within which it resides). At a minimum, the organization must employ either full-text recording of privileged commands or the individual identities of users of shared accounts, or both. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise.
Examples of detailed information the organization may require in audit records are full-text recording of privileged commands or the individual identities of shared account users.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000135Update 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"
]
}'
));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.SRG-APP-000109-DB-000049<GroupDescription></GroupDescription>MADB-10-001700MariaDB must by default shut down upon audit failure, to include the unavailability of space for more audit log records; or must be configurable to shut down upon audit failure.<VulnDiscussion>It is critical that when MariaDB is at risk of failing to process audit logs as required, an action is taken to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.
When the need for system availability does not outweigh the need for a complete audit trail, the DBMS should shut down immediately, rolling back all in-flight transactions.
Systems where audit trail completeness is paramount will most likely be at a lower MAC level than MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid a shutdown in all but the most extreme situations.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000140Modify DBMS, OS, or third-party logging application settings to alert appropriate personnel when a specific percentage of log storage capacity is reached.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.SRG-APP-000109-DB-000321<GroupDescription></GroupDescription>MADB-10-001800MariaDB must be configurable to overwrite audit log records, oldest first (First-In-First-Out - FIFO), in the event of unavailability of space for more audit log records.<VulnDiscussion>It is critical that when MariaDB is at risk of failing to process audit logs as required, it take action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode.
When availability is an overriding concern, approved actions in response to an audit failure are as follows:
(i) If the failure was caused by the lack of audit record storage capacity, the DBMS must continue generating audit records, if possible (automatically restarting the audit service if necessary), overwriting the oldest audit records in a first-in-first-out manner.
(ii) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, the DBMS must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server.
Systems where availability is paramount will most likely be MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid audit data loss in all but the most extreme situations.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000140Establish 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.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.SRG-APP-000118-DB-000059<GroupDescription></GroupDescription>MADB-10-002000The audit information produced by MariaDB must be protected from unauthorized read access.<VulnDiscussion>If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is difficult, if not impossible, to achieve. In addition, access to audit records provides information an attacker could potentially use to his or her advantage.
To ensure the veracity of audit data, the information system and/or the application must protect audit information from any and all unauthorized access. This includes read, write, copy, etc.
This requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections and limiting log data location.
Additionally, applications with user interfaces to audit records should not allow for the unfettered manipulation of or access to those records via the application. If the application provides access to the audit data, the application becomes accountable for ensuring that audit information is protected from unauthorized access.
Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000162If 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.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.SRG-APP-000119-DB-000060<GroupDescription></GroupDescription>MADB-10-002100The audit information produced by MariaDB must be protected from unauthorized modification.<VulnDiscussion>If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve.
To ensure the veracity of audit data the information system and/or the application must protect audit information from unauthorized modification.
This requirement can be achieved through multiple methods that will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions and limiting log data locations.
Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights that the user enjoys to make access decisions regarding the modification of audit data.
Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.
Modification of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000163If 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.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.SRG-APP-000120-DB-000061<GroupDescription></GroupDescription>MADB-10-002200The audit information produced by MariaDB must be protected from unauthorized deletion.<VulnDiscussion>If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve.
To ensure the veracity of audit data, the information system and/or the application must protect audit information from unauthorized deletion. This requirement can be achieved through multiple methods which will depend upon system architecture and design.
Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections; restricting access; and backing up log data to ensure log data is retained.
Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights the user enjoys to make access decisions regarding the deletion of audit data.
Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.
Deletion of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000164If 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.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.SRG-APP-000121-DB-000202<GroupDescription></GroupDescription>MADB-10-002300MariaDB must protect its audit features from unauthorized access.<VulnDiscussion>Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data.
Depending upon the log format and application, system and application log tools may provide the only means to manipulate and manage application and system log data. It is, therefore, imperative that access to audit tools be controlled and protected from unauthorized access.
Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the access to audit tools.
Audit tools include, but are not limited to, OS-provided audit tools, vendor-provided audit tools, and open source audit tools needed to successfully view and manipulate audit information system activity and records.
If an attacker were to gain access to audit tools, he could analyze audit logs for system weaknesses or weaknesses in the auditing itself. An attacker could also manipulate logs to hide evidence of malicious activity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001493If 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.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.SRG-APP-000122-DB-000203<GroupDescription></GroupDescription>MADB-10-002400MariaDB must protect its audit configuration from unauthorized modification.<VulnDiscussion>Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data.
Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the modification of audit tools.
Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001494If 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.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.SRG-APP-000123-DB-000204<GroupDescription></GroupDescription>MADB-10-002500MariaDB must protect its audit features from unauthorized removal.<VulnDiscussion>Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data.
Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the deletion of audit tools.
Audit tools include, but are not limited to, vendor-provided and open-source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001495If 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.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.SRG-APP-000133-DB-000179<GroupDescription></GroupDescription>MADB-10-002600MariaDB must limit privileges to change software modules, to include stored procedures, functions and triggers, and links to software external to the DBMS.<VulnDiscussion>If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.
Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.
Unmanaged changes that occur to the database code can lead to unauthorized or compromised installations.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001499Remove 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.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.SRG-APP-000133-DB-000198<GroupDescription></GroupDescription>MADB-10-002700The MariaDB software installation account must be restricted to authorized users.<VulnDiscussion>When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can have significant effects on the overall security of the system.
If the system were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.
Accordingly, only qualified and authorized individuals must be allowed access to information system components for purposes of initiating changes, including upgrades and modifications.
DBA and other privileged administrative or application owner accounts are granted privileges that allow actions that can have a great impact on database security and operation. It is especially important to grant privileged access to only those persons who are qualified and authorized to use them.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001499Develop, document, and implement procedures to restrict and track use of the MariaDB software installation account.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.SRG-APP-000133-DB-000199<GroupDescription></GroupDescription>MADB-10-002800Database software, including MariaDB configuration files, must be stored in dedicated directories, separate from the host OS and other applications.<VulnDiscussion>When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can potentially have significant effects on the overall security of the system.
Multiple applications can provide a cumulative negative effect. A vulnerability and subsequent exploit to one application can lead to an exploit of other applications sharing the same security context. For example, an exploit to a web server process that leads to unauthorized administrative access to host system directories can most likely lead to a compromise of all applications hosted by the same system. Database software not installed using dedicated directories both threatens and is threatened by other hosted applications. Access controls defined for one application may by default provide access to the other application s database objects or directories. Any method that provides any level of separation of security context assists in the protection between applications.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001499Install 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.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.SRG-APP-000133-DB-000200<GroupDescription></GroupDescription>MADB-10-002900Database objects (including but not limited to tables, indexes, storage, stored procedures, functions, triggers, links to software external to MariaDB, etc.) must be owned by database/MariaDB principals authorized for ownership.<VulnDiscussion>Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definers rights. This allows anyone who uses the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals.
Conversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001499Assign ownership of authorized objects to authorized object owner accounts.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.SRG-APP-000133-DB-000362<GroupDescription></GroupDescription>MADB-10-003000The role(s)/group(s) used to modify database structure (including but not necessarily limited to tables, indexes, storage, etc.) and logic modules (stored procedures, functions, triggers, links to software external to the MariaDB, etc.) must be restricted to authorized users.<VulnDiscussion>If the MariaDB were to allow any user to make changes to database structure or logic, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process.
Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications.
Unmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001499As 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 ;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.SRG-APP-000141-DB-000090<GroupDescription></GroupDescription>MADB-10-003100Default demonstration and sample databases, database objects, and applications must be removed.<VulnDiscussion>Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions).
It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. Examples include, but are not limited to, installing advertising software, demonstrations, or browser plugins not related to requirements or providing a wide array of functionality, not required for every mission, that cannot be disabled.
DBMSs must adhere to the principles of least functionality by providing only essential capabilities.
Demonstration and sample database objects and applications present publicly known attack points for malicious users. These demonstration and sample objects are meant to provide simple examples of coding-specific functions and are not developed to prevent vulnerabilities from being introduced to the DBMS and host system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000381If 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;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.SRG-APP-000141-DB-000091<GroupDescription></GroupDescription>MADB-10-003200Unused database components, DBMS software, and database objects must be removed.<VulnDiscussion>Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions).
It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives.
DBMSs must adhere to the principles of least functionality by providing only essential capabilities.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000381To 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;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.SRG-APP-000141-DB-000093<GroupDescription></GroupDescription>MADB-10-003400Access to external executables must be disabled or restricted.<VulnDiscussion>Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions).
It is detrimental for applications to provide, or install by default, functionality exceeding requirements or mission objectives.
Applications must adhere to the principles of least functionality by providing only essential capabilities.
MariaDB may spawn additional external processes to execute procedures that are defined in MariaDB but stored in external host files (external procedures). The spawned process used to execute the external procedure may operate within a different OS security context than MariaDB and provide unauthorized access to the host system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000381To 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;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.SRG-APP-000142-DB-000094<GroupDescription></GroupDescription>MADB-10-003500MariaDB must be configured to prohibit or restrict the use of organization-defined functions, ports, protocols, and/or services, as defined in the PPSM CAL and vulnerability assessments.<VulnDiscussion>To prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary physical and logical ports/protocols/services on information systems.
Applications are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations. Additionally, it is sometimes convenient to provide multiple services from a single component (e.g., email and web services); however, doing so increases risk over limiting the services provided by any one component.
To support the requirements and principles of least functionality, the application must support the organizational requirements, providing only essential capabilities and limiting the use of ports, protocols, and/or services to only those required, authorized, and approved to conduct official business or address authorized quality-of-life issues.
Database Management Systems using ports, protocols, and services deemed unsafe are open to attack through those ports, protocols, and services. This can allow unauthorized access to the database and through the database to other components of the information system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000382Modify 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 = 4008Review 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.SRG-APP-000148-DB-000103<GroupDescription></GroupDescription>MADB-10-003600MariaDB must uniquely identify and authenticate organizational users (or processes acting on behalf of organizational users).<VulnDiscussion>To ensure accountability and prevent unauthenticated access, organizational users must be identified and authenticated to prevent potential misuse and compromise of the system.
Organizational users include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors). Organizational users (and any processes acting on behalf of users) must be uniquely identified and authenticated for all accesses, except the following:
(i) Accesses explicitly identified and documented by the organization. Organizations document specific user actions that can be performed on the information system without identification or authentication; and
(ii) Accesses that occur through authorized use of group authenticators without individual authentication. Organizations may require unique identification of individuals using shared accounts, for detailed accountability of individual activity.
It is recommended to not allow shared accounts, including root. The root user is known by all attackers, and often used in attempted attacks on the database servers.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000764Remove shared accounts which are not documented and have been determined to not be necessary.
MariaDB> DROP USER 'user'@'hostname';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.SRG-APP-000164-DB-000401<GroupDescription></GroupDescription>MADB-10-003700If MariaDB authentication, using passwords, is employed, then MariaDB must enforce the DoD standards for password complexity.<VulnDiscussion>OS/enterprise authentication and identification must be used (SRG-APP-000023-DB-000001). Native MariaDB authentication may be used only when circumstances make it unavoidable; and must be documented and AO-approved.
The DoD standard for authentication is DoD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval.
In such cases, the DoD standards for password complexity and lifetime must be implemented. DBMS products that can inherit the rules for these from the operating system or access control program (e.g., Microsoft Active Directory) must be configured to do so. For MariaDB, the rules must be enforced using available configuration parameters or custom code.
By default, MariaDB Enterprise Server has the simple_password_check plugin installed and enabled. However, the default password requirements are eight character minimum, one numeric character, and one special character.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000192Locate 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 = 2Check 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, eightSRG-APP-000164-DB-000401<GroupDescription></GroupDescription>MADB-10-003750If MariaDB authentication using passwords is employed, MariaDB must enforce the DoD standards for password lifetime.<VulnDiscussion>OS/enterprise authentication and identification must be used (SRG-APP-000023-DB-000001). Native MariaDB authentication may be used only when circumstances make it unavoidable and must be documented and AO-approved.
The DoD standard for authentication is DoD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval.
In such cases, the DoD standards for password complexity and lifetime must be implemented. DBMS products that can inherit the rules for these from the operating system or access control program (e.g., Microsoft Active Directory) must be configured to do so. For MariaDB, the rules must be enforced using available configuration parameters or custom code.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000192Locate 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 = 60Check 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.SRG-APP-000171-DB-000074<GroupDescription></GroupDescription>MADB-10-003800If passwords are used for authentication, MariaDB must store only hashed, salted representations of passwords.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates.
Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval.
In such cases, database passwords stored in clear text, using reversible encryption, or using unsalted hashes would be vulnerable to unauthorized disclosure. Database passwords must always be in the form of one-way, salted hashes when stored internally or externally to the MariaDB.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000196Document all applications, scripts, etc., which connect to the database server. Ensure passwords, if stored, are encrypted and secure.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.SRG-APP-000172-DB-000075<GroupDescription></GroupDescription>MADB-10-003900If passwords are used for authentication, MariaDB must transmit only encrypted representations of passwords.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates.
Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval.
In such cases, passwords need to be protected at all times, and encryption is the standard method for protecting passwords during transmission.
DBMS passwords sent in clear text format across the network are vulnerable to discovery by unauthorized users. Disclosure of passwords may easily lead to unauthorized access to the database.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000197As 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:".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.SRG-APP-000175-DB-000067<GroupDescription></GroupDescription>MADB-10-004000MariaDB, when utilizing PKI-based authentication, must validate certificates by performing RFC 5280-compliant certification path validation.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates.
A certificate's certification path is the path from the end entity certificate to a trusted root certification authority (CA). Certification path validation is necessary for a relying party to make an informed decision regarding acceptance of an end entity certificate. Certification path validation includes checks such as certificate issuer trust, time validity and revocation status for each certificate in the certification path. Revocation status information for CA and subject certificates in a certification path is commonly provided via certificate revocation lists (CRLs) or online certificate status protocol (OCSP) responses.
Database Management Systems that do not validate certificates by performing RFC 5280-compliant certification path validation are in danger of accepting certificates that are invalid and/or counterfeit. This could allow unauthorized access to the database.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000185As 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/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.SRG-APP-000176-DB-000068<GroupDescription></GroupDescription>MADB-10-004100MariaDB must enforce authorized access to all PKI private keys stored/used by the DBMS.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates. PKI certificate-based authentication is performed by requiring the certificate holder to cryptographically prove possession of the corresponding private key.
If the private key is stolen, an attacker can use the private key(s) to impersonate the certificate holder. In cases where the MariaDB-stored private keys are used to authenticate MariaDB to the system's clients, loss of the corresponding private keys would allow an attacker to successfully perform undetected man in the middle attacks against the MariaDB system and its clients.
Both the holder of a digital certificate and the issuing authority must take careful measures to protect the corresponding private key. Private keys should always be generated and protected in FIPS 140-2 validated cryptographic modules.
All access to the private key(s) of MariaDB must be restricted to authorized and authenticated users. If unauthorized users have access to one or more of the MariaDB s private keys, an attacker could gain access to the key(s) and use them to impersonate the database on the network or otherwise perform unauthorized actions.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000186If 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/fileFirst, 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.SRG-APP-000177-DB-000069<GroupDescription></GroupDescription>MADB-10-004200MariaDB must map PKI ID to an associated user account.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates. Once a PKI is validated, it is mapped to the DBMS user account for the authentication identity and then can be used for authorization decisions.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000187Example 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';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.SRG-APP-000178-DB-000083<GroupDescription></GroupDescription>MADB-10-004300MariaDB must obscure feedback of authentication information during the authentication process to protect the information from possible exploitation/use by unauthorized individuals.<VulnDiscussion>The DoD standard for authentication is DoD-approved PKI certificates.
Normally, with PKI authentication, the interaction with the user for authentication will be handled by a software component separate from the DBMS, such as ActivIdentity ActivClient. However, in cases where the DBMS controls the interaction, this requirement applies.
To prevent the compromise of authentication information such as passwords and PINs during the authentication process, the feedback from the system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism.
Obfuscation of user-provided authentication secrets when typed into the system is a method used in addressing this risk.
Displaying asterisks when a user types in a password or a smart card PIN is an example of obscuring feedback of authentication secrets.
This calls for review of applications, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000206When 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 -pVerify 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.SRG-APP-000179-DB-000114<GroupDescription></GroupDescription>MADB-10-004400MariaDB must use NIST FIPS 140-2 validated cryptographic modules for cryptographic operations.<VulnDiscussion>Use of weak or not validated cryptographic algorithms undermines the purposes of utilizing encryption and digital signatures to protect data. Weak algorithms can be easily broken and not validated cryptographic modules may not implement algorithms correctly. Unapproved cryptographic modules or algorithms should not be relied on for authentication, confidentiality, or integrity. Weak cryptography could allow an attacker to gain access to and modify data stored in the database as well as the administration settings of the DBMS.
Applications, including DBMSs, utilizing cryptography are required to use approved NIST FIPS 140-2 validated cryptographic modules that meet the requirements of applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance.
The security functions validated as part of FIPS 140-2 for cryptographic modules are described in FIPS 140-2 Annex A.
NSA Type-X (where X=1, 2, 3, 4) products are NSA-certified, hardware-based encryption modules.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000803If 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/fipsAs 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.SRG-APP-000180-DB-000115<GroupDescription></GroupDescription>MADB-10-004500The MariaDB must uniquely identify and authenticate nonorganizational users (or processes acting on behalf of nonorganizational users).<VulnDiscussion>Nonorganizational users include all information system users other than organizational users, which include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors, guest researchers, individuals from allied nations).
Nonorganizational users must be uniquely identified and authenticated for all accesses other than those accesses explicitly identified and documented by the organization when related to the use of anonymous access, such as accessing a web server.
Accordingly, a risk assessment is used in determining the authentication needs of the organization.
Scalability, practicality, and security are simultaneously considered in balancing the need to ensure ease of use for access to federal information and information systems with the need to protect and adequately mitigate risk to organizational operations, organizational assets, individuals, other organizations, and the nation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000804Remove shared accounts which are not documented and have been determined to not be necessary.
MariaDB> DROP USER 'user'@'hostname';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.SRG-APP-000211-DB-000122<GroupDescription></GroupDescription>MADB-10-004600MariaDB must separate user functionality (including user interface services) from database management functionality.<VulnDiscussion>Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access.
The separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate.
An example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources.
This may include isolating the administrative interface on a different domain and with additional access controls.
If administrative functionality or information regarding MariaDB management is presented on an interface available for users, information on MariaDB settings may be inadvertently made available to the user.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001082Configure 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, Usage privileges to users and roles that do not require it.
To remove privileges, see 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';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
Supe,
Usage
If administrator and general user functionality are not separated either physically or logically, this is a finding.SRG-APP-000220-DB-000149<GroupDescription></GroupDescription>MADB-10-004700MariaDB must invalidate session identifiers upon user logout or other session termination.<VulnDiscussion>Captured sessions can be reused in replay attacks. This requirement limits the ability of adversaries to capture and continue to employ previously valid session IDs.
This requirement focuses on communications protection for the MariaDB session rather than for the network packet. The intent of this control is to establish grounds for confidence at each end of a communications session in the ongoing identity of the other party and in the validity of the information being transmitted.
Session IDs are tokens generated by MariaDB to uniquely identify a user's (or process's) session. MariaDB will make access decisions and execute logic based on the session ID.
Unique session IDs help to reduce predictability of said identifiers. Unique session IDs address man-in-the-middle attacks, including session hijacking or insertion of false information into a session. If the attacker is unable to identify or guess the session information related to pending application traffic, they will have more difficulty in hijacking the session or otherwise manipulating valid sessions.
When a user logs out, or when any other session termination event occurs, the DBMS must terminate the user's session(s) to minimize the potential for sessions to be hijacked.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001185As 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/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.SRG-APP-000224-DB-000384<GroupDescription></GroupDescription>MADB-10-004900MariaDB must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.<VulnDiscussion>Unique session IDs help to reduce predictability of said identifiers. Unique session IDs address man-in-the-middle attacks, including session hijacking or insertion of false information into a session. If the attacker is unable to identify or guess the session information related to pending application traffic, they will have more difficulty in hijacking the session or otherwise manipulating valid sessions.
When a user logs out, or when any other session termination event occurs, the DBMS must terminate the user session(s) to minimize the potential for sessions to be hijacked.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001188Modify 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 = ONDetermine 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.SRG-APP-000225-DB-000153<GroupDescription></GroupDescription>MADB-10-005000MariaDB must fail to a secure state if system initialization fails, shutdown fails, or aborts fail.<VulnDiscussion>Failure to a known state can address safety or security in accordance with the mission/business needs of the organization.
Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system.
Failure to a known safe state helps prevent systems from failing to a state that may cause loss of data or unauthorized access to system resources. Systems that fail suddenly and with no incorporated failure state planning may leave the hosting system available but with a reduced security protection capability. Preserving information system state data also facilitates system restart and return to the operational mode of the organization with less disruption of mission/business processes.
MariaDB must fail to a known consistent state. Transactions must be successfully completed or rolled back.
In general, security mechanisms must be designed so that a failure will follow the same execution path as disallowing the operation. For example, application security methods, such as isAuthorized(), isAuthenticated(), and validate(), must all return false if there is an exception during processing. If security controls can throw exceptions, they must be very clear about exactly what that condition means.
Abort refers to stopping a program or function before it has finished naturally. The term abort refers to both requested and unexpected terminations.
MariaDB is a fully functional ACID RDBMS with persistent storage, logs, rollback, recovery, and backup procedures. InnoDB is the default storage engine for MariaDB and all uncommitted transactions are rolled back upon restart from a failure. The process is automatic and all incomplete transactions will be rolled back to a consistent state to guarantee consistency. Users can also conduct a recovery to a point in time if needed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001190If 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_binVerify 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.SRG-APP-000226-DB-000147<GroupDescription></GroupDescription>MADB-10-005100In the event of a system failure, MariaDB must preserve any information necessary to determine cause of failure and any information necessary to return to operations with least disruption to mission processes.<VulnDiscussion>Failure to a known state can address safety or security in accordance with the mission/business needs of the organization.
Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system.
Preserving information system state information helps to facilitate system restart and return to the operational mode of the organization with less disruption of mission/business processes.
Since it is usually not possible to test this capability in a production environment, systems must either be validated in a testing environment or prior to installation. This requirement is usually a function of the design of the IDPS component. Compliance can be verified by acceptance/validation processes or vendor attestation.
MariaDB is a fully functional ACID RDBMS with persistent storage, logs, rollback, recovery, and backup procedures. InnoDB is the default storage engine for MariaDB and all uncommitted transactions are rolled back upon restart from a failure. The process is automatic and all incomplete transactions will be rolled back to a consistent state to guarantee consistency. Users can also conduct a recovery to a point in time if needed.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001665If 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_binVerify 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.SRG-APP-000231-DB-000154<GroupDescription></GroupDescription>MADB-10-005200MariaDB must protect the confidentiality and integrity of all information at rest.<VulnDiscussion>This control is intended to address the confidentiality and integrity of information at rest in nonmobile devices and covers user information and system information. Information at rest refers to the state of information when it is located on a secondary storage device (e.g., disk drive, tape drive) within an organizational information system. Applications and application users generate information throughout the course of their application use.
User data generated, as well as application-specific configuration data, must be protected. Organizations may choose to employ different mechanisms to achieve confidentiality and integrity protections, as appropriate.
If the confidentiality and integrity of application data is not protected, the data will be open to compromise and unauthorized modification.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001199MariaDB'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.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.SRG-APP-000243-DB-000128<GroupDescription></GroupDescription>MADB-10-005400Database contents must be protected from unauthorized and unintended information transfer by enforcement of a data-transfer policy.<VulnDiscussion>Applications, including MariaDB, must prevent unauthorized and unintended information transfer via shared system resources.
Data used for the development and testing of applications often involves copying data from production. It is important that specific procedures exist for this process, to include the conditions under which such transfer may take place, where the copies may reside, and the rules for ensuring sensitive data are not exposed.
Copies of sensitive data must not be misplaced or left in a temporary location without the proper controls.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001090Modify 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.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.SRG-APP-000243-DB-000373<GroupDescription></GroupDescription>MADB-10-005500MariaDB must prevent unauthorized and unintended information transfer via shared system resources.<VulnDiscussion>The purpose of this control is to prevent information, including encrypted representations of information, produced by the actions of a prior user/role (or the actions of a process acting on behalf of a prior user/role) from being available to any current user/role (or current process) that obtains access to a shared system resource (e.g., registers, main memory, secondary storage) after the resource has been released back to the information system. Control of information in shared resources is also referred to as object reuse.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001090Modify 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.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.SRG-APP-000243-DB-000374<GroupDescription></GroupDescription>MADB-10-005600Access to database files must be limited to relevant processes and to authorized, administrative users.<VulnDiscussion>Applications, including MariaDB, must prevent unauthorized and unintended information transfer via shared system resources. Permitting only MariaDB processes and authorized, administrative users to have access to the files where the database resides helps ensure that those files are not shared inappropriately and are not open to backdoor access and manipulation.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001090By 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.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.SRG-APP-000251-DB-000160<GroupDescription></GroupDescription>MADB-10-005700MariaDB must check the validity of all data inputs except those specifically identified by the organization.<VulnDiscussion>Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior, potentially leading to an application or information system compromise. Invalid user input is one of the primary methods employed when attempting to compromise an application.
With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.
Even when no such hijacking takes place, invalid input that gets recorded in the database, whether accidental or malicious, reduces the reliability and usability of the system. Available protections include data types, referential constraints, uniqueness constraints, range checking, and application-specific logic. Application-specific logic can be implemented within the database in stored procedures and triggers, where appropriate.
This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001310Modify 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.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.SRG-APP-000251-DB-000391<GroupDescription></GroupDescription>MADB-10-005800MariaDB and associated applications must reserve the use of dynamic code execution for situations that require it.<VulnDiscussion>With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.
The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be used otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers).
This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001310Where 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.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.SRG-APP-000251-DB-000392<GroupDescription></GroupDescription>MADB-10-005900MariaDB and associated applications, when making use of dynamic code execution, must scan input data for invalid values that may indicate a code injection attack.<VulnDiscussion>With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.
The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be used otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers).
When dynamic execution is necessary, ways to mitigate the risk include the following, which should be implemented both in the on-screen application and at the database level, in the stored procedures:
- Allow strings as input only when necessary.
- Rely on data typing to validate numbers, dates, etc. Do not accept invalid values. If substituting other values for them, think carefully about whether this could be subverted.
- Limit the size of input strings to what is truly necessary.
- If single quotes/apostrophes, double quotes, semicolons, equal signs, angle brackets, or square brackets will never be valid as input, reject them.
- If comment markers will never be valid as input, reject them. In SQL, these are -- or /* */
- If HTML and XML tags, entities, comments, etc., will never be valid, reject them.
- If wildcards are present, reject them unless truly necessary. In SQL these are the underscore and the percentage sign, and the word ESCAPE is also a clue that wildcards are in use.
- If SQL key words, such as SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, ESCAPE, UNION, GRANT, REVOKE, DENY, MODIFY will never be valid, reject them. Use case-insensitive comparisons when searching for these. Bear in mind that some of these words, particularly Grant (as a person s name), could also be valid input.
- If there are range limits on the values that may be entered, enforce those limits.
- Institute procedures for inspection of programs for correct use of dynamic coding, by a party other than the developer.
- Conduct rigorous testing of program modules that use dynamic coding, searching for ways to subvert the intended use.
- Record the inspection and testing in the system documentation.
- Bear in mind that all this applies not only to screen input, but also to the values in an incoming message to a web service or to a stored procedure called by a software component that has not itself been hardened in these ways. Not only can the caller be subject to such vulnerabilities; it may itself be the attacker.
This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001310Where dynamic code execution is used, modify the code to implement protections against code injection.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.SRG-APP-000295-DB-000305<GroupDescription></GroupDescription>MADB-10-006200MariaDB must automatically terminate a user's session after organization-defined conditions or trigger events requiring session disconnect.<VulnDiscussion>This addresses the termination of user-initiated logical sessions in contrast to the termination of network connections that are associated with communications sessions (i.e., network disconnect). A logical session (for local, network, and remote access) is initiated whenever a user (or process acting on behalf of a user) accesses an organizational information system. Such user sessions can be terminated (and thus terminate user access) without terminating network sessions.
Session termination ends all processes associated with a user's logical session except those batch processes/jobs that are specifically created by the user (i.e., session owner) to continue after the session is terminated.
Conditions or trigger events requiring automatic session termination can include, for example, organization-defined periods of user inactivity, targeted responses to certain types of incidents, and time-of-day restrictions on information system use.
This capability is typically reserved for specific cases where the system owner, data owner, or organization requires additional assurance.
As a good programming practice, all applications should close the database connection when they finish using the resource. MariaDB will close the session when the connection is closed and release all resources associated with the session. If the connection is not closed, MariaDB has the five global variables to allow timeouts to occur and automatically close the connection and release all associated resources.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002361Configure 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.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.SRG-APP-000296-DB-000306<GroupDescription></GroupDescription>MADB-10-006300MariaDB must provide logout functionality to allow the user to manually terminate a session initiated by that user.<VulnDiscussion>If a user cannot explicitly end a DBMS session, the session may remain open and be exploited by an attacker; this is referred to as a zombie session.
Such logout may be explicit or implicit. Examples of explicit are clicking on a Log Out link or button in the application window; clicking the Windows Start button and selecting Log Out or Shut Down. Examples of implicit logout are closing the application's (main) window and powering off the workstation without invoking the OS shutdown.
Both the explicit and implicit logouts must be detected by the DBMS.
In all cases, the DBMS must ensure that the user's DBMS session and all processes owned by the session are terminated.
This should not, however, interfere with batch processes/jobs initiated by the user during his/her online session; these should be permitted to run to completion.
As a good programming practice, all applications should close the database connection when they finish using the resource. MariaDB will close the session when the connection is closed and release all resources associated with the session. If the connection cannot be closed, MariaDB has the five global variables to allow timeouts to occur and automatically close the connection and release all associated resources.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002363As 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.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.SRG-APP-000311-DB-000308<GroupDescription></GroupDescription>MADB-10-006400MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in storage.<VulnDiscussion>Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions.
Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information.
These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy.
One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.
The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002262Add 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/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.SRG-APP-000313-DB-000309<GroupDescription></GroupDescription>MADB-10-006500MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in process.<VulnDiscussion>Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions.
Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information.
These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy.
One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.
The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002263Add 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/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.SRG-APP-000314-DB-000310<GroupDescription></GroupDescription>MADB-10-006600MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in transmission.<VulnDiscussion>Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions.
Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information.
These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy.
One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise.
The mechanism used to support security labeling in MariaDB is custom application code.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002264Add 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/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.SRG-APP-000328-DB-000301<GroupDescription></GroupDescription>MADB-10-006700MariaDB must enforce discretionary access control policies, as defined by the data owner, over defined subjects, and objects.<VulnDiscussion>Discretionary Access Control (DAC) is based on the notion that individual users are owners of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled table permissions.
When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects.
A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level.
The policy is bounded by the information system boundary. Once the information is passed outside of the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002165Implement 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 ;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.SRG-APP-000340-DB-000304<GroupDescription></GroupDescription>MADB-10-006800MariaDB must prevent nonprivileged users from executing privileged functions, to include disabling, circumventing, or altering implemented security safeguards/countermeasures.<VulnDiscussion>Preventing nonprivileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges.
System documentation should include a definition of the functionality considered privileged.
Depending on circumstances, privileged functions can include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Nonprivileged users are individuals that do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from nonprivileged users.
A privileged function in MariaDB/database context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to:
CREATE
ALTER
DROP
GRANT
REVOKE
There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples include:
TRUNCATE TABLE;
DELETE, or
DELETE affecting more than n rows, for some n, or
DELETE without a WHERE clause;
UPDATE or
UPDATE affecting more than n rows, for some n, or
UPDATE without a WHERE clause;
any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal.
Depending on the capabilities of the DBMS and the design of the database and associated applications, the prevention of unauthorized use of privileged functions may be achieved by means of DBMS security features, database triggers, other mechanisms, or a combination of these.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002235Configure MariaDB security to protect all privileged functionality.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.SRG-APP-000342-DB-000302<GroupDescription></GroupDescription>MADB-10-006900Execution of software modules (to include stored procedures, functions, and triggers) with elevated privileges must be restricted to necessary cases only.<VulnDiscussion>In certain situations, to provide required functionality, MariaDB needs to execute internal logic (stored procedures, functions, triggers, etc.) and/or external code modules with elevated privileges. However, if the privileges required for execution are at a higher level than the privileges assigned to organizational users invoking the functionality applications/programs, those users are indirectly provided with greater privileges than assigned by organizations.
Privilege elevation must be used only where necessary and protected from misuse.
This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002233Determine 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.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.SRG-APP-000356-DB-000314<GroupDescription></GroupDescription>MADB-10-007100MariaDB must utilize centralized management of the content captured in audit records generated by all components of the DBMS.<VulnDiscussion>MariaDB can be configured to use syslog or any OS system file to store audit records to designated disk directories.
Review the server_audit_events to make sure that they include QUERY, and verify the server_audit_logging is set ON.
Check the log file location:
----
As the database administrator, run the following SQL:
mysql -u root -e show global variables like server_audit%
Verify the server_audit_logging is set ON.
##To use system logs (syslog):
From the query above verify the value of:
server_audit_output_type=SYSLOG
##To use a OS file:
From the query above verify the value of:
server_audit_output_type=FILE
The following values should also be checked:
server_audit_file_rotate_now = ON
server_audit_file_rotate_size x*1024. This is the size of the file (in bytes) that will cause file rotation.
server_ audit_file_rotations =x This is the number of rotations to save.
------
Check with the security guide to verify that the central management system is getting the audit logs from the correct directories.
If MariaDB audit records are not written directly to or systematically transferred to the centralized log management system in the security guide, this is a finding.
If MariaDB does not have a continuous network connection to the centralized log management system, and MariaDB audit records are not transferred to the centralized log management system weekly or more often, this is a finding.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001844Configure MariaDB or deploy and configure software tools to transfer audit records to a centralized log management system, continuously and in near-real time where a continuous network connection to the log management system exists, or at least weekly in the absence of such a connection.
If server_audit_output_type is set to FILE, set the directory in the MariaDB configuration file to one that is managed by the centralized management system.
[server]
server_audit_file_path = /path/to/audit.log
Restart MariaDB Enterprise Server.
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 audit logs are written to syslog, verify the central log management system is pulling the server's syslog.Determine if the centralized log management system is pulling syslog. If so, verify MariaDB Enterprise Audit plugin is configured to write to syslog.
If the centralized log management system is not pulling syslog, verify the MariaDB Enterprise Audit plugin is configured to write to a file which the centralized log management system can access.
MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type';
If not writing to syslog, AND the audit file is not being pulled by a central log management system, this is a finding.SRG-APP-000356-DB-000315<GroupDescription></GroupDescription>MADB-10-007200MariaDB must provide centralized configuration of the content to be captured in audit records generated by all components of the DBMS.<VulnDiscussion>If the configuration of the DBMS's auditing is spread across multiple locations in the database management software, or across multiple commands, only loosely related, it is harder to use and takes longer to reconfigure in response to events.
The DBMS must provide a unified tool for audit configuration.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001844Configure and/or deploy software tools to ensure that MariaDB audit records are written directly to or systematically transferred to a centralized log management system.Review the system documentation for a description of how audit records are off-loaded and how local audit log space is managed.
If the MariaDB audit records are not written directly to or systematically transferred to a centralized log management system, this is a finding.SRG-APP-000357-DB-000316<GroupDescription></GroupDescription>MADB-10-007300MariaDB must allocate audit record storage capacity in accordance with organization-defined audit record storage requirements.<VulnDiscussion>To ensure sufficient storage capacity for the audit logs, MariaDB must be able to allocate audit record storage capacity. Although another requirement (SRG-APP-000515-DB-000318) mandates that audit data be off-loaded to a centralized log management system, it remains necessary to provide space on the database server to serve as a buffer against outages and capacity limits of the off-loading mechanism.
The task of allocating audit record storage capacity is usually performed during initial installation of MariaDB and is closely associated with the DBA and system administrator roles. The DBA or system administrator will usually coordinate the allocation of physical drive space with the application owner/installer and the application will prompt the installer to provide the capacity information, the physical location of the disk, or both.
In determining the capacity requirements, consider such factors as total number of users; expected number of concurrent users during busy periods; number and type of events being monitored; types and amounts of data being captured; the frequency/speed with which audit records are off-loaded to the central log management system; and any limitations that exist on MariaDB s ability to reuse the space formerly occupied by off-loaded records.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001849MariaDB 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.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.SRG-APP-000359-DB-000319<GroupDescription></GroupDescription>MADB-10-007400MariaDB must provide a warning to appropriate support staff when allocated audit record storage volume reaches 75 percent of maximum audit record storage capacity.<VulnDiscussion>Organizations are required to use a central log management system, so, under normal conditions, the audit space allocated to the DBMS on its own server will not be an issue. However, space will still be required on the MariaDB server for audit records in transit, and, under abnormal conditions, this could fill up. Since a requirement exists to halt processing upon audit failure, a service outage would result.
If support personnel are not notified immediately upon storage volume utilization reaching 75 percent, they are unable to plan for storage capacity expansion.
The appropriate support staff include, at a minimum, the ISSO and the DBA/SA.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001855Configure 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.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.SRG-APP-000360-DB-000320<GroupDescription></GroupDescription>MADB-10-007500MariaDB must provide an immediate real-time alert to appropriate support staff of all audit failure events requiring real-time alerts.<VulnDiscussion>It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without a real-time alert, security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected.
The appropriate support staff include, at a minimum, the ISSO and the DBA/SA.
Alerts provide organizations with urgent messages. Real-time alerts provide these messages immediately (i.e., the time from event detection to alert occurs in seconds or less).</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001858Configure 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.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.SRG-APP-000374-DB-000322<GroupDescription></GroupDescription>MADB-10-007600MariaDB must record time stamps, in audit records and application data, that can be mapped to Coordinated Universal Time (UTC, formerly GMT).<VulnDiscussion>If time stamps are not consistently applied and there is no common time reference, it is difficult to perform forensic analysis.
Time stamps generated by MariaDB must include date and time. Time is commonly expressed in Coordinated Universal Time (UTC), a modern continuation of Greenwich Mean Time (GMT), or local time with an offset from UTC.
Some DBMS products offer a data type called TIMESTAMP that is not a representation of date and time. Rather, it is a database state counter and does not correspond to calendar and clock time. This requirement does not refer to that meaning of TIMESTAMP.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001890On 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 = UTCCheck 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.SRG-APP-000378-DB-000365<GroupDescription></GroupDescription>MADB-10-007800MariaDB must prohibit user installation of logic modules (stored procedures, functions, triggers, views, etc.) without explicit privileged status.<VulnDiscussion>Allowing regular users to install software, without explicit privileges, creates the risk that untested or potentially malicious software will be installed on the system. Explicit privileges (escalated or administrative privileges) provide the regular user with explicit capabilities and control that exceed the rights of a regular user.
DBMS functionality and the nature and requirements of databases will vary; so while users are not permitted to install unapproved software, there may be instances where the organization allows the user to install approved software packages such as from an approved software repository. The requirements for production servers will be more restrictive than those used for development and research.
The DBMS must enforce software installation by users based upon what types of software installations are permitted (e.g., updates and security patches to existing software) and what types of installations are prohibited (e.g., software whose pedigree with regard to being potentially malicious is unknown or suspect by the organization).
In the case of a database management system, this requirement covers stored procedures, functions, triggers, views, etc.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001812Document 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.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, run 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.SRG-APP-000380-DB-000360<GroupDescription></GroupDescription>MADB-10-007900MariaDB must enforce access restrictions associated with changes to the configuration of MariaDB or database(s).<VulnDiscussion>Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system.
When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system.
Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001813Configure MariaDB to enforce access restrictions associated with changes to the configuration of MariaDB or database(s).
1. Use REVOKE to revoke privileges or roles on objects from users.
MariaDB> REVOKE privileges ON object FROM user ;
2. Use REVOKE to remove a role from a user or another role that it was previously assigned to.
MariaDB> REVOKE role FROM grantee or role ;To list all the permissions of individual roles, as the database administrator, run the following SQL:
1. For User privileges:
Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account.
Run this script to create the SHOW GRANTS script for each user:
MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N';
Run each SHOW GRANTS command for each user.
2. For role privileges (except admin_option, whether the role can be granted by a particular use):
MariaDB> SELECT CONCAT('SHOW GRANTS FOR ',Role,';' ) FROM mysql.roles_mapping;
Run each SHOW GRANTS command for each role.
If any role has admin_option that should not, this is a finding.
There are no privileges assigned to databases or tables, security is enforced through the traditional way with granting very specific user privileges.
If any database or schema has update or create privileges and should not, this is a finding.SRG-APP-000381-DB-000361<GroupDescription></GroupDescription>MADB-10-008000MariaDB must produce audit records of its enforcement of access restrictions associated with changes to the configuration of the DBMS or database(s).<VulnDiscussion>Without auditing the enforcement of access restrictions against changes to configuration, it would be difficult to identify attempted attacks and an audit trail would not be available for forensic investigation for after-the-fact actions.
Enforcement actions are the methods or mechanisms used to prevent unauthorized changes to configuration settings. Enforcement action methods may be as simple as denying access to a file based on the application of file permissions (access restriction). Audit items may consist of lists of actions blocked by access restrictions or changes identified after the fact.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001814The 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.dTo 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.SRG-APP-000383-DB-000364<GroupDescription></GroupDescription>MADB-10-008100MariaDB must disable network functions, ports, protocols, and services deemed by the organization to be nonsecure, in accord with the Ports, Protocols, and Services Management (PPSM) guidance.<VulnDiscussion>Use of nonsecure network functions, ports, protocols, and services exposes the system to avoidable threats.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001762To 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.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.SRG-APP-000389-DB-000372<GroupDescription></GroupDescription>MADB-10-008200MariaDB must require users to reauthenticate when organization-defined circumstances or situations require reauthentication.<VulnDiscussion>The DoD standard for authentication of an interactive user is the presentation of a Common Access Card (CAC) or other physical token bearing a valid, current, DoD-issued Public Key Infrastructure (PKI) certificate, coupled with a Personal Identification Number (PIN) to be entered by the user at the beginning of each session and whenever reauthentication is required.
Without reauthentication, users may access resources or perform tasks for which they do not have authorization.
When applications provide the capability to change security roles or escalate the functional capability of the application, it is critical the user reauthenticate.
In addition to the reauthentication requirements associated with session locks, organizations may require reauthentication of individuals and/or devices in other situations, including (but not limited to) the following circumstances:
(i) When authenticators change;
(ii) When roles change;
(iii) When security categories of information systems change;
(iv) When the execution of privileged functions occurs;
(v) After a fixed period of time; or
(vi) Periodically.
Within the DoD, the minimum circumstances requiring reauthentication are privilege escalation and role changes.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002038To 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;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.SRG-APP-000400-DB-000367<GroupDescription></GroupDescription>MADB-10-008300MariaDB must prohibit the use of cached authenticators after an organization-defined time period.<VulnDiscussion>If cached authentication information is out-of-date, the validity of the authentication information may be questionable.
Each connection to the MariaDB database requires the authentication of the user. The authentication remains in place for the connection until the connection is closed or the connection times out due to inactivity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002007Verify 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.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.SRG-APP-000416-DB-000380<GroupDescription></GroupDescription>MADB-10-008400MariaDB must use NSA-approved cryptography to protect classified information in accordance with the data owner's requirements.<VulnDiscussion>Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.
It is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards.
NSA-approved cryptography for classified networks is hardware based. This requirement addresses the compatibility of MariaDB with the encryption devices.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002450Configure 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/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.SRG-APP-000427-DB-000385<GroupDescription></GroupDescription>MADB-10-008500MariaDB must only accept end entity certificates issued by DoD PKI or DoD-approved PKI Certification Authorities (CAs) for the establishment of all encrypted sessions.<VulnDiscussion>Only DoD-approved external PKIs have been evaluated to ensure that they have security controls and identity vetting procedures in place that are sufficient for DoD systems to rely on the identity asserted in the certificate. PKIs lacking sufficient security controls and identity vetting procedures risk being compromised and issuing certificates that enable adversaries to impersonate legitimate users.
The authoritative list of DoD-approved PKIs is published at https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/pdf/unclass-ss_using_commercial_pki_certificates.pdf.
This requirement focuses on communications protection for the MariaDB session rather than for the network packet.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002470Revoke 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.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.SRG-APP-000428-DB-000386<GroupDescription></GroupDescription>MADB-10-008600MariaDB must implement cryptographic mechanisms to prevent unauthorized modification of organization-defined information at rest (to include, at a minimum, PII and classified information) on organization-defined information system components.<VulnDiscussion>MariaDB’s handling of data requiring data at rest protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the MariaDB or implemented via additional software or operating system/file system settings, as appropriate to the situation.
Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields).
The decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002475Configure 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.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.SRG-APP-000429-DB-000387<GroupDescription></GroupDescription>MADB-10-008700MariaDB must implement cryptographic mechanisms preventing the unauthorized disclosure of organization-defined information at rest on organization-defined information system components.<VulnDiscussion>MariaDB’s handling of data requiring data at rest protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the MariaDB or implemented via additional software or operating system/file system settings, as appropriate to the situation.
Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields).
The decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002476Configure 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.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.SRG-APP-000441-DB-000378<GroupDescription></GroupDescription>MADB-10-008900MariaDB must maintain the confidentiality and integrity of information during preparation for transmission.<VulnDiscussion>Information can be either unintentionally or maliciously disclosed or modified during preparation for transmission, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality, or integrity of the information.
Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process.
When transmitting data, MariaDB associated applications and infrastructure must leverage transmission protection mechanisms.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002420Configure 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/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.SRG-APP-000442-DB-000379<GroupDescription></GroupDescription>MADB-10-009000MariaDB must maintain the confidentiality and integrity of information during reception.<VulnDiscussion>Information can be either unintentionally or maliciously disclosed or modified during reception, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality, or integrity of the information.
This requirement applies only to those applications that are either distributed or can allow access to data nonlocally. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process.
When receiving data, MariaDB-associated applications and infrastructure must leverage protection mechanisms.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002422Configure 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/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.SRG-APP-000447-DB-000393<GroupDescription></GroupDescription>MADB-10-009100When invalid inputs are received, MariaDB must behave in a predictable and documented manner that reflects organizational and system objectives.<VulnDiscussion>A common vulnerability is unplanned behavior when invalid inputs are received. This requirement guards against adverse or unintended system behavior caused by invalid inputs, where information system responses to the invalid input may be disruptive or cause the system to fail into an unsafe state.
The behavior will be derived from the organizational and system requirements and includes, but is not limited to, notification of the appropriate personnel, creating an audit record, and rejecting invalid input.
This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002754All 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).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.SRG-APP-000454-DB-000389<GroupDescription></GroupDescription>MADB-10-009200When updates are applied to the MariaDB software, any software components that have been replaced or made unnecessary must be removed.<VulnDiscussion>Previous versions of MariaDB components that are not removed from the information system after updates have been installed may be exploited by adversaries.
MariaDB may remove older versions of software automatically from the information system. In other cases, manual review and removal will be required. In planning installations and upgrades, organizations must include steps (automated, manual, or both) to identify and remove the outdated modules.
A transition period may be necessary when both the old and the new software are required. This should be taken into account in the planning.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002617If after the upgrade outdated packages remain, update them if needed or remove. Example:
$ sudo yum remove package_nameIf 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.SRG-APP-000456-DB-000390<GroupDescription></GroupDescription>MADB-10-009300Security-relevant software updates to MariaDB must be installed within the time period directed by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).<VulnDiscussion>Security flaws with software applications, including database management systems, are discovered daily. Vendors are constantly updating and patching their products to address newly discovered security vulnerabilities. Organizations (including any contractor to the organization) are required to promptly install security-relevant software updates (e.g., patches, service packs, and hot fixes). Flaws discovered during security assessments, continuous monitoring, incident response activities, or information system error handling must also be addressed expeditiously.
Organization-defined time periods for updating security-relevant software may vary based on a variety of factors including, for example, the security category of the information system or the criticality of the update (i.e., severity of the vulnerability related to the discovered flaw).
This requirement will apply to software patch management solutions that are used to install patches across the enclave and also to applications themselves that are not part of that patch management solution. For example, many browsers today provide the capability to install their own patch software. Patch criticality, as well as system criticality, will vary. Therefore, the tactical situations regarding the patch management process will also vary. This means that the time period utilized must be a configurable parameter. Time frames for application of security-relevant software updates may be dependent upon the Information Assurance Vulnerability Management (IAVM) process.
The application will be configured to check for and install security-relevant software updates within an identified time period from the availability of the update. The specific time period will be defined by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002605Institute and adhere to policies and procedures to ensure that patches are consistently applied to MariaDB within the time allowed.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.SRG-APP-000492-DB-000332<GroupDescription></GroupDescription>MADB-10-009400MariaDB must be able to generate audit records when security objects are accessed.<VulnDiscussion>Changes to the security configuration must be tracked.
This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality.
In an SQL environment, types of access include, but are not necessarily limited to:
SELECT
CREATE
INSERT
UPDATE
DELETE
EXECUTE
ALTER
DROP</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000492-DB-000333<GroupDescription></GroupDescription>MADB-10-009500MariaDB must generate audit records when unsuccessful attempts to access security objects occur.<VulnDiscussion>Changes to the security configuration must be tracked.
This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality.
In an SQL environment, types of access include, but are not necessarily limited to:
SELECT
CREATE
INSERT
UPDATE
DELETE
EXECUTE
ALTER
DROP
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000494-DB-000344<GroupDescription></GroupDescription>MADB-10-009600MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are accessed.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000494-DB-000345<GroupDescription></GroupDescription>MADB-10-009700MariaDB must generate audit records when unsuccessful attempts to access categories of information (e.g., classification levels/security levels) occur.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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 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.SRG-APP-000495-DB-000326<GroupDescription></GroupDescription>MADB-10-009800MariaDB must generate audit records when privileges/permissions are added.<VulnDiscussion>Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.
In MariaDB, adding permissions is done via the GRANT command, or, in the negative, the REVOKE command.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000495-DB-000327<GroupDescription></GroupDescription>MADB-10-009900MariaDB must generate audit records when unsuccessful attempts to add privileges/permissions occur.<VulnDiscussion>Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.
In MariaDB, adding permissions is done via the GRANT command, or, in the negative, the REVOKE command.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000495-DB-000328<GroupDescription></GroupDescription>MADB-10-010000MariaDB must generate audit records when privileges/permissions are modified.<VulnDiscussion>Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.
In the MariaDB environment, modifying permissions is done via the GRANT, and REVOKE commands.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000495-DB-000329<GroupDescription></GroupDescription>MADB-10-010100MariaDB must generate audit records when unsuccessful attempts to modify privileges/permissions occur.<VulnDiscussion>Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.
In the MariaDB environment, modifying permissions is typically done via the GRANT, and REVOKE commands.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000496-DB-000334<GroupDescription></GroupDescription>MADB-10-010200MariaDB must generate audit records when security objects are modified.<VulnDiscussion>Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000496-DB-000335<GroupDescription></GroupDescription>MADB-10-010300MariaDB must generate audit records when unsuccessful attempts to modify security objects occur.<VulnDiscussion>Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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"
]
}'
));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.SRG-APP-000498-DB-000346<GroupDescription></GroupDescription>MADB-10-010400MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are modified.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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 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.SRG-APP-000498-DB-000347<GroupDescription></GroupDescription>MADB-10-010500MariaDB must generate audit records when unsuccessful attempts to modify categories of information (e.g., classification levels/security levels) occur.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172The 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 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.SRG-APP-000499-DB-000330<GroupDescription></GroupDescription>MADB-10-010600MariaDB must generate audit records when privileges/permissions are deleted.<VulnDiscussion>Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users.
In MariaDB, deleting permissions is typically done via the REVOKE command.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172No 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"
]
}'
));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.SRG-APP-000499-DB-000331<GroupDescription></GroupDescription>MADB-10-010700MariaDB must generate audit records when unsuccessful attempts to delete privileges/permissions occur.<VulnDiscussion>Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected.
In MariaDB, deleting permissions is typically done via the REVOKE command.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172No 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"
]
}'
));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.SRG-APP-000501-DB-000336<GroupDescription></GroupDescription>MADB-10-010800MariaDB must generate audit records when security objects are deleted.<VulnDiscussion>The removal of security objects from the database/DBMS would seriously degrade a system s information assurance posture. If such an event occurs, it must be logged.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Super/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"
]
}'
));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.SRG-APP-000501-DB-000337<GroupDescription></GroupDescription>MADB-10-010900MariaDB must generate audit records when unsuccessful attempts to delete security objects occur.<VulnDiscussion>The removal of security objects from the database/DBMS would seriously degrade a system s information assurance posture. If such an action is attempted, it must be logged.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Super/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"
]
}'
));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.SRG-APP-000502-DB-000348<GroupDescription></GroupDescription>MADB-10-011000MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are deleted.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Update 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 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.SRG-APP-000502-DB-000349<GroupDescription></GroupDescription>MADB-10-011100MariaDB must generate audit records when unsuccessful attempts to delete categories of information (e.g., classification levels/security levels) occur.<VulnDiscussion>Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Update 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 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.SRG-APP-000503-DB-000350<GroupDescription></GroupDescription>MADB-10-011200MariaDB must generate audit records when successful logons or connections occur.<VulnDiscussion>For completeness of forensic analysis, it is necessary to track who/what (a user or other principal) logs on to the DBMS.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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"
]
}'
));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.SRG-APP-000503-DB-000351<GroupDescription></GroupDescription>MADB-10-011300MariaDB must generate audit records when unsuccessful logons or connection attempts occur.<VulnDiscussion>For completeness of forensic analysis, it is necessary to track failed attempts to log on to MariaDB. While positive identification may not be possible in a case of failed authentication, as much information as possible about the incident must be captured.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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"
]
}'
));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.SRG-APP-000504-DB-000354<GroupDescription></GroupDescription>MADB-10-011400MariaDB must generate audit records for all privileged activities or other system-level access.<VulnDiscussion>Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
System documentation should include a definition of the functionality considered privileged.
A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to:
CREATE
ALTER
DROP
GRANT
REVOKE
There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples in SQL include:
TRUNCATE TABLE;
DELETE, or
DELETE affecting more than n rows, for some n, or
DELETE without a WHERE clause;
UPDATE or
UPDATE affecting more than n rows, for some n, or
UPDATE without a WHERE clause;
any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal.
Depending on the capabilities of the DBMS and the design of the database and associated applications, audit logging may be achieved by means of DBMS auditing features, database triggers, other mechanisms, or a combination of these.
Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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;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.SRG-APP-000504-DB-000355<GroupDescription></GroupDescription>MADB-10-011500MariaDB must generate audit records when unsuccessful attempts to execute privileged activities or other system-level access occur.<VulnDiscussion>Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
System documentation should include a definition of the functionality considered privileged.
A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to:
CREATE
ALTER
DROP
GRANT
REVOKE
Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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;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.SRG-APP-000505-DB-000352<GroupDescription></GroupDescription>MADB-10-011600MariaDB must generate audit records showing starting and ending time for user access to the database(s).<VulnDiscussion>For completeness of forensic analysis, it is necessary to know how long a user's (or other principal's) connection to MariaDB lasts. This can be achieved by recording disconnections, in addition to logons/connections, in the audit logs.
Disconnection may be initiated by the user or forced by the system (as in a timeout) or result from a system or network failure. To the greatest extent possible, all disconnections must be logged.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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"
]
}'
));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.SRG-APP-000506-DB-000353<GroupDescription></GroupDescription>MADB-10-011700MariaDB must generate audit records when concurrent logons/connections by the same user from different workstations occur.<VulnDiscussion>For completeness of forensic analysis, it is necessary to track who logs on to MariaDB.
Concurrent connections by the same user from multiple workstations may be valid use of the system; or such connections may be due to improper circumvention of the requirement to use the CAC for authentication; or they may indicate unauthorized account sharing; or they may be because an account has been compromised.
(If the fact of multiple, concurrent logons by a given user can be reliably reconstructed from the log entries for other events (logons/connections; voluntary and involuntary disconnections), then it is not mandatory to create additional log entries specifically for this.)</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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"
}'
));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.SRG-APP-000507-DB-000356<GroupDescription></GroupDescription>MADB-10-011800MariaDB must be able to generate audit records when successful accesses to objects occur.<VulnDiscussion>Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident, or identify those responsible for one.
In an SQL environment, types of access include, but are not necessarily limited to:
SELECT
INSERT
UPDATE
DELETE
EXECUTE</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172If 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"
]
}
]
}
]
}'
)
);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.SRG-APP-000507-DB-000357<GroupDescription></GroupDescription>MADB-10-011900MariaDB must generate audit records when unsuccessful accesses to objects occur.<VulnDiscussion>Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
In an SQL environment, types of access include, but are not necessarily limited to:
SELECT
INSERT
UPDATE
DELETE
EXECUTE
To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172If 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"
]
}
]
}
]
}'
)
);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.SRG-APP-000508-DB-000358<GroupDescription></GroupDescription>MADB-10-012000MariaDB must generate audit records for all direct access to the database(s).<VulnDiscussion>In this context, direct access is any query, command, or call to MariaDB that comes from any source other than the application(s) that it supports. Examples would be the command line or a database management utility program. The intent is to capture all activity from administrative and nonstandard sources.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000172Edit 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"
}'
));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.SRG-APP-000514-DB-000381<GroupDescription></GroupDescription>MADB-10-012100MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to provision digital signatures.<VulnDiscussion>Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.
For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002450If 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/fipsAs 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.SRG-APP-000514-DB-000382<GroupDescription></GroupDescription>MADB-10-012200MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to generate and validate cryptographic hashes.<VulnDiscussion>Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.
For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002450If 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/fipsAs 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.SRG-APP-000514-DB-000383<GroupDescription></GroupDescription>MADB-10-012300MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to protect unclassified information requiring confidentiality and cryptographic protection, in accordance with the data owners requirements.<VulnDiscussion>Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated.
It is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards.
For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002450If 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/fipsAs 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.SRG-APP-000515-DB-000318<GroupDescription></GroupDescription>MADB-10-012400MariaDB must off-load audit data to a separate log management facility; this must be continuous and in near real time for systems with a network connection to the storage facility and weekly or more often for stand-alone systems.<VulnDiscussion>Information stored in one location is vulnerable to accidental or incidental deletion or alteration.
Off-loading is a common process in information systems with limited audit storage capacity.
MariaDB writes audit records to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-001851To 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.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.SRG-APP-000516-DB-000363<GroupDescription></GroupDescription>MADB-10-012500MariaDB 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.<VulnDiscussion>Configuring the DBMS to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across DoD that reflects the most restrictive security posture consistent with operational requirements.
In addition to this STIG, sources of guidance on security and information assurance include NSA configuration guides, CTOs, DTMs, and IAVMs. The DBMS must be configured in compliance with guidance from all such relevant sources.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-000366Configure MariaDB in accordance with DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, and DTMs and IAVMs.
If MariaDB is not configured in accordance with security configuration settings, this is a finding.Review the MariaDB documentation and configuration to determine if MariaDB is configured in accordance with DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, DTMs, and IAVMs.
If MariaDB is not configured in accordance with security configuration settings, this is a finding.SRG-APP-000456-DB-000400<GroupDescription></GroupDescription>MADB-10-012600MariaDB products must be a version supported by the vendor.<VulnDiscussion>Unsupported commercial and database systems should not be used because fixes to newly identified bugs will not be implemented by the vendor. The lack of support can result in potential vulnerabilities.
Systems at unsupported servicing levels or releases will not receive security updates for new vulnerabilities, which leaves them subject to exploitation.
When maintenance updates and patches are no longer available, the database software is no longer considered supported and should be upgraded or decommissioned.</VulnDiscussion><FalsePositives></FalsePositives><FalseNegatives></FalseNegatives><Documentable>false</Documentable><Mitigations></Mitigations><SeverityOverrideGuidance></SeverityOverrideGuidance><PotentialImpacts></PotentialImpacts><ThirdPartyTools></ThirdPartyTools><MitigationControl></MitigationControl><Responsibility></Responsibility><IAControls></IAControls>DPMS Target MariaDB Enterprise 10.xDISADPMS TargetMariaDB Enterprise 10.x5475CCI-002605Remove or decommission all unsupported software products.
Upgrade MariaDB Enterprise to a supported version of the product.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.