~/talk

JSON Web Tokens Suck

Talkat CodeMash 2018 · 2018-01-09..01-12· [security, web-platform]
slides:none on file

Claims that JWTs are great for web auth turn out to be wrong: most JWTs are not encrypted and stateless JWTs embed full user records so they balloon (example: a JWT 179 bytes vs a signed session ID 64 bytes; real records make tokens 25–50× larger and often exceed the 4KB cookie limit), forcing storage in local storage which opens XSS theft, while cookies with HTTPOnly and SameSite prevent CSRF; a Node.js jsonwebtoken test script demonstrates the size and revocation tradeoffs, so use JWTs only as short‑lived one‑time tokens.

AI-written summary · about

  1. 0:00Start
  2. 2:07What are JWTs?
  3. 3:11What's a Cryptographic Signature?
  4. 6:09Way 2: Cookies
  5. 10:13Term: Session Cookie
  6. 11:04BONUS: What's the difference between a Session Cookie and a Stateful JWT?
  7. 11:31Term: Cookies
  8. 12:03Creating Cookies
  9. 12:55NOTE: Required Cookie Flags
  10. 13:47Reading Cookies
  11. 14:26Term: Local Storage
  12. 15:16JWTs are Easier to Use
  13. 16:19Score
  14. 16:54JWTs are More Flexible
  15. 23:35DETOUR! What is CSRF?
  16. 30:25JWTs Are Better for Cross Domain
  17. 33:28JWTS Work Better on Mobile
  18. 34:09JWTs are More Efficient
  19. 43:03Session Scaling (basic)
  20. 43:49Session Scaling (advanced)
  21. 44:38Session Scaling (super advanced)
  22. 45:16JWTS Are Secure By Design
  23. 49:03JWT Use Cases (cont)
  24. 53:06Thank you!
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.