「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
目次 †
概要 †
- WebAuthn?を実装する前に理解を深める。
- specレベルは上位項を参照のこと。
詳細 †
以下に、各種、調査結果をサマリーする。
登録フロー †
(1) challengeの受信 †
(2) navigator.credentials.create() の param †
# | パラメタ | 必須 / 任意 | 説明 | フォーマット |
1 | rp | 必須 | Relying partyに関する情報 | JSON Object (下記メンバを持つ) |
1-1 | ・ | id | FQDN名 | String |
1-2 | ・ | name | 任意のRPサイト名 | String |
2 | user | 必須 | Credentialが紐づくユーザー情報 | JSON Object (下記メンバを持つ) |
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 | 任意 | Authenticatorの出どころを検証するかどうか | JSON Object (AttestationConveyancePreference?) |
7 | authenticatorSelection | 任意 | 認証器への要求事項 | JSON Object (AuthenticatorSelectionCriteria?) |
8 | excludeCredentials | 任意 | | JSON Object (PublicKeyCredentialDescriptor?) |
(3) navigator.credentials.create() の return †
# | パラメタ | 説明 | フォーマット |
1 | id | 割り当てられたid | rawIdの文字列表現 |
2 | rawId | idのArrayBuffer?版 | ArrayBuffer? |
3 | ・ | response | AuthenticatorAttestationResponse? | JSON Object (AuthenticatorAttestationResponse?) |
3-1 | | ・ | attestationObject | 公開鍵などを含む | CBOR形式 |
3-1-1 | | | ・ | fmt | Attestation format | "fmt": "packed" |
3-1-2 | | | ・ | authData | Raw buffer struct containing user info | "authData": "..." |
3-1-3 | | | ・ | attStmt | Attestation statement data | "attStmt": { |
3-1-3-1 | | | | ・ | sig | Signature | "sig": "..." |
3-1-3-2 | | | | ・ | x5c" | X.509 Certificate Chain | "x5c": ["..."] |
3-2 | | ・ | clientDataJSON | クライアント・データ | CBOR形式 |
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" |
4 | type | pubKeyCredParams? - typeと同じ | "type": "public-key" |
(4) challenge、origin、typeの検証 †
- techblogyahoo
- challenge
param.challenge = return.clientDataJSON.challenge みたいな話。
- origin
xxxx = return.clientDataJSON.origin みたいな話。
- type
"webauthn.create" = return.clientDataJSON.type みたいな話。
(5) flagsの検証 †
- techblogyahoo
- UP : User Presence
ユーザーの存在確認(必須)
- UV : User Verification
ユーザーの認証(任意)
(6) signatureの検証 †
(7) 公開鍵の保存 †
認証フロー †
(1) challengeの受信 †
(2) navigator.credentials.get() の param †
# | パラメタ | 必須 / 任意 | 説明 | フォーマット |
1 | challenge | 必須 | サーバーで生成した乱数 | ArrayBuffer? |
2 | timeout | 任意 | ユーザーの入力待機時間 | Int |
3 | rpId | 任意 | rpIdの指定(登録時と同じ値を指定) | String |
4 | allowCredentials | 任意 | ユーザに紐づくCredentialのリスト | Array (PublicKeyCredentialDescriptor?) |
5 | userVerification | 任意 | ユーザ検証に関する依拠当事者の要件を記述 | String (enum UserVerificationRequirement?) |
(3) navigator.credentials.get() の return †
# | パラメタ | 説明 | フォーマット |
1 | id | 割り当てられたid | rawIdの文字列表現 |
2 | rawId | idのArrayBuffer?版 | ArrayBuffer? |
3 | response | assertion data | JSON Object (AuthenticatorAssertionResponse?) |
3-1 | ・ | authenticatorData | | ArrayBuffer? |
3-2 | ・ | clientDataJSON | | ArrayBuffer? |
3-3 | ・ | signature | | ArrayBuffer? |
3-4 | ・ | userHandle | | ArrayBuffer? |
4 | type | タイプ(public-key固定) | String |
5 | getClientExtensionResults? | extensions results struct | |
(4) challenge、origin、typeの検証 †
(5) flagsの検証 †
(6) signatureの検証 †
参考 †
techblogyahoo †
Tags: :IT国際標準, :認証基盤