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
C向けサービスで 使われている認証方式と安全な使い方
Search
ritou
September 21, 2022
Technology
12
2.9k
C向けサービスで 使われている認証方式と安全な使い方
どこかでこっそりやった勉強会の資料を公開します。
ritou
September 21, 2022
Tweet
Share
More Decks by ritou
See All by ritou
そのQRコード、安全ですか? / Cross Device Flow
ritou
3
260
MIXI Mと社内外のサービスを支える認証基盤を作るためにやってきたこと #MTDC2024
ritou
2
350
Passkeys and Identity Federation @ OpenID Summit Tokyo 2024
ritou
2
600
Webアプリ開発者向け パスキー対応の始め方
ritou
4
5.6k
様々なユースケースに利用できる "パスキー" の 導入事例の紹介とUXの課題解説 @ DroidKaigi 2023
ritou
3
4.3k
パスキーはユーザー認証を どう変えるのか?その特徴と導入における課題 @ devsumi 2023 9-C-1
ritou
6
12k
Android/Chromeで体験できる 認証のための標準化仕様の 現在と未来 @ DroidKaigi 2022
ritou
2
6.4k
現状のFedCMの動作解説と OIDCとの親和性について- OpenID TechNight vol.19
ritou
2
1k
GNAP超入門 ~ IW2021 C15
ritou
2
5.1k
Other Decks in Technology
See All in Technology
Building Static Websites with Sculpin
opdavies
0
1.5k
四国クラウドお遍路 2024 in 高知 オープニング
yukataoka
0
160
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
2
170
LLM を現場で評価する
asei
4
700
手軽に始める? おうちサーバーのすゝめ
nyagasan
0
190
ロボットアームを遠隔制御の話 & LLMをつかったIoTの話もしたい
soracom
PRO
1
220
Monitor GraalVM Native Apps with OpenTelemetry
logico_jp
0
100
[RSJ24] Object Retrieval in Large-Scale Indoor Environments Using Dense Text with a Multi-Modal Large Language Model
keio_smilab
PRO
0
230
Dojo 20240830 COBOL to Java on Z
ichikawayasuhisa
0
240
RAGHack: Building RAG apps in Python
pamelafox
0
140
Dify - LINE Bot連携 考え方と実用テクニック
uezo
5
1.1k
標準ライブラリの奥深アップデートを掘り下げよう!
logica0419
2
430
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
135
6.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
What's new in Ruby 2.0
geeforr
340
31k
The Pragmatic Product Professional
lauravandoore
30
6.2k
Building an army of robots
kneath
302
42k
Clear Off the Table
cherdarchuk
90
320k
Adopting Sorbet at Scale
ufuk
72
8.9k
Unsuck your backbone
ammeep
667
57k
Building Flexible Design Systems
yeseniaperezcruz
324
37k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
The Language of Interfaces
destraynor
153
23k
Transcript
C͚αʔϏεͰ ΘΕ͍ͯΔೝূํࣜͱ ҆શͳ͍ํ ritou @ Ͳ͔͜Ͱߦͳͬͨษڧձ
ൃදͷ༰ • C͚αʔϏεͰΘΕ͍ͯΔϢʔβʔೝূํࣜͷհ • ͦΕͧΕͷಛͱͳͥΘΕ࢝Ί͔ͨ • ੈͷத͕ΑΓ҆શͰศརʹͳΔͨΊʹϢʔβʔ։ൃऀ͕ҙ͖ࣝ͢ ͜ͱ  2
ೝূํࣜʹ͍ͭͯҰ൪ࢀߟʹͳΔࢿྉ NIST SP 800-63γϦʔζ • ೝূʹ·ͭΘΔηΩϡϦςΟͷ৽ৗࣝ rev3 • https://speakerdeck.com/kthrtty/ren-zheng-
nimatuwarusekiyuriteifalsexin-chang-shi • NIST Special Publication 800-63B Digital Identity Guidelines (༁൛) • https://openid-foundation-japan.github.io/800-63-3- fi nal/ sp800-63b.ja.html
C͚Ϣʔβʔೝূͷྺ࢙
ᶃ ύεϫʔυೝূ
ύεϫʔυೝূ (هԱγʔΫϨοτ, Memorized Secrets)  6 • ೝূཁૉ :
ࣝ • ϢʔβʔࣝผࢠͱύεϫʔυͷΈ߹ΘͤΛݕূ • ಛఆσόΠεෆཁͷࢸߴͷೝূํࣜ
ύεϫʔυೝূͰ ϢʔβʔɺαʔϏεʹٻΊΒΕΔཁ݅  7 • Ϣʔβʔ • ύεϫʔυΛΕͳ͍ • ਪଌՄೳͳύεϫʔυΛආ͚ɺଞͷαʔϏεͰ͍·Θ͞ͳ͍
• ύεϫʔυΛୈ̏ऀʹڭ͑ͳ͍ • αʔϏε • ύεϫʔυΛ҆શʹཧ͢Δ • ֤छ߈ܸ͔ΒϢʔβʔΛอޢ͢Δ
ύεϫʔυೝূʹ͓͚Δ ϢʔβʔɺαʔϏεͷݱঢ়  8 • Ϣʔβʔ • ઃఆͨ͠ύεϫʔυΛΕͯ͠·͏ • ෳαʔϏεͰ͍ճͨ͠ΓɺਪଌՄೳͳจࣈྻΛར༻͢Δ
• ϑΟογϯάαΠτʹύεϫʔυͳͲΛೖྗͯ͠͠·͏ • αʔϏε • ෮߸ՄೳͳܗࣜͰอଘ͠ɺ࠷ऴతʹ࿙Ӯͤͯ͞͠·͏ • ෆਖ਼ϩάΠϯରࡦʹίετΛ͔͚ΒΕͳ͍
ΞΧϯτϦΧόϦʔ • “ϩάΠϯͰ͖ͳ͍” ঢ়ଶ͔Βͷճ෮ • ಛఆͷೝূํ͕ࣜ͑ͳ͍࣌ʹ٧·ͳ͍Α͏ʹᷖճ࿏Λ༻ҙ • ผͷํ๏ͰϢʔβʔೝূ(≠ϩάΠϯηογϣϯൃߦ) + ઃఆมߋ
• ύεϫʔυೝূͱϝʔϧʹΑΔύεϫʔυϦηοτͷΈ߹Θ͕ͤҰൠత • ϝʔϧϦϯΫೝূίʔυΛૹ৴ + ύεϫʔυ࠶ઃఆ • ੈͷதʹύεϫʔυΛ֮͑ͣʹຖճϦηοτ͢ΔϢʔβʔଘࡏ͢Δ
ϝʔϧ/SMSʹΑΔOTP (ܦ࿏֎ೝূ, Out-of-Band Devices)  10 • ೝূཁૉ :
ॴ༗ • SMSϝʔϧͰड͚औͬͨೝূίʔυΛݕূ • ϦϯΫૹ৴&ΫϦοΫ͜ΕΛ؆ུԽͨ͠ͷͱଊ͑ΒΕΔ • “ύεϫʔυೝূͷΈ”ͱ͍͍࣮࣭ͭͭ2ͭͷೝূํࣜΛఏڙ͢Δ͜ ͱͰɺϦΧόϦʔػೳΛఏڙ͢Δͷ͕ఆੴͱͳ͍ͬͯͨ
ᶄ 2ஈ֊/ཁૉೝূͷීٴ
ύεϫʔυೝূʹ͓͚Δ ϢʔβʔɺαʔϏεͷݱঢ়  12 • Ϣʔβʔ • ઃఆͨ͠ύεϫʔυΛΕͯ͠·͏ • ෳαʔϏεͰ͍ճͨ͠ΓɺਪଌՄೳͳจࣈྻΛར༻͢Δ
• ϑΟογϯάαΠτʹύεϫʔυͳͲΛೖྗͯ͠͠·͏ • αʔϏε • ෮߸ՄೳͳܗࣜͰอଘ͠ɺ࠷ऴతʹ࿙Ӯͤͯ͞͠·͏ • ෆਖ਼ϩάΠϯରࡦʹίετΛ͔͚ΒΕͳ͍
ύεϫʔυϦετ߈ܸɺ ύεϫʔυεϓϨʔ߈ܸ  13 • ύεϫʔυϦετ߈ܸ • Ϣʔβʔࣝผࢠ/ύεϫʔυͷϦετͰࢼߦ • ಉ͡ύεϫʔυΛ͍ճ͍ͯͨ͠ΒΞτ
• ύεϫʔυεϓϨʔ߈ܸ • ϢʔβʔࣝผࢠͷϦετʹಉҰͷύεϫʔυͰࢼߦ • ਪଌՄೳͳύεϫʔυΛར༻͍ͯͨ͠ΒΞτ • ͍ΘΏΔϩοΫΧϯλʹ͔͔Βͳ͍Α͏ʹ͏·͍͜ͱ߈ܸͯ͘͠Δ
ιϑτΣΞTOTP (୯ҰཁૉOTPσόΠε, Single-Factor OTP Device)  14 • ೝূཁૉ
: ॴ༗ • ϞόΠϧΞϓϦͰੜͨ͠TOTP(RFC6238)Λݕূ • 2010Ҏ߱ɺGoogle͕2ஈ֊ೝূͱͯ͠Google Authenticatorͱͱ ʹTOTPೝূΛఏڙ։࢝ • ͦΕ·Ͱۚ༥ػؔͳͲͰRSA/VerisignͳͲͷϋʔυΣΞτʔΫ ϯ͕ΘΕ͍ͯͨ
ϞόΠϧΞϓϦͷpush௨ (ܦ࿏֎ೝূ, Out-of-Band Devices)  15 • ೝূཁૉ :
ॴ༗ • ϞόΠϧΞϓϦʹ௨ΛૹͬͯϢʔβʔ͕֬ೝͨ͠ΒOK • MS Authenticator, GitHub, Okta Verify… • ܦ࿏ͷ҆શੑ͕ΩϞʹͳΔͷͰɺϞόΠϧΞϓϦͷ௨ͷΈͷ ํ͕SMSEϝʔϧΑΓ҆શͱ·ͰݴΘΕΔ
όοΫΞοϓίʔυ (ϧοΫΞοϓγʔΫϨοτ, Look-Up Secrets)  16 • ೝূཁૉ :
ॴ༗ • Ϣʔβʔʹ୯Ұ͋Δ͍ෳͷจࣈྻΛൃߦ͓͖ͯ͠ɺͦͷΛݕূ • TOTP͕͑ͳ͍Α͏ͳέʔεͰ٧·ͳ͍ͨΊͷ࠷ޙͷखஈͱͯ͠͠ Εͬͱ࠾༻͞Ε͍ͯΔ
ᶅ ϑΟογϯάʹڧ͍ ೝূํࣜ
ύεϫʔυೝূʹ͓͚Δ ϢʔβʔɺαʔϏεͷݱঢ়  18 • Ϣʔβʔ • ઃఆͨ͠ύεϫʔυΛΕͯ͠·͏ • ෳαʔϏεͰ͍ճͨ͠ΓɺਪଌՄೳͳจࣈྻΛར༻͢Δ
• ϑΟογϯάαΠτʹύεϫʔυͳͲΛೖྗͯ͠͠·͏ • αʔϏε • ෮߸ՄೳͳܗࣜͰอଘ͠ɺ࠷ऴతʹ࿙Ӯͤͯ͞͠·͏ • ෆਖ਼ϩάΠϯରࡦʹίετΛ͔͚ΒΕͳ͍
ݱ࣮  19 • ใηΩϡϦςΟ10େڴҖ 2022 ʹͯݸਓ͚1Ґʂ • B͚ͰMicrosoft ͕ଟཁૉೝূΛճආ͢ΔϑΟογϯά߈ܸ
ʮAdversary-in-the-MiddleʢAiTMʣʯʹ͍ͭͯൃද • 20219݄Ҏ߱ɺ1ສҎ্ͷ৫͕ඪతʹ
ʮTOTPઃఆΛͯͨ͠Β ҆શͰͳ͍ͷͰ͔͢ʁʯ
https://www.microsoft.com/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further- fi nancial-fraud/
https://www.microsoft.com/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further- fi nancial-fraud/ !"#$%&'()*+,-./012
https://www.microsoft.com/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further- fi nancial-fraud/ !"#$%&'()*+,-./012 34356!"#$%&'()*12 89:;<=:#$>?@*ABC
https://www.microsoft.com/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further- fi nancial-fraud/ !"#$%&'()*+,-./012 34356!"#$%&'()*12 89:;<=:#$>?@*ABC DEFGH I#$J%K#L.0MN
͜Ε·Ͱͷೝূํࣜ ϑΟογϯάੑΛ࣋ͨͳ͍  25 • ͍ͣΕਓ͕ؒߦ͏அͷ෦͕ऑͱͳΔ • ύεϫʔυೝূ, TOTP, ϝʔϧ/SMSܦ༝ͷOTP:
URLΛ֬ೝͤͣೖྗ • ެࣜΞϓϦͳͲͷPush௨&ಉҙ : URLΛ֬ೝͤͣʹಉҙ • ࣄલ֬ೝɺཤྺɺ௨ͱ͍ͬͨΈ͋Δ͕ࠜຊతͳରࡦͰͳ͍
(͓·͚)͋ΔϝʔϧΞυϨε/ి൪߸͕αʔϏεʹରͯ͠ ొࡁΈ͔Ͳ͏͔ΛΒΕ͍͚ͯͳ͍ཧ༝  26 • ొࡁΈͷͷ͚ͩΛͬͯύεϫʔυϦετ/εϓϨʔ߈ܸɺඪత ܕ߈ܸ + ϑΟογϯά
• ແବܸͪΛݮΒͤͯޮՌత • ϦετࣗମͷՁ্ • ෳαʔϏεͰར༻͍ͯ͠ΔϝʔϧΞυϨε/ి൪߸Ձ͕ߴ͍
FIDOೝূ w/ UserVeri fi cation (ଟཁૉ҉߸σόΠε, Multi-Factor Cryptographic Devices)
 27 • ೝূཁૉ : ॴ༗ + ࣝ/ੜମ • ެ։伴҉߸ + ϩʔΧϧೝূ • อޢ͞Εͨ҉߸伴Λ༻͍ΔϋʔυΣΞσόΠεΛॴ༗͠ɺΞΫςΟ ϕʔτͷͨΊʹ2ཁૉͷೝূΛඞཁͱ͢Δͷ • ηΩϡϦςΟΩʔ : PINʹΑΔೝূ • εϚʔτϑΥϯ : ϩʔΧϧೝূ(ը໘ϩοΫղআ૬)
