4.4 Lock Out Accounts if Not Currently in Use

Information

If users with database accounts will not be using the database for some time, disabling the account will reduce the risk of attacks or inappropriate account usage.

Only actively used database accounts should be allowed to login to the database.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

To lock accounts, as a superuser, run:

ALTER ROLE <account> NOLOGIN;

To unlock accounts, as a superuser, run:

ALTER ROLE <account> LOGIN;

See Also

https://workbench.cisecurity.org/benchmarks/19478

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-2(3)

Plugin: PostgreSQLDB

Control ID: 0fb1a81160f920229edccd72058b512a2a2ff5098f02e726ce1dff4a029ab2ea