WebAuthnを実装する。
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-[[戻る>Web Authentication API]]
* 目次 [#e714d9cd]
#contents
*概要 [#ve68877a]
-[[WebAuthn>Web Authentication API]]を実装する前に理解を...
-specレベルは上位項を参照のこと。
*詳細 [#h2a3b42d]
以下に、各種、調査結果をサマリーする(まだまだ理解不足で...
**登録フロー [#xedb9d2b]
***(1) challengeの受信 [#l5e6e253]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#f89b4...
--request
--[[response>https://gist.github.com/daisukenishino2/f09f...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--[[request>https://www.slideshare.net/techblogyahoo/fido...
--[[response>https://www.slideshare.net/techblogyahoo/fid...
***(2) navigator.credentials.create() の param [#u04b283d]
-[[spec>Web Authentication API#k26de1bf]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|#|>|パラメタ|必須 / 任意|説明|フォーマット|h
|1|>|rp|必須|Relying partyに関する情報|[[JSON]] Object (...
|1-1|・|id|~|FQDN名|String|
|1-2|・|name|~|任意のRPサイト名|String|
|2|>|user|必須|Credentialが紐づくユーザー情報|[[JSON]] Ob...
|2-1|・|id|~|RP上のユーザID|ArrayBuffer|
|2-2|・|name|~|RP上のユーザID|String|
|2-3|・|displayName|~|RP上のユーザ表示名|String|
|3|>|challenge|必須|サーバーで生成した乱数|ArrayBuffer|
|4|>|pubKeyCredParams|必須|Credential情報|[[JSON]] Object...
|4-1|・|type|~|タイプ(public-key固定)|String|
|4-2|・|alg|~|アルゴリズムを表す数値|Int|
|5|>|timeout|任意|ユーザーの入力待機時間|Int|
|6|>|[[attestation>#y9d814dd]]|任意|Authenticator自体の検...
|7|>|[[authenticatorSelection>#y9d814dd]]|任意|認証器への...
|8|>|excludeCredentials|任意||[[JSON]] Object (PublicKeyC...
***(3) navigator.credentials.create() の return [#head8b53]
-[[spec>Web Authentication API#z3e54d7d]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|# |>|>|>|>|パラメタ|説明|フォーマット|h
|1 |>|>|>|>|id|割り当てられたid|rawIdの文字列表現|
|2 |>|>|>|>|rawId|idのArrayBuffer版|ArrayBuffer|
|3 |・|>|>|>|response|AuthenticatorAttestationRespo...
|3-1 ||・|>|>|attestationObject|公開鍵などを含む|[[CB...
|3-1-1 |||・|>|fmt|Attestation format|"fmt": "packed"|
|3-1-2 |||・|>|authData|Raw buffer struct containing us...
|3-1-2-1 ||||・|rpIdHash|||
|3-1-2-2 ||||・|flags|||
|3-1-2-3 ||||・|flagsBuf|||
|3-1-2-4 ||||・|counter|||
|3-1-2-5 ||||・|counterBuf|||
|3-1-2-6 ||||・|aaguid|||
|3-1-2-7 ||||・|credID|||
|3-1-2-8 ||||・|credIDLen|||
|3-1-2-9 ||||・|credIDLenBuf|||
|3-1-2-10||||・|COSEPublicKey|||
|3-1-3 |||・|>|attStmt|Attestation statement data|"attS...
|3-1-3-1 ||||・|sig|Signature|"sig": "..."|
|3-1-3-2 ||||・|x5c|X.509 Certificate Chain|"x5c": ["..."]|
|3-2 ||・|>|>|clientDataJSON|クライアント・データ|[[C...
|3-2-1 ||||・|challenge|Random number|"challenge": "..."|
|3-2-2 ||||・|origin|Origin of the website|"origin": "h...
|3-2-3 ||||・|type|Type of the call|"type": "webauthn.c...
|4 |>|>|>|>|type|pubKeyCredParams - typeと同じ|"typ...
***(4) challenge、origin、typeの検証 [#vb30e592]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
clientDataJSONの...
--[[challenge>https://www.slideshare.net/techblogyahoo/fi...
param.challenge = return.clientDataJSON.challenge みたい...
--[[origin>https://www.slideshare.net/techblogyahoo/fido-...
xxxx = return.clientDataJSON.origin みたいな話。
--[[type>https://www.slideshare.net/techblogyahoo/fido-12...
"webauthn.create" = return.clientDataJSON.type みたいな話。
***(5) flagsの検証 [#pe1d0784]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--UP : User Presence~
ユーザーの存在確認(必須)
--UV : User Verification~
ユーザーの認証(任意)
***(6) signatureの検証 [#j1fd7b8b]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
>[[authDataをattStmt.x5cで署名した値 = attStmt.sig みたい...
***(7) 公開鍵の保存 [#t769d565]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
>[[COSE]]から[[公開鍵を取り出して、>CWT#edb8c145]]保存す...
**認証フロー [#lc23111a]
***(1) challengeの受信 [#vbc77f66]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#ue95e...
--[[request>https://gist.github.com/daisukenishino2/f09fb...
--[[response>https://gist.github.com/daisukenishino2/f09f...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--[[request>https://www.slideshare.net/techblogyahoo/fido...
--[[response>https://www.slideshare.net/techblogyahoo/fid...
***(2) navigator.credentials.get() の param [#ja036073]
-[[spec>Web Authentication API#j169c489]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|#|パラメタ|必須 / 任意|説明|フォーマット|h
|1|challenge|必須|サーバーで生成した乱数|ArrayBuffer|
|2|timeout|任意|ユーザーの入力待機時間|Int|
|3|rpId|任意|rpIdの指定(登録時と同じ値を指定)|String|
|4|allowCredentials|任意|ユーザに紐づくCredentialのリスト...
|5|[[userVerification>#y9d814dd]]|任意|ユーザ検証に関する...
***(3) navigator.credentials.get() の return [#v312bbc2]
-[[spec>Web Authentication API#v1038525]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|# |>|>|パラメタ|説明|フォーマット|h
|1 |>|>|id|割り当てられたid|rawIdの文字列表現|
|2 |>|>|rawId|idのArrayBuffer版|ArrayBuffer|
|3 |>|>|response|assertion data|[[JSON]] Object (Authe...
|3-1 |・|>|authenticatorData|rpIdHash, flagsBuf, flags, ...
|3-2 |・|>|clientDataJSON|クライアント・データ|ArrayBuff...
|3-2-1||・|challenge|Random number|"challenge": "..."|
|3-2-2||・|origin|Origin of the website|"origin": "http(s...
|3-2-3||・|type|Type of the call|"type": "webauthn.create"|
|3-3 |・|>|signature|署名の値|ArrayBuffer|
|3-4 |・|>|userHandle|認証器が返す値|ArrayBuffer|
|4 |>|>|type|タイプ(public-key固定)|String|
|5 |>|>|getClientExtensionResults|extensions results s...
***(4) challenge、origin、typeの検証 [#c7de901d]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
clientDataJSONの...
--[[challenge>https://www.slideshare.net/techblogyahoo/fi...
param.challenge = return.clientDataJSON.challenge みたい...
--[[origin>https://www.slideshare.net/techblogyahoo/fido-...
xxxx = return.clientDataJSON.origin みたいな話。
--[[type>https://www.slideshare.net/techblogyahoo/fido-12...
"webauthn.create" = return.clientDataJSON.type みたいな話。
***(5) flagsの検証 [#pc3d8dee]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#xad01...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
authenticatorData.flags
--UP : User Presence~
ユーザーの存在確認(必須)
--UV : User Verification~
ユーザーの認証(任意)
***(6) signatureの検証 [#z00f8626]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#xad01...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--Authenticatorの検索
--PublicKeyの取得
--signatureを検証
--counterの検証と更新
*実装例 [#c959ed41]
**提案されたI/F [#c50d2962]
[[FIDO2]]サーバ標準は存在しないが、
-[[FIDO2]]適合テストツールで使用する提案されたREST APIのI...
-このI/Fは必須で無いが、Serverが標準の方法でMessageを送受...
適合テストツールによって使用され、機能が自動的に検証され...
-問題点
--登録フローには、認証が必要だと思うのだケド、~
認証実装したらテストツールも通らないんじゃないか?と。
--以下の[[サーバ実装パターン>#p32f0b0d]]毎、実際の実装は...
>「[[RP & BaaSが実装>#yd0d2c38]]」に書いたように、~
Resource Serverとして動作する~
BaaS上に実装する方式に適合しそう。
-参考
--Server Requirements and Transport Binding Profile~
https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido...
***Credential Creation Options [#rec1f227]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Authenticator Attestation [#b71f68ec]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Credential Get Options [#tce204b7]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Authenticator Assertion [#l620d540]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
**サーバ実装パターン [#p32f0b0d]
[[OIDCのSTS/IdP(OP)、Client(RP)>OpenID Connect]]のどちら...
[[WebAuthn>Web Authentication API]]のRelying Party(RP)に...
***IdP/Stsが実装 [#te3090c2]
-IdP/Stsに集約可能で楽。
-[[提案されたI/F>#c50d2962]]の実装
--登録フロー~
認証アクセスが必要だが、サイト内なのでWebAPIよりポストバ...
--認証フロー~
認証後に画面遷移が必要なのでWebAPIよりポストバックがイイ
***RP & BaaSが実装 [#yd0d2c38]
-折衷案
--RPが[[WebAuthn>Web Authentication API]]を操作し、
--バックエンドのIDaaS -> BaaSを使用して公開鍵を管理する。
-[[提案されたI/F>#c50d2962]]の実装
--登録フロー~
RPは、IdP/Stsと連携し、~
Resource Serverとして機能するBaaSに公開鍵を登録。
--認証フロー~
BaaSに登録した公開鍵を取得するために、~
[[Client認証のみのグラント種別>JWTとOAuth2.0#pebd83d3]]を...
***RPが実装 [#n65330d1]
-IdP/Sts
--のコントロールが効かない場合。
--を、そもそも、保有しない場合。
-[[提案されたI/F>#c50d2962]]の実装~
[[IdP/Stsが実装>#te3090c2]]の実装と同様。
**実現できるUX [#n55e981e]
***[[2FAのUserExperience]] [#z7587e1a]
***[[PasswordlessのUserExperience]] [#v5fe671c]
*参考 [#m98eeaca]
**[[fido2-net-lib]] [#k952458b]
**techblogyahoo [#ge4fa39c]
-FIDO認証によるパスワードレスログイン実装入門 > デモ~
https://www.slideshare.net/techblogyahoo/fido-124019677/29
***[[登録フロー>https://www.slideshare.net/techblogyahoo/...
-[[実装範囲>https://www.slideshare.net/techblogyahoo/fido...
-準備
--[[ユーザー名の入力>https://www.slideshare.net/techblogy...
--[[ユーザ名の送信>https://www.slideshare.net/techblogyah...
--[[challengeの受信>https://www.slideshare.net/techblogya...
-[[navigator.credentials.create()>https://www.slideshare....
--[[param>https://www.slideshare.net/techblogyahoo/fido-1...
--[[return>https://www.slideshare.net/techblogyahoo/fido-...
-[[検証>https://www.slideshare.net/techblogyahoo/fido-124...
--[[challenge、origin、typeの検証>https://www.slideshare....
---[[challengeの検証>https://www.slideshare.net/techblogy...
---[[originの検証>https://www.slideshare.net/techblogyaho...
---[[typeの検証>https://www.slideshare.net/techblogyahoo/...
--[[flagsの検証>https://www.slideshare.net/techblogyahoo/...
--[[signatureの検証>https://www.slideshare.net/techblogya...
---[[Attestation Certificateの取得>https://www.slideshare...
---[[signatureを検証>https://www.slideshare.net/techblogy...
-[[保存>https://www.slideshare.net/techblogyahoo/fido-124...
--[[公開鍵の保存 (1)>https://www.slideshare.net/techblogy...
--[[公開鍵の保存 (2)>https://www.slideshare.net/techblogy...
--[[公開鍵の保存 (3)>https://www.slideshare.net/techblogy...
***[[認証フロー>https://www.slideshare.net/techblogyahoo/...
-[[実装範囲>https://www.slideshare.net/techblogyahoo/fido...
-[[準備>https://www.slideshare.net/techblogyahoo/fido-124...
--[[ユーザー名の入力>https://www.slideshare.net/techblogy...
--[[ユーザ名の送信>https://www.slideshare.net/techblogyah...
--[[challengeの受信>https://www.slideshare.net/techblogya...
-[[navigator.credentials.get()>https://www.slideshare.net...
--[[param>https://www.slideshare.net/techblogyahoo/fido-1...
--[[return>https://www.slideshare.net/techblogyahoo/fido-...
-[[検証>https://www.slideshare.net/techblogyahoo/fido-124...
--[[challenge、origin、typeの検証>https://www.slideshare....
---[[challengeの検証>https://www.slideshare.net/techblogy...
---[[originの検証>https://www.slideshare.net/techblogyaho...
---[[typeの検証>https://www.slideshare.net/techblogyahoo/...
--[[flagsの検証>https://www.slideshare.net/techblogyahoo/...
--[[signatureの検証>https://www.slideshare.net/techblogya...
---[[Authenticatorの検索>https://www.slideshare.net/techb...
---[[PublicKeyの取得>https://www.slideshare.net/techblogy...
---[[signatureを検証>https://www.slideshare.net/techblogy...
---[[ counterの検証と更新>https://www.slideshare.net/tech...
**パラメタ [#y9d814dd]
***[[Web Authentication API]] [#j0811b10]
-[[navigator.credentials.create()メソッド>Web Authenticat...
-[[navigator.credentials.get()メソッド>Web Authentication...
***gist.github.com/daisukenishino2 [#r368d093]
https://gist.github.com/daisukenishino2/f09fb400fa2186aea...
***Ackermann Yuriy – Medium [#v0c30aea]
-Introduction to WebAuthn API~
https://medium.com/@herrjemand/introduction-to-webauthn-a...
***Mercari Engineering Blog [#d67e9b8b]
-WebAuthnことはじめ~
https://tech.mercari.com/entry/2019/06/04/120000
***enjoy struggling [#j9dcdad6]
-Webauthn における ResidentKey と UserVerification につい...
https://blog.haniyama.com/2018/10/19/webauthn-residentkey/
-WebAuthn の Attestation~
https://blog.haniyama.com/2018/11/19/webauthn-attestation/
***Qiita [#u32b017f]
-FIDOによるChromeとMacBook Proのtouch idを利用したパスワ...
https://qiita.com/ifsec_56/items/0cc5f1d73e7d2e3029ad
**ritou [#e6549dc4]
***r-weblife [#o24b3d4a]
-WebAuthn カテゴリーの記事一覧~
https://ritou.hatenablog.com/archive/category/WebAuthn
-OpenID Connect のあれが WebAuthn のこれになったらどうな...
https://ritou.hatenablog.com/entry/2018/09/28/032327
--OIDC OP == WebAuthn RP
--OIDC RP == WebAuthn RP
***Qiita [#sd089730]
-WebAuthn の利用/実装パターンを考える - Qiita~
https://qiita.com/ritou/items/e32239dd482e8dc765d6
----
Tags: [[:IT国際標準]], [[:認証基盤]]
終了行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-[[戻る>Web Authentication API]]
* 目次 [#e714d9cd]
#contents
*概要 [#ve68877a]
-[[WebAuthn>Web Authentication API]]を実装する前に理解を...
-specレベルは上位項を参照のこと。
*詳細 [#h2a3b42d]
以下に、各種、調査結果をサマリーする(まだまだ理解不足で...
**登録フロー [#xedb9d2b]
***(1) challengeの受信 [#l5e6e253]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#f89b4...
--request
--[[response>https://gist.github.com/daisukenishino2/f09f...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--[[request>https://www.slideshare.net/techblogyahoo/fido...
--[[response>https://www.slideshare.net/techblogyahoo/fid...
***(2) navigator.credentials.create() の param [#u04b283d]
-[[spec>Web Authentication API#k26de1bf]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|#|>|パラメタ|必須 / 任意|説明|フォーマット|h
|1|>|rp|必須|Relying partyに関する情報|[[JSON]] Object (...
|1-1|・|id|~|FQDN名|String|
|1-2|・|name|~|任意のRPサイト名|String|
|2|>|user|必須|Credentialが紐づくユーザー情報|[[JSON]] Ob...
|2-1|・|id|~|RP上のユーザID|ArrayBuffer|
|2-2|・|name|~|RP上のユーザID|String|
|2-3|・|displayName|~|RP上のユーザ表示名|String|
|3|>|challenge|必須|サーバーで生成した乱数|ArrayBuffer|
|4|>|pubKeyCredParams|必須|Credential情報|[[JSON]] Object...
|4-1|・|type|~|タイプ(public-key固定)|String|
|4-2|・|alg|~|アルゴリズムを表す数値|Int|
|5|>|timeout|任意|ユーザーの入力待機時間|Int|
|6|>|[[attestation>#y9d814dd]]|任意|Authenticator自体の検...
|7|>|[[authenticatorSelection>#y9d814dd]]|任意|認証器への...
|8|>|excludeCredentials|任意||[[JSON]] Object (PublicKeyC...
***(3) navigator.credentials.create() の return [#head8b53]
-[[spec>Web Authentication API#z3e54d7d]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|# |>|>|>|>|パラメタ|説明|フォーマット|h
|1 |>|>|>|>|id|割り当てられたid|rawIdの文字列表現|
|2 |>|>|>|>|rawId|idのArrayBuffer版|ArrayBuffer|
|3 |・|>|>|>|response|AuthenticatorAttestationRespo...
|3-1 ||・|>|>|attestationObject|公開鍵などを含む|[[CB...
|3-1-1 |||・|>|fmt|Attestation format|"fmt": "packed"|
|3-1-2 |||・|>|authData|Raw buffer struct containing us...
|3-1-2-1 ||||・|rpIdHash|||
|3-1-2-2 ||||・|flags|||
|3-1-2-3 ||||・|flagsBuf|||
|3-1-2-4 ||||・|counter|||
|3-1-2-5 ||||・|counterBuf|||
|3-1-2-6 ||||・|aaguid|||
|3-1-2-7 ||||・|credID|||
|3-1-2-8 ||||・|credIDLen|||
|3-1-2-9 ||||・|credIDLenBuf|||
|3-1-2-10||||・|COSEPublicKey|||
|3-1-3 |||・|>|attStmt|Attestation statement data|"attS...
|3-1-3-1 ||||・|sig|Signature|"sig": "..."|
|3-1-3-2 ||||・|x5c|X.509 Certificate Chain|"x5c": ["..."]|
|3-2 ||・|>|>|clientDataJSON|クライアント・データ|[[C...
|3-2-1 ||||・|challenge|Random number|"challenge": "..."|
|3-2-2 ||||・|origin|Origin of the website|"origin": "h...
|3-2-3 ||||・|type|Type of the call|"type": "webauthn.c...
|4 |>|>|>|>|type|pubKeyCredParams - typeと同じ|"typ...
***(4) challenge、origin、typeの検証 [#vb30e592]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
clientDataJSONの...
--[[challenge>https://www.slideshare.net/techblogyahoo/fi...
param.challenge = return.clientDataJSON.challenge みたい...
--[[origin>https://www.slideshare.net/techblogyahoo/fido-...
xxxx = return.clientDataJSON.origin みたいな話。
--[[type>https://www.slideshare.net/techblogyahoo/fido-12...
"webauthn.create" = return.clientDataJSON.type みたいな話。
***(5) flagsの検証 [#pe1d0784]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--UP : User Presence~
ユーザーの存在確認(必須)
--UV : User Verification~
ユーザーの認証(任意)
***(6) signatureの検証 [#j1fd7b8b]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
>[[authDataをattStmt.x5cで署名した値 = attStmt.sig みたい...
***(7) 公開鍵の保存 [#t769d565]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#m0f94...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
>[[COSE]]から[[公開鍵を取り出して、>CWT#edb8c145]]保存す...
**認証フロー [#lc23111a]
***(1) challengeの受信 [#vbc77f66]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#ue95e...
--[[request>https://gist.github.com/daisukenishino2/f09fb...
--[[response>https://gist.github.com/daisukenishino2/f09f...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--[[request>https://www.slideshare.net/techblogyahoo/fido...
--[[response>https://www.slideshare.net/techblogyahoo/fid...
***(2) navigator.credentials.get() の param [#ja036073]
-[[spec>Web Authentication API#j169c489]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|#|パラメタ|必須 / 任意|説明|フォーマット|h
|1|challenge|必須|サーバーで生成した乱数|ArrayBuffer|
|2|timeout|任意|ユーザーの入力待機時間|Int|
|3|rpId|任意|rpIdの指定(登録時と同じ値を指定)|String|
|4|allowCredentials|任意|ユーザに紐づくCredentialのリスト...
|5|[[userVerification>#y9d814dd]]|任意|ユーザ検証に関する...
***(3) navigator.credentials.get() の return [#v312bbc2]
-[[spec>Web Authentication API#v1038525]]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
|# |>|>|パラメタ|説明|フォーマット|h
|1 |>|>|id|割り当てられたid|rawIdの文字列表現|
|2 |>|>|rawId|idのArrayBuffer版|ArrayBuffer|
|3 |>|>|response|assertion data|[[JSON]] Object (Authe...
|3-1 |・|>|authenticatorData|rpIdHash, flagsBuf, flags, ...
|3-2 |・|>|clientDataJSON|クライアント・データ|ArrayBuff...
|3-2-1||・|challenge|Random number|"challenge": "..."|
|3-2-2||・|origin|Origin of the website|"origin": "http(s...
|3-2-3||・|type|Type of the call|"type": "webauthn.create"|
|3-3 |・|>|signature|署名の値|ArrayBuffer|
|3-4 |・|>|userHandle|認証器が返す値|ArrayBuffer|
|4 |>|>|type|タイプ(public-key固定)|String|
|5 |>|>|getClientExtensionResults|extensions results s...
***(4) challenge、origin、typeの検証 [#c7de901d]
-[[fido2-net-lib>https://gist.github.com/daisukenishino2/...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
clientDataJSONの...
--[[challenge>https://www.slideshare.net/techblogyahoo/fi...
param.challenge = return.clientDataJSON.challenge みたい...
--[[origin>https://www.slideshare.net/techblogyahoo/fido-...
xxxx = return.clientDataJSON.origin みたいな話。
--[[type>https://www.slideshare.net/techblogyahoo/fido-12...
"webauthn.create" = return.clientDataJSON.type みたいな話。
***(5) flagsの検証 [#pc3d8dee]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#xad01...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
authenticatorData.flags
--UP : User Presence~
ユーザーの存在確認(必須)
--UV : User Verification~
ユーザーの認証(任意)
***(6) signatureの検証 [#z00f8626]
-fido2-net-lib ... [[サーバー側で処理>fido2-net-lib#xad01...
-[[techblogyahoo>https://www.slideshare.net/techblogyahoo...
--Authenticatorの検索
--PublicKeyの取得
--signatureを検証
--counterの検証と更新
*実装例 [#c959ed41]
**提案されたI/F [#c50d2962]
[[FIDO2]]サーバ標準は存在しないが、
-[[FIDO2]]適合テストツールで使用する提案されたREST APIのI...
-このI/Fは必須で無いが、Serverが標準の方法でMessageを送受...
適合テストツールによって使用され、機能が自動的に検証され...
-問題点
--登録フローには、認証が必要だと思うのだケド、~
認証実装したらテストツールも通らないんじゃないか?と。
--以下の[[サーバ実装パターン>#p32f0b0d]]毎、実際の実装は...
>「[[RP & BaaSが実装>#yd0d2c38]]」に書いたように、~
Resource Serverとして動作する~
BaaS上に実装する方式に適合しそう。
-参考
--Server Requirements and Transport Binding Profile~
https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido...
***Credential Creation Options [#rec1f227]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Authenticator Attestation [#b71f68ec]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Credential Get Options [#tce204b7]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
***Authenticator Assertion [#l620d540]
-https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fid...
-https://gist.github.com/daisukenishino2/f09fb400fa2186ae...
**サーバ実装パターン [#p32f0b0d]
[[OIDCのSTS/IdP(OP)、Client(RP)>OpenID Connect]]のどちら...
[[WebAuthn>Web Authentication API]]のRelying Party(RP)に...
***IdP/Stsが実装 [#te3090c2]
-IdP/Stsに集約可能で楽。
-[[提案されたI/F>#c50d2962]]の実装
--登録フロー~
認証アクセスが必要だが、サイト内なのでWebAPIよりポストバ...
--認証フロー~
認証後に画面遷移が必要なのでWebAPIよりポストバックがイイ
***RP & BaaSが実装 [#yd0d2c38]
-折衷案
--RPが[[WebAuthn>Web Authentication API]]を操作し、
--バックエンドのIDaaS -> BaaSを使用して公開鍵を管理する。
-[[提案されたI/F>#c50d2962]]の実装
--登録フロー~
RPは、IdP/Stsと連携し、~
Resource Serverとして機能するBaaSに公開鍵を登録。
--認証フロー~
BaaSに登録した公開鍵を取得するために、~
[[Client認証のみのグラント種別>JWTとOAuth2.0#pebd83d3]]を...
***RPが実装 [#n65330d1]
-IdP/Sts
--のコントロールが効かない場合。
--を、そもそも、保有しない場合。
-[[提案されたI/F>#c50d2962]]の実装~
[[IdP/Stsが実装>#te3090c2]]の実装と同様。
**実現できるUX [#n55e981e]
***[[2FAのUserExperience]] [#z7587e1a]
***[[PasswordlessのUserExperience]] [#v5fe671c]
*参考 [#m98eeaca]
**[[fido2-net-lib]] [#k952458b]
**techblogyahoo [#ge4fa39c]
-FIDO認証によるパスワードレスログイン実装入門 > デモ~
https://www.slideshare.net/techblogyahoo/fido-124019677/29
***[[登録フロー>https://www.slideshare.net/techblogyahoo/...
-[[実装範囲>https://www.slideshare.net/techblogyahoo/fido...
-準備
--[[ユーザー名の入力>https://www.slideshare.net/techblogy...
--[[ユーザ名の送信>https://www.slideshare.net/techblogyah...
--[[challengeの受信>https://www.slideshare.net/techblogya...
-[[navigator.credentials.create()>https://www.slideshare....
--[[param>https://www.slideshare.net/techblogyahoo/fido-1...
--[[return>https://www.slideshare.net/techblogyahoo/fido-...
-[[検証>https://www.slideshare.net/techblogyahoo/fido-124...
--[[challenge、origin、typeの検証>https://www.slideshare....
---[[challengeの検証>https://www.slideshare.net/techblogy...
---[[originの検証>https://www.slideshare.net/techblogyaho...
---[[typeの検証>https://www.slideshare.net/techblogyahoo/...
--[[flagsの検証>https://www.slideshare.net/techblogyahoo/...
--[[signatureの検証>https://www.slideshare.net/techblogya...
---[[Attestation Certificateの取得>https://www.slideshare...
---[[signatureを検証>https://www.slideshare.net/techblogy...
-[[保存>https://www.slideshare.net/techblogyahoo/fido-124...
--[[公開鍵の保存 (1)>https://www.slideshare.net/techblogy...
--[[公開鍵の保存 (2)>https://www.slideshare.net/techblogy...
--[[公開鍵の保存 (3)>https://www.slideshare.net/techblogy...
***[[認証フロー>https://www.slideshare.net/techblogyahoo/...
-[[実装範囲>https://www.slideshare.net/techblogyahoo/fido...
-[[準備>https://www.slideshare.net/techblogyahoo/fido-124...
--[[ユーザー名の入力>https://www.slideshare.net/techblogy...
--[[ユーザ名の送信>https://www.slideshare.net/techblogyah...
--[[challengeの受信>https://www.slideshare.net/techblogya...
-[[navigator.credentials.get()>https://www.slideshare.net...
--[[param>https://www.slideshare.net/techblogyahoo/fido-1...
--[[return>https://www.slideshare.net/techblogyahoo/fido-...
-[[検証>https://www.slideshare.net/techblogyahoo/fido-124...
--[[challenge、origin、typeの検証>https://www.slideshare....
---[[challengeの検証>https://www.slideshare.net/techblogy...
---[[originの検証>https://www.slideshare.net/techblogyaho...
---[[typeの検証>https://www.slideshare.net/techblogyahoo/...
--[[flagsの検証>https://www.slideshare.net/techblogyahoo/...
--[[signatureの検証>https://www.slideshare.net/techblogya...
---[[Authenticatorの検索>https://www.slideshare.net/techb...
---[[PublicKeyの取得>https://www.slideshare.net/techblogy...
---[[signatureを検証>https://www.slideshare.net/techblogy...
---[[ counterの検証と更新>https://www.slideshare.net/tech...
**パラメタ [#y9d814dd]
***[[Web Authentication API]] [#j0811b10]
-[[navigator.credentials.create()メソッド>Web Authenticat...
-[[navigator.credentials.get()メソッド>Web Authentication...
***gist.github.com/daisukenishino2 [#r368d093]
https://gist.github.com/daisukenishino2/f09fb400fa2186aea...
***Ackermann Yuriy – Medium [#v0c30aea]
-Introduction to WebAuthn API~
https://medium.com/@herrjemand/introduction-to-webauthn-a...
***Mercari Engineering Blog [#d67e9b8b]
-WebAuthnことはじめ~
https://tech.mercari.com/entry/2019/06/04/120000
***enjoy struggling [#j9dcdad6]
-Webauthn における ResidentKey と UserVerification につい...
https://blog.haniyama.com/2018/10/19/webauthn-residentkey/
-WebAuthn の Attestation~
https://blog.haniyama.com/2018/11/19/webauthn-attestation/
***Qiita [#u32b017f]
-FIDOによるChromeとMacBook Proのtouch idを利用したパスワ...
https://qiita.com/ifsec_56/items/0cc5f1d73e7d2e3029ad
**ritou [#e6549dc4]
***r-weblife [#o24b3d4a]
-WebAuthn カテゴリーの記事一覧~
https://ritou.hatenablog.com/archive/category/WebAuthn
-OpenID Connect のあれが WebAuthn のこれになったらどうな...
https://ritou.hatenablog.com/entry/2018/09/28/032327
--OIDC OP == WebAuthn RP
--OIDC RP == WebAuthn RP
***Qiita [#sd089730]
-WebAuthn の利用/実装パターンを考える - Qiita~
https://qiita.com/ritou/items/e32239dd482e8dc765d6
----
Tags: [[:IT国際標準]], [[:認証基盤]]
ページ名: