Information
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.
NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.
Solution
Configure MariaDB to automatically terminate a user's session based on security procedures requirements regarding conditions or trigger events that require session termination.
To change the values of the following timeout variables to conform to organization-defined values for triggering conditions or events requiring session termination select the appropriate variable to change and as the database administrator.
As the administrator locate the MariaDB Enterprise Server configuration file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/.
In the [mariadb] section add the lines:
interactive_timeout = value
wait_timeout = value
idle_transaction_timeout = value
idle_write_transaction_timeout = value
idle_readonly_transaction_timeout = value
Where value is in seconds and corresponds to the company defined value. Restart MariaDB Enterprise Server for these changes to take effect.