[M-2] Session auth weaknesses: no renew_session on login, cookie not secure/encrypted, GET logout, no TTL #14
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#14
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
Login sets
); there is no idle/absolute timeout.
session_authwithout renewing the session; the cookie store is signed but not encrypted and lackssecure: true; logout is a GET (CSRF-able viaEvidence
lib/mdid_ws_web/controllers/page_controller.ex:40-43, 75-79lib/mdid_ws_web/endpoint.ex:7-12—@session_optionswithout secure/encryption_saltImpact
Session-fixation hygiene gap, cookie sent over plain HTTP if ever reachable non-TLS, forced logouts, indefinitely valid sessions.
Fix
renew_session(conn)before put_session on loginsecure: true(and consider:encryption_salt)session_auth_attimestamp with TTL checked in RequireSessionAuthLine numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).Verified fixed on main (
1b6216b): renew on login, secure+encrypted cookie, POST /logout, session_auth_at TTL (A-batch).