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
43
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
98
Performance Monitoring at Employment Hero
luongvo
0
150
Lalaland - A C2C ecommerce site - pitch deck
luongvo
0
440
Skeleton-based Human Action Recognition with Recurrent Neural Network
luongvo
0
250
Ruby Threads
luongvo
1
34
Caching in Ruby
luongvo
1
37
Monitoring system at Employment Hero
luongvo
0
53
Introduction to Docker and Docker Compose
luongvo
0
67
Database migration from Heroku to Amazon Web Services
luongvo
0
75
Other Decks in Programming
See All in Programming
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
120
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
190
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
180
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
590
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.3k
「速くなった気がする」をデータで疑う
senleaf24
0
130
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.3k
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
Java 21/25 Virtual Threads 소개
debop
0
320
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
140
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
2.9M
Context Engineering - Making Every Token Count
addyosmani
9
790
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
780
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
The Language of Interfaces
destraynor
162
26k
So, you think you're a good person
axbom
PRO
2
2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Rails Girls Zürich Keynote
gr2m
96
14k
How to build a perfect <img>
jonoalderson
1
5.3k
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!