Skip to content

Fix/failed login lockout - #95

Merged
DJAngel973 merged 3 commits into
mainfrom
fix/failed-login-lockout
Nov 1, 2026
Merged

DJAngel973 merged 3 commits into
mainfrom
fix/failed-login-lockout

Conversation

@DJAngel973

Copy link
Copy Markdown
Owner

Summary

Implements SEC-005 failed-login lockout and updates the SEC-004 completion record.

Commits included

  1. fix(auth): enforce failed-login lockout

    • Adds persisted failed-login accounting.
    • Uses REQUIRES_NEW so counter updates survive failed authentication rollback.
    • Uses pessimistic locking to serialize concurrent account attempts.
    • Locks accounts after five consecutive failures for 30 minutes.
    • Adds audit and CRITICAL security events.
    • Aligns the PostgreSQL constraint with the configured threshold.
  2. fix(auth): reset expired lockout counters

    • Starts a new failed-login sequence after lock expiration.
    • Prevents an immediate re-lock after the 30-minute period.
    • Updates outdated security and behavior comments.

Security

  • OWASP A07: temporary account lockout against brute-force attempts.
  • OWASP A09: failed logins and lockouts generate audit evidence.
  • Wrong-password and unknown-email responses remain non-enumerating.
  • Passwords and tokens are never logged.

@DJAngel973
DJAngel973 merged commit 45fac1a into main Nov 1, 2026
4 checks passed
@DJAngel973
DJAngel973 deleted the fix/failed-login-lockout branch November 4, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant