Shipping ItLesson 59 of 74

Module 7 · Security after the short list

Sessions, and taking one back

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 2 of 9 in this chapter

This chapter’s goalEnforce authorisation per object rather than per page, revoke a session or rotate a key without an outage, and run the first day of a breach or an abuse report with evidence preserved and users told the truth.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Server-side session versus stateless tokenOpaque ID, looked up server-sideCookie holds a random ID; server checks Redisor a tableRevoking is a delete, effective on the nextrequestOne fast lookup per requestThe right default for almost every applicationSigned token carrying its claims (JWT)No lookup, which is the whole selling pointNothing is consulted, so nothing can revoke ituntil expiryUsual patch: 5 to 15 minute access tokens plusa stored refresh tokenWorth it when several services must verifywithout a shared storeThe test of a session design is revocation. The stateless token’s patch, short access tokens plus astored refresh token, reintroduces the lookup it was avoiding and adds a window in which a revokeduser keeps working.
The test of a session design is revocation. The stateless token's patch, short access tokens plus a stored refresh token, reintroduces the lookup it was avoiding and adds a window in which a revoked user keeps working.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The test of a session system is revocation

Anybody can issue a session. The question that separates designs is what happens when you need to end one immediately: a stolen laptop, a shared password, a member removed from a team, a support agent who has left, an account you have just banned.

If your answer is “they stay logged in until it expires”, you do not have a session system, you have a countdown.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Agents and Automation exam.

Stuck on something?Ask Tri, your AI tutor

How to cite: Addaly (2026) ‘Sessions, and taking one back’, in Shipping It. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/cloud-and-shipping/sessions-and-logging-people-out (Accessed: 27 November 2026).