Session Security
Cheat sheet · https://pcornel.dk/topic.php?topic=4750
Answer
Session security protects the link between a user and their login: random, long session IDs, regenerated at login, sent only in secure cookies, with idle and absolute timeouts and server-side logout.
Remember
- Use long random session IDs, regenerated at login.
- Use idle and absolute timeouts.
- Invalidate sessions server-side on logout.
First checks
- Session ID entropy and rotation on login — fixation protection
- Idle and absolute timeouts — expiry
- Logout invalidates server-side session — termination
Verify in this order
login → new session ID → cookie → expiry/logout
Where it usually breaks
First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4750