feat:密码改密复杂度要求和定期30天过期策略

This commit is contained in:
waner
2026-04-24 10:06:31 +08:00
parent 2635f805d1
commit 6c3474e4d6
13 changed files with 298 additions and 24 deletions
@@ -275,6 +275,7 @@ CREATE TABLE IF NOT EXISTS tms_auth_user_account (
password_salt VARCHAR(128) NOT NULL,
status VARCHAR(32) NOT NULL,
need_change_password TINYINT(1) NOT NULL DEFAULT 1,
password_changed_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
failed_count INT NOT NULL DEFAULT 0,
locked_until DATETIME(3) NULL,
last_login_at DATETIME(3) NULL,
@@ -295,6 +296,7 @@ CREATE TABLE IF NOT EXISTS tms_auth_full_account (
password_salt VARCHAR(128) NOT NULL,
status VARCHAR(32) NOT NULL,
need_change_password TINYINT(1) NOT NULL DEFAULT 1,
password_changed_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
failed_count INT NOT NULL DEFAULT 0,
locked_until DATETIME(3) NULL,
last_login_at DATETIME(3) NULL,
@@ -445,6 +447,7 @@ INSERT IGNORE INTO tms_auth_user_account (
password_salt,
status,
need_change_password,
password_changed_at,
failed_count,
locked_until,
last_login_at,
@@ -462,6 +465,7 @@ VALUES
'init-super-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -478,6 +482,7 @@ VALUES
'init-super-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -494,6 +499,7 @@ VALUES
'init-key-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -510,6 +516,7 @@ VALUES
'init-audit-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -526,6 +533,7 @@ VALUES
'init-ops-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -544,6 +552,7 @@ INSERT IGNORE INTO tms_auth_full_account (
password_salt,
status,
need_change_password,
password_changed_at,
failed_count,
locked_until,
last_login_at,
@@ -562,6 +571,7 @@ VALUES
'init-super-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -579,6 +589,7 @@ VALUES
'init-super-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -596,6 +607,7 @@ VALUES
'init-key-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -613,6 +625,7 @@ VALUES
'init-audit-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,
@@ -630,6 +643,7 @@ VALUES
'init-ops-admin-salt-20260325',
'ACTIVE',
1,
CURRENT_TIMESTAMP(3),
0,
NULL,
NULL,