Skip to content

fix(auth): enforce JWT account state - #96

Merged
DJAngel973 merged 1 commit into
mainfrom
fix/jwt-account-state-enforcement
Nov 1, 2026
Merged

DJAngel973 merged 1 commit into
mainfrom
fix/jwt-account-state-enforcement

Conversation

@DJAngel973

Copy link
Copy Markdown
Owner

Summary

Implements SEC-006: existing access tokens can no longer authenticate users whose accounts are disabled or temporarily locked.

Changes

  • JwtAuthFilter now checks the reloaded account state before creating the SecurityContext.
  • A valid JWT is rejected when the account is disabled or locked.
  • Account deactivation now revokes all active refresh sessions.
  • Added unit tests for disabled, locked, and active/unlocked JWT authentication states.
  • Updated deactivation tests to verify refresh-session revocation.
  • Updated SEC-006 verification status in IMPLEMENTATION-PLAN.md.

Security

  • OWASP A07: JWT signature validity does not by itself prove the account remains authorized.
  • OWASP A01: protected endpoints receive no authenticated principal for disabled or locked accounts.
  • OWASP A09: account deactivation remains audited.
  • Disabled accounts cannot use existing access tokens or obtain new ones through existing refresh sessions.

@DJAngel973
DJAngel973 merged commit 4f64065 into main Nov 1, 2026
4 checks passed
@DJAngel973
DJAngel973 deleted the fix/jwt-account-state-enforcement 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