Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Json Web Token at Employment Hero
Search
Luong Vo
September 11, 2018
Programming
44
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Json Web Token at Employment Hero
Luong Vo
September 11, 2018
More Decks by Luong Vo
See All by Luong Vo
Why our platform needs Redis Sentinel
luongvo
0
100
Performance Monitoring at Employment Hero
luongvo
0
160
Lalaland - A C2C ecommerce site - pitch deck
luongvo
0
450
Skeleton-based Human Action Recognition with Recurrent Neural Network
luongvo
0
260
Ruby Threads
luongvo
1
43
Caching in Ruby
luongvo
1
38
Monitoring system at Employment Hero
luongvo
0
58
Introduction to Docker and Docker Compose
luongvo
0
77
Database migration from Heroku to Amazon Web Services
luongvo
0
83
Other Decks in Programming
See All in Programming
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.8k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
54
35k
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
260
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
490
typoなんかねぇよ
raspython3
0
660
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
130
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
XHTMLが残したもの
yosuke_furukawa
PRO
1
410
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
630
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
4 Signs Your Business is Dying
shpigford
187
23k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
260
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
340
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
320
Practical Orchestrator
shlominoach
191
12k
Technical Leadership for Architectural Decision Making
baasie
3
550
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Transcript
JSON Web Tokens Luong Vo
None
None
None
None
None
None
JSON Web Token
What is JSON Web Tokens
JSON Object To transfer data between two parties digitally signed
Digitally signed JSON Data Signature JSON Web Token
Signature signing algorithm
RSA256
HSA256
Comparison RSA256 HSA256
None
None
JSON API Authentication
Main app Username + password Session token Auth Service Generate
session token Save session token to database But why?
Main app Session token JWT Token Auth Service Generate JWT
Query session token to check But why?
Main app Get/…. + JWT Token { “data”: …. }
Auth Service Validate JWT But why?
Main app Get/…. + JWT Token { “data”: …. }
Auth Service Validate JWT Microservice GRPC call But why?
Microservice API Call !? Oh….
Main app Get/…. + JWT Token { “data”: …. }
Auth Service Validate JW T Microservice Oh….
External system Main app Microservice
None
Microservice API Call Should we? Auth Service authenticate
Microservice API Call Better! LOAD BALANCER Auth Service authenticate API
Gateway
Main app Get/…. + JWT Token { “data”: …. }
Auth Service Microservice LOAD BALANCER
None
None
None
https://github.com/Thinkei/eh-kong/blob/master/auth/handler.lua#L49
None
Why not just use JWT
Size User ID in JWT User id in session token
• Require CPU to compute cryptographic signatures • No utilisation
of being stateless • Redundant-signing • Can be read on the client side • Must be explicitly encrypted if we wanted to • Hard revocation
That’s it. Thank you for your attention!