WebAuthnで実現する安全・快適なログイン
JSConf JP 2019
えーじ @agektmr
passwords are challenging
weak, forgotten, reused, stolen
80% of attacks on businesses include phishing
Two Factor Authentication
OTP
Authenticator
SMS, Email
OTP はフィッシングで取られるので完璧じゃない
WebAuthn
ブラウザの新しい認証API
メジャーブラウザは全て対応
公開鍵暗号方式
ハードウェアで鍵を登録する
originに紐付けられるのでフィッシングサイトは防げる
Two-Factor Authentication
GitHubの例
2要素認証時にセキュリティキーをデバイスに挿し、ジェスチャーを行う
登録時にはキーに名前をつける
なくしても問題ないように
Googleの調査
SMSのTwo-Factor Authの場合76%防げる
セキュリティキーでの認証なら100%防げている
実装方法
window.PublicKeyCredential で有効か確認
登録 navigator.credentials.create
ログイン navigator.credentials.get
FIDOサーバーによって署名を検証する
Roaming Authenticator
持ち運び可能なAuthennticator
U2F or FIDO2
FIDO Alliance がプロトコル等を定義している
USB, BLE, NFC などが存在する
指紋認証がついているものはほぼない
Platform Authenticator
プラットフォームについているAuthenticator
生体認証で本人確認できる - Local User Verification (LUV)
生体認証の情報はデバイスの中に存在し、サーバーに上がることはない
Re-authentication
再認証
セッションが切れていた, 購入前フロー等で入る認証
これを Platform Authentication で可能
Yahooは既に使用可能
Chrome79では顔認証がWebAuthnで使えるようになる
Find more resources
goo.gle/FIDO
webauthn.guide by Duo Security
Reauth codelab goo.gle/WebAuthnReauthCodelab
FIDO server
fidoalliance.org/certification/fido-certified-products/
bit.ly/AwesomeWebAuthn