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
0
39
Json Web Token at Employment Hero
Luong Vo
September 11, 2018
Tweet
Share
More Decks by Luong Vo
See All by Luong Vo
Why our platform needs Redis Sentinel
luongvo
0
87
Performance Monitoring at Employment Hero
luongvo
0
140
Lalaland - A C2C ecommerce site - pitch deck
luongvo
0
400
Skeleton-based Human Action Recognition with Recurrent Neural Network
luongvo
0
230
Ruby Threads
luongvo
1
31
Caching in Ruby
luongvo
1
32
Monitoring system at Employment Hero
luongvo
0
46
Introduction to Docker and Docker Compose
luongvo
0
62
Database migration from Heroku to Amazon Web Services
luongvo
0
68
Other Decks in Programming
See All in Programming
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
120
VS Code Update for GitHub Copilot
74th
2
650
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
11k
NPOでのDevinの活用
codeforeveryone
0
840
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
190
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
12
4.5k
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.1k
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
10
5.3k
Goで作る、開発・CI環境
sin392
0
230
生成AI時代のコンポーネントライブラリの作り方
touyou
1
220
RailsGirls IZUMO スポンサーLT
16bitidol
0
190
Featured
See All Featured
Speed Design
sergeychernyshev
32
1k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
510
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
740
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
RailsConf 2023
tenderlove
30
1.1k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
A better future with KSS
kneath
238
17k
Designing for humans not robots
tammielis
253
25k
A designer walks into a library…
pauljervisheath
207
24k
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!