https://www.microsoft.com/security/blog/2022/07/12/from-cookie-theft-to-bec-attackers-use-aitm-phishing-sites-as-entry-point-to-further- fi nancial-fraud/ OPQ4RSTUVWXYZ[\]^ _`abcdefg*hijk lm='()n !"#$%&'()] ocp*qk rrcstuqv
FIDOೝূͷ՝  29 • 伴ཧͷݎ࿚ੑΏ͑ͷϦΧόϦʔࠔ • Authenticator(ηΩϡϦςΟΩʔɺରԠ)͕յΕͨΓͳ͘ͳͬͨ Β࠶ొ͕ඞཁ • ෳͷAuthenticatorΛొ͓ͯ͘͠ඞཁੑ?
• ػछมߋ/ަͨ͠ΒαʔϏε୯Ґʹ࠶ొ͕ඞཁ • ରԠαʔϏε͕͜Ε·ͰͷύεϫʔυೝূͷΑ͏ʹ૿͑ͨΒ…?
Passkey  30 • ύεϫʔυ vs ύεΩʔ • σόΠεΑΓϢʔβʔʹඥ͚ͮΒΕΔ伴ใ •
͜Ε·ͰFIDOͰਐΊ͖ͯͨݎ࿚ͳ伴ཧͱผ࿏ઢ • ϓϥοτϑΥʔϚʔʹΑΔಉظʹΑΔϦΧόϦʔͷվળ • खݩͷεϚʔτϑΥϯΛར༻ͨ͠UXվળ
Passkey - ”FIDO multi-device credentials”  31 • ୯ҰϓϥοτϑΥʔϜͷྗΛ༻͍ͯύεΩʔΛಉظ 1.
Mac ͷ TouchIDΛ༻͍ͯPassKeyΛొ 2. ϩάΞτͯ͠ɺTouchIDͷΈͰϩάΠϯͰ͖Δ(͜Ε·Ͱ௨Γ) 3. iPhone͔ΒΞΫηεͨ͠ࡍʹʮอଘࡁΈͷPassKeyͰϩάΠϯʯΛ બ͢ΔͱFaceIDͳͲΛ༻͍ͯϩάΠϯͰ͖Δ • iCloud KeychainʹΑΔಉظ
Passkey - ”FIDO multi-device credentials”  32 • ෳϓϥοτϑΥʔϜΛލ͙߹ͷUXվળ 1.
ࣄલʹAndroidͰύεΩʔΛొ 2. Mac͔ΒΞΫηε͠ɺQRίʔυΛಡΈࠐΜͰAndroidͰϩάΠϯ Մೳ (caBLEͱݺΕΔଓํ๏) 3. ͦͷޙʹTouchID͕ཁٻ͞Εɺࠓޙ͜ͷͰTouchIDͷΈͰϩ άΠϯՄೳʹͳΔ
ᶆ ೝূํࣜΛ࣋ͨͳ͍ͱ͍͏બࢶ
ID࿈ܞ  34 • Identity Provider(IdP)ͷϢʔβʔใΛར༻͢Δ • දతͳϓϩτίϧ͕OpenID Connect, SAMLͳͲ
• Ϣʔβʔࣝผࢠͷඥ͚Λཧ͢Δ͜ͱͰϩάΠϯʹར༻͢Δ • ଐੑใΛ׆༻ͯ͠UXΛ্ͤ͞Δ • ֬ೝࡁΈϝʔϧΞυϨεɺి൪߸ɺຊਓ֬ೝใͳͲΛ৴༻͢Δ
ID࿈ܞͷ՝  35 • IdPͱ৺த • ΞΧϯτBAN, ো࣌ʹͦΕΛར༻͢ΔαʔϏε͑ͳ͘ͳ ΔՄೳੑ͕͋Δ •
IdPͷΞΧϯτ͕ͬऔΒΕͯ͠·ͬͨΒαʔϏεѱ༻͞ΕΔ
Identity Wallet (ؔ࿈Ωʔϫʔυ: SSI, DID, Veri fi able Credentials)
 36 • IdPʹґଘ͢ΔͷͰͳ͘ɺݸਓ͕ࣗͷใΛཧ͢ΔελΠϧ • Ծ௨՟͋ͨΓͰʹ͢Δׂ୲ • Issuer : Ϣʔβʔใͷఏڙɺূ໌ॻͷൃߦ • Holder(Wallet) : ϢʔβʔใΛཧ͢ΔΞϓϦϒϥβػೳ • Veri fi er : Holder ʹใΛཁٻ͠ɺऔಘͨ͠ใΛݕূͯ͠ར༻ • Open Wallet Foundation͕ઃཱ͞Ε͕ͯ࣌ਐΜͰ͍͘ؾ
҆શ&ศརʹར༻͢ΔͨΊʹ Ϣʔβʔ/αʔϏε͕Ͱ͖Δ͜ͱ
՝  38 • ೝূํࣜࣗମͷऑΈΛͲ͏ΧόʔͰ͖Δ͔ • ϑΟογϯάੑ : FIDOҎ֎ͷطଘͷೝূํࣜ •
རศੑ • εϚʔτϑΥϯҎ֎Λ͏ͷ͠ΜͲ͍ • εϚʔτϑΥϯͷѻ͍ • “εϚʔτϑΥϯ͚ͩͰͰ͖Δ”ʹدͤͭͭɺ”མͱͨ͠ΒऴΘΓ”ΛέΞ͢Δ ඞཁ͕͋Δ
(Ϣʔβʔ) ύεϫʔυϚωʔδϟʔͷར༻  39 • ύεϫʔυؚΊͨΫϨσϯγϟϧΛ”શ෦ॴ༗”͢Δײ֮ • ύεϫʔυ, TOTPͷγʔΫϨοτཧ&TOTPੜ, όοΫΞοϓ
ίʔυཧ • υϝΠϯఆΛͤΔ͜ͱͰϑΟογϯάੑΛ࣋ͭ • Ϛελʔύεϫʔυͷཧʹ໋Λ͙ελΠϧ
(αʔϏε) ʮεϚʔτϑΥϯ͕͋ΕʯελΠϧͷීٴ  40 • खݩͷεϚʔτϑΥϯΛར༻͢ΔUX • Cross-device WebOTP :
AndroidͰड͚औͬͨೝূίʔυΛPCͷ Chromeͷը໘ʹసૹՄೳ • ެࣜΞϓϦͷϓογϡ௨ • Passkey • εϚϗ͕ͳ͘ͳͬͨ߹ͷϦΧόϦʔʹ͔͔͍ͬͯΔελΠϧ
·ͱΊ  41 • ೝূํࣜཧ • ύεϫʔυೝূ -> 2ஈ֊ೝূ •
FIDO -> Passkey • ID࿈ܞ -> Identity Wallet? • ҆શͰศརͳ͍ํ
ऴΘΓ