[H-2] Issued JWTs can never be revoked — stored token rows never consulted, no suspension surface #6
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
Tokens are persisted with jti/expiry/status 'for tracking and revocation', but
verify_access_token/1never reads the:oauth_access_tokenrecord. No route exposessuspend_client(it's dead code), so there is no operational way to kill a token or client without Mnesia surgery.Evidence
lib/mdid_ws/oauth/token.ex:60-103— verify checks signature, exp, client status onlylib/mdid_ws/oauth/token.ex:124-136— token row written, never read backImpact
A stolen bearer token remains valid for its full 3600s even after detection; no incident-response capability.
Fix
jtiin verify; reject when missing orstatus != "active"Line numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).Verified fixed on main (
1b6216b): verify_access_token requires an active stored token row by jti; admin endpoints for token revoke and client suspend/reactivate (batch A2).