StoicBuilder
Later missionMission 46: Taking access backYou can practise it now. It counts once you reach mission 46, after “One number away”.Back to HQ
Exit lesson
Tokens and sessions done rightProLesson 41 of 45, about 8 min
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
0 XP

The app: Sentinel, a security console

SentinelHarbor / Sessionssession inspector

Application storage for https://harbor.example, signed in as Ana Ruiz

WhereKeyValue
localStorageharbor_tokeneyJhbGciOiJIUzI1Ni…
cookiethemedark

Decoding needs no key. Anyone holding the token can do it.

The token, the headers and the session code

harbor_token as stored in the browserJWT
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImsxIn0.
eyJzdWIiOiJ1c3JfYW5hXzdmM2MiLCJuYW1lIjoiQW5hIFJ1aXoiLCJ0ZWFt….
q0V2pY8m…
header . claims . signature, each part base64url

Press Decode to read the claims.

The MagisterHarbor’s sign-in keeps a JWT in the browser. A JWT has three parts: a header, the claims and a signature. The claims are only base64, so anyone holding the token can read them. The signature is what stops them being changed. Decode it, then tap how long it lasts.

Step 1 of 8Decode Ana’s token
  • Decode the token
  • Tap when it expires

You’re not signed in, so this lesson won’t be saved to your path. Sign in free to keep your XP.