SV-253735r1050788_rule
V-253735
SRG-APP-000389-DB-000372
MADB-10-008200
CAT II
10
To force a single user reauthenticate, the user must be currently authenticated to the database server.
Find the process ID of the user in question:
MariaDB> SELECT id FROM information_schema.processlist WHERE user = 'username';
Use the id to kill the process, which kills the connection and forces the user to reauthenticate:
MariaDB> KILL id;
To force all users to reauthenticate, run the following as the database administrator:
MariaDB> SELECT concat( KILL ,id, ; ) FROM information_schema.processlist INTO OUTFILE /tmp/x.txt;
MariaDB> SOURCE /tmp/x.txt;
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.
V-253735
False
MADB-10-008200
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.
M
5475