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
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
150
Lalaland - A C2C ecommerce site - pitch deck
luongvo
0
450
Skeleton-based Human Action Recognition with Recurrent Neural Network
luongvo
0
250
Ruby Threads
luongvo
1
38
Caching in Ruby
luongvo
1
38
Monitoring system at Employment Hero
luongvo
0
56
Introduction to Docker and Docker Compose
luongvo
0
69
Database migration from Heroku to Amazon Web Services
luongvo
0
81
Other Decks in Programming
See All in Programming
AIとRubyの静的型付け
ukin0k0
0
490
CSC307 Lecture 17
javiergs
PRO
0
310
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
0
290
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
210
3Dシーンの圧縮
fadis
1
560
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
520
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
320
LLM Plugin for Node-REDの利用方法と開発について
404background
0
150
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
1k
OSもどきOS
arkw
0
370
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
52k
Utilizing Notion as your number one productivity tool
mfonobong
4
310
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
The Curious Case for Waylosing
cassininazir
1
370
Unsuck your backbone
ammeep
672
58k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
150
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
160
We Are The Robots
honzajavorek
0
240
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
580
For a Future-Friendly Web
brad_frost
183
10k
Being A Developer After 40
akosma
91
590k
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!