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
次世代認証プラットフォーム “Auth0” を使ってみた / Next Geneartion...
Search
Takahiro Tsuchiya
September 27, 2018
Technology
18
7.8k
次世代認証プラットフォーム “Auth0” を使ってみた / Next Geneartion Identity "Auth0"
* 外部認証基盤の話
* Auth0 / Amazon Cognito / Firebase Authentication / Netlify Identity の比較
* Auth0 を選んだ理由
Takahiro Tsuchiya
September 27, 2018
Tweet
Share
More Decks by Takahiro Tsuchiya
See All by Takahiro Tsuchiya
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
7
4.7k
現場のエンジニアから見た採用担当との協働
corocn
7
2.9k
シリーズAをリファラル採用中心に走り抜ける / leaner-referral-engineer-2024
corocn
3
1.9k
捨てて加速するプロダクト開発 / sutete-speedup-product-development
corocn
3
640
リファラル採用にフルベットしてみた
corocn
3
3.6k
エンジニアとプロダクトマネージャーを兼任した1年間を振り返る / pdm-furikaeri
corocn
17
7.7k
育休のすゝめ #devsumi 2023
corocn
3
4.7k
GCPでRubyを動かしている話 / ruby on gcp
corocn
0
900
フルリモートワーカーのデスク選定 / how-to-select-remote-work-desk
corocn
1
590
Other Decks in Technology
See All in Technology
新しいスケーリング則と学習理論
taiji_suzuki
10
3.8k
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
150
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
320
[IBM TechXchange Dojo]Watson Discoveryとwatsonx.aiでRAGを実現!座学①
siyuanzh09
0
110
The future we create with our own MVV
matsukurou
0
1.9k
GeometryReaderやスクロールを用いた表現と紐解き方
fumiyasac0921
0
100
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
240
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
150
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
AWS re:Invent 2024 recap in 20min / JAWSUG 千葉 2025.1.14
shimy
1
100
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
130
Godot Engineについて調べてみた
unsoluble_sugar
0
360
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
41
7.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The Language of Interfaces
destraynor
155
24k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
170
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
4 Signs Your Business is Dying
shpigford
182
22k
Become a Pro
speakerdeck
PRO
26
5.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Transcript
࣍ੈೝূϓϥοτϑΥʔϜ “Auth0” ΛͬͯΈͨ ςΫʮ࠷ۙͷWebٕज़ʹ͍ͭͯϫΠϫΠޠΔձʯ 2018/09/27ʢʣ Takahiro Tsuchiya / @corocn
Agenda • ࣗݾհ • ֎෦ೝূج൫ͷ • αʔϏεͷൺֱ • ೝূج൫αʔϏε “Auth0”
ͷհ
ࣗݾհ • @corocn / Takahiro Tsuchiya / و༟ • Misoca
Inc. • Auth0 Ambassador
ຊΛॻ͖·ͨ͠ ٕज़ॻయ4Ͱ൦ AmazonͰൢചத ·ͨվగ͍ͨ͠ʂ
ࠓͷ͓
ΣϒΞϓϦέʔγϣϯͱ ֎෦ೝূج൫ͷ
WebαʔϏεΛ࡞ΔͳΒೝূ ͷΈඞਢʹͳΔ
ͰຊʹϢʔβʔʹఏڙ͠ ͍ͨͷೝূ͡Όͳ͍
ͬͱαʔϏεͷຊ࣭తͳͱ ͜Ζʹ࣌ؒΛ͍͍ͨ
Ͱೝূͬͯ͘͠ͳ͍ʁ શવΘ͔Γ·ͤΜ ਓྨʹೝূ͍͠
Ͳ͏ͬͯػೳ࣮͢Δʁ
ࣗͰҰ͔Β࣮͢Δ • Βͳ͍΄͏͕͍͍ • ηΩϡϦςΟϗʔϧΛ࡞Δࣗ৴͕͋Δ • ंྠͷ࠶ൃ໌ • ηΩϡϦςΟͷ࣮ϊϋ֎ʹग़ͯ͜ͳ ͍ͷͰ͍͠
Frameworkඪ४ͷϥΠϒϥϦΛ͏ • ͋ΔఔϨʔϧʹΕΔ • ࠷ݶͷػೳ͔͠ͳ͍ • ڽͬͨॲཧͰ్ʹഁ͕ͪ͠ • RailsͷDevise? Sorcery?
ΈΜͳਏ͍ਏ͍ͱ ݴ͍ͬͯͬͯΔΑ͏ͳɾɾɾ
https://qiita.com/cigalecigales/items/73d7bd7ec59a001ccd74
৽͍༷͠ʹैͰ͖·͔͢ʁ • ύεϫʔυೝূ • SSO, Social Login, ύεϫʔυϨε • MFAʢଟཁૉೝূʣ
• FIDO 1.0 ʢU2F, UAFʣ • FIDO 2.0ʢU2F + UAFʣ, WebAuthn API ͙ͦ͢͜·Ͱ ഭ͍ͬͯΔ
ͦ͏ͩ ֎෦ͷೝূج൫ ͓͏
ҙ͍ͨ͜͠ͱ
• ֎෦αʔϏεΛ͑ηΩϡϦςΟϦεΫ͕ ফ͑ΔΘ͚Ͱͳ͍ • ࿈ܞ෦։ൃऀͰ࣮͢Δ • ͪΌΜͱཧղ͔ͯ͠ΒΘͳ͍ͱવࣄނ • ͰͪΌΜͱ͑େ෯ʹ࣮࣌ؒอकί ετΛݮͰ͖Δ
͍Ζ͍Ζࢼͨ͠
ࢼͯ͠ΈͨೝূαʔϏε • Amazon Cognito • Firebase Authentication • Netlify Identity
• Auth0 ← ࠷ऴతʹ͜Εʹམͪண͘
Amazon Cognito • AWSͷਂ͍͕ࣝཁٻ͞ΕΔ • UserPool, ID PoolͳͲ֓೦͕͍͠ • ֶशίετ͕ߴ͍
• αʔϏε͕AWSͬͨΓͳΒݕ౼͍͍ͯ͠ ͚Ͳɺݕ౼͢Δͷʹ͕͔͔࣌ؒΓͦ͏
Firebase Authentication • ແྉʢҰ෦ΦϖϨʔγϣϯʹ੍ݶ༗Γʣ • γϯϓϧɻμογϡϘʔυ͔ͳΓ؆ૉɻ • αʔϏεܧଓੑͳ͠ • GCPଞFirebaseαʔϏεΛ͏લఏͳΒ˕
• ࡉ੍͔͍͕ॻ͚ͳ͍ͷ͕ਏ͍ • υΩϡϝϯτಡΈͮΒ͍
Netlify Identity • ָ࣮ͩͬͨ • ػೳ͕Γͯͳͯ͘ɺϩʔΧϧͰͷσόοά ͕ࠔͩͬͨͷͰΪϒΞοϓ • ݱࡏվળ͍ͯ͠Δ͔͠Εͳ͍
Auth0 • ֶशίετͷ͞ɺ֦ுੑͷߴ͕͞࠷ߴ • ࠷ऴతʹ͜Εʹམͪண͘
None
Auth0ͬͯʁ • Ϋϥυೝূϕϯμʔ • IDaaSʢIdentity as a Serviceʣ • ຊࣾ
Bellevue, Washington • ϑϧϦϞʔτϫʔΫΛ࠾༻ • Company OffsiteʢΧϯΫϯͱ͔ύφϚͱ͔ʣ
IDaaS • اۀID͕ࢥ͍ු͔Ϳ͔ʢOkta, OneLoginͱ͔ʣ • Auth0ͷ߹C͚Ͱ͍͍͢ҹ •
ͱΓ͋͑ͣ৮ͬͯࢼͤΔ • جຊແྉͰ͑Δʢ22ؒEnterprise൛͕ࢼͤΔʣ • 7000Ϣʔβʔɺແ੍ݶϩάΠϯ • ύεϫʔυϨεରԠ • ΈࠐΈϑΥʔϜʢLockʣ← ͋ͱͰ
• ιʔγϟϧϩάΠϯʢ2ݸ·Ͱʣ • ແ੍ݶͷϧʔϧఆٛ ← ͋ͱͰ
๛ͳνϡʔτϦΞϧ
https://auth0.com/docs
Mobile
SPA
Web App 1
Web App 2
Backend API
• νϡʔτϦΞϧ͕Ұ௨Γἧ͍ͬͯΔ • JWT Handbook ೝূܥͷϒϩά • ͘ຊޠ൛Ͱͳ͍͔ͳʙʁʢνϥο • jwt.io
powered by Auth0 • ϒϥβͰ͑ΔJWTͷσόοάπʔϧ
None
Lock
None
Lock • Auth0͕ఏڙ͢ΔࠐΈϩάΠϯϑΥʔϜ • ֤छϓϥοτϑΥʔϜରԠ • ଟݴޠରԠ • ෦Ͱ Auth0
SDKʢauth0.jsͳͲʣΛ͍ͬͯΔ • ࡉ੍͔͍ޚ͕ඞཁͳ߹ͪ͜ΒΛ • νϡʔτϦΞϧ auth0.jsΛ࣮ͬͨ
• Social LoginͳͲɺઃఆLockʹଈ࣌ө • Auth0͕อ༗͢ΔdevΩʔ͕ॳظͰઃఆ͞Εͯ ͍ΔͷͰɺͱΓ͋͑ͣࢼͤΔʢخ͍͠ʣ • ਖ਼ࣜʹ͏߹औಘͯ͠ઃఆ͢Δ͜ͱ
Webtask
Webtask • AWS LambdaϥΠΫͳαʔόϨεڥΛࣗલ Ͱอ༗͍ͯ͠Δ • JavaScriptɺC#Ͱهड़Մ • Node v8ͳͷͰasync
await • WebtaskʹΑͬͯߴ͍֦ுੑΛ࣮ݱ͍ͯ͠Δ
Rule
Rule • ೝূػೳͷ֦ுRuleͰઃఆ • ྫ1ʣυϝΠϯΛ੍ݶ͍ͨ͠ • ྫ2ʣ໊دͤΛ࣮ݱ͍ͨ͠ • ࣮ߦج൫Webtask •
ϢʔεέʔεผʹେྔͷςϯϓϨʔτ͕ఏڙ͞Ε ͍ͯΔͷͰɺগ͠मਖ਼͢Δ͚ͩͰ͍͍ͩͨಈ͘
Rule: Template
Rule: Whitelist
ͦͷଞ • ϢʔβʔμογϡϘʔυ͕ඪ४උ • Auth0 GuardianʢMFAʣ • FIDO2ͷରԠʁ → AddonͰՄೳ
·ͱΊ • αʔϏε։ൃαʔϏεͷຊ࣭ʹྗ͖͢ • ࣮ίετݮͷͨΊʹɺ֎෦ͷೝূج൫Λ ͏ͷ͋Γ • Auth0ଟػೳͰ֦ுੑ͕ߴ͍ͷͰɺબࢶͱ ͯ͠༗ •
ϦεΫΛͪΌΜͱཧղ͔ͯ͠Β͏͠
͋Γ͕ͱ͏͍͟͝·ͨ͠