F.52. lt_password_policy

F.52.1. Concepts
F.52.2. Prerequisites
F.52.3. Creating Extensions

This extension for LightDB policy provides for the detection of user passwords.

F.52.1. Concepts

This extension provides the lt_password_policy view that records the username, the time when the user's password expires, the time when the user lockout expires, and the number of password failures.

F.52.2. Prerequisites

lt_password_policy extension depends on extension lt_password_policy.

F.52.3. Creating Extensions

you must add lt_password_policy in shared_preload_libraries, and restart server is needed after modify shared_preload_libraries.

 

# lightdb.conf
shared_preload_libraries = 'lt_stat_statements,lt_password_policy'

lightdb@postgres=# CREATE EXTENSION lt_stat_statements;
lightdb@postgres=# CREATE EXTENSION lt_password_policy;

lt_password_policy.life_time = 5 - Default password validity period (in days), with a default setting of 180 days. A value of -1 indicates that the password remains valid indefinitely.

lt_password_policy.failed_login_attempts = 5 - The number of login attempts before triggering account lockout, with a default setting of 5 attempts. A value of -1 indicates that the lockout will never be triggered.

lt_password_policy.lock_duration = 3 - The number of days to lock the account after login failures, with a default setting of 1 day. A value of -1 indicates that the lock will never be triggered.

lt_password_policy.min_length = 6 - Minimum password length, with a default of 8 characters. A value of -1 indicates that length validation is not enforced.

lt_password_policy.strength = 3 - Password Strength Policy: 0: No requirement; 1: Must contain both uppercase and lowercase letters as well as numbers; 2: Must contain uppercase and lowercase letters, numbers, and special characters;

lt_password_policy.max_users = 100 - Supports setting a minimum value for the number of users to be recorded, with a default of 100.