Session Lifetime, Rotation, and Revocation
Model session identifiers as temporary credentials and choose how authentication changes affect both issued state and active requests.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A session needs a narrow validity contract
A server-side session can store its principal, issued time, idle deadline and absolute deadline. A client presents a random identifier that refers to that state. It should be transmitted only through the intended protected channel and cookie scope. On a privilege change such as sign-in, issuing a new identifier lets the service tie the elevated session to the completed authentication event.
Revocation must reach the actual validator
Deleting a local browser cookie and revoking a server-side session are distinct state changes. For an account-wide revocation, validators must reject old sessions according to a documented cutoff or version rule. Decide how concurrent requests and refreshes relate to that cutoff. Authentication and authorization explains why a valid session still needs a per-operation permission decision. Replay protection considers repeated authenticated requests independently of session lifetime.[1][2]