ALWAYS VERIFY
WITH AN
EXPECTED
ALGORITHM
@philnash
Slide 44
Slide 44 text
PUBLIC KEYS
AND
ENCRYPTION
@philnash
Slide 45
Slide 45 text
WHAT CAN YOU
USE THEM FOR?
Slide 46
Slide 46 text
STATELESS
SESSIONS
@philnash
Slide 47
Slide 47 text
Stateless sessions - revocation
• exp claim - token expiry time
• Without state, you can't revoke individual tokens
except by expiry
• Requires a blacklist of revoked tokens to check
against
@philnash
Slide 48
Slide 48 text
Stateless sessions - storage
• Cookies
• ensure you have CSRF protection
• localStorage
• vulnerable to XSS
• requires JS to store and insert as an
Authentication header
@philnash
Slide 49
Slide 49 text
MICROSERVICE
ARCHITECTURE
@philnash
Slide 50
Slide 50 text
Microservice architecture
• Authentication server signs tokens with private
key
• Other servers can verify with public key
@philnash
Slide 51
Slide 51 text
OPENID
CONNECT
@philnash
Slide 52
Slide 52 text
CLIENT SIDE
AUTH FOR 3RD
PARTY
SERVICES
@philnash
Slide 53
Slide 53 text
JWT, WTF?
Slide 54
Slide 54 text
JWT, WTF?
• https:/
/jwt.io
• RFC 7519
• JWTs VS Sessions
• Stop using JWT for sessions
• Use JWT the Right Way
@philnash