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
40
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
93
Performance Monitoring at Employment Hero
luongvo
0
140
Lalaland - A C2C ecommerce site - pitch deck
luongvo
0
410
Skeleton-based Human Action Recognition with Recurrent Neural Network
luongvo
0
240
Ruby Threads
luongvo
1
31
Caching in Ruby
luongvo
1
33
Monitoring system at Employment Hero
luongvo
0
49
Introduction to Docker and Docker Compose
luongvo
0
64
Database migration from Heroku to Amazon Web Services
luongvo
0
69
Other Decks in Programming
See All in Programming
CSC305 Lecture 06
javiergs
PRO
0
240
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
250
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
140
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
250
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.7k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
590
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
180
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.2k
理論と実務のギャップを超える
eycjur
0
140
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
170
Devvox Belgium - Agentic AI Patterns
kdubois
1
120
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Side Projects
sachag
455
43k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Documentation Writing (for coders)
carmenintech
75
5.1k
The World Runs on Bad Software
bkeepers
PRO
72
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Git: the NoSQL Database
bkeepers
PRO
431
66k
BBQ
matthewcrist
89
9.8k
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!