Rule ID
SV-289368r1319294_rule
Version
V1R1
CCIs
Inactive accounts that remain enabled increase the risk of unauthorized use, especially when credentials are forgotten, abandoned, or not actively monitored. MySQL 9.x can lock accounts and track authentication-related account state, but automatic disabling of inactive accounts is typically implemented through administrative jobs, identity management integration, or other external account management processes rather than a single built-in MySQL inactivity timer.
Review MySQL 9.x account management procedures and the mechanism used to identify and disable inactive accounts. 1. Determine the organization-defined inactivity period for database management system (DBMS) accounts. 2. Review the method used to detect inactivity, such as: - Enterprise identity management tooling. - Scheduled administrative jobs. - Account review scripts. - Audit log review processes. 3. Verify inactive accounts are automatically disabled after the defined period of inactivity. 4. Review account status and available account metadata: SELECT user, host, account_locked, password_last_changed FROM mysql.user ORDER BY user, host; 5. Review the automated process or script that identifies inactive accounts and locks or disables them. 6. Verify there is evidence the process runs on schedule and has disabled inactive accounts when required. If inactive accounts are not automatically disabled after the organization-defined period of inactivity, this is a finding.
Configure the MySQL 9.x operating environment to automatically disable inactive accounts after the organization-defined period of inactivity. Implement an approved automated process that: - Identifies inactive DBMS accounts. - Locks or disables those accounts. - Records the action for administrative review. Example account lock action: ALTER USER 'username'@'host' ACCOUNT LOCK; Ensure the inactivity detection logic, schedule, and exceptions are documented and aligned with organizational policy.