- Prevent removal of last ADMIN role via role unassign, user delete, or group role removal (returns 409 Conflict) - Add password policy: min 12 chars, 3/4 character classes, no username - Add brute-force protection: 5 attempts then 15min lockout, IP rate limit - Add token revocation on password change via token_revoked_before column - V9 migration adds failed_login_attempts, locked_until, token_revoked_before Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS failed_login_attempts INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS locked_until TIMESTAMPTZ;
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS token_revoked_before TIMESTAMPTZ;
|
||||
Reference in New Issue
Block a user