「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。

-戻る
--[[FIDO2]]
--[[Microsoft Passport]]

* 目次 [#t997f2c6]
#contents

*概要 [#oe736650]
[[FIDO]] の Web Application用 JavaScript Library。

*API [#obe238ba]

-昔のサンプルは、[[ドラフト実装(makeCredential & getAssertion)>#e44e4639]]だったが、~
最近のサンプルは、[[Credential Management API(navigator.credentials.create & get)>#m60489ae]]に、変わっている。

-以下のような状況(?)らしい。
>「[[Progressive Web App Checklist>https://developers.google.com/web/progressive-web-apps/checklist]] には記載されていないですが、~
[[Web Authentication API>https://w3c.github.io/webauthn/]] の仕様では PWA の API の 1 つである~
[[Credential Management API>https://w3c.github.io/webappsec-credential-management/]] との連携について言及されています。」

**ドラフト実装(makeCredential & getAssertion) [#e44e4639]
-使用する (主な) 関数は 2 つ。

-W3C で定義されている API の名前は
--makeCredential()メソッド
--getAssertion()メソッド

***仕様 [#c9b811f4]
-ドラフト
--現在はドラフト仕様に基づく ms-prefix実装であるため、~
現在 (2016/05 時点) の Edge の実装では、明示的に下記を使用。
---window.msCredentials.makeCredential
---window.msCredentials.getAssertion

-[[Polyfill>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#me2ddef5]]~
[[webauthn.js>#x7fbdb40]]という[[Polyfill>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#me2ddef5]]を使用すると良い。

-Promise~
[[Promise>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#j2209b5b]]で実装されている。

***メソッド [#z9b20aaa]
-makeCredential()メソッド~
初回の key pair の作成
--private key の (Device への) 登録
--public key の取得 ([[JWK>JWT]] format)

-getAssertion()メソッド~
private key を用いた challenge data のデジタル署名

***補足 [#x49db2e9]
-(現時点で)以下に値が入ってこない。
--result.algorithm
--result.attestation

-PKIのキーペアは、CredentialIDを使用して、紐付けを行う模様。

--このキーペアは、[[AIK(認証IDキー)>TPM(Trusted Platform Module)#e8431d17]]だと思われる。

--従って、CredentialIDには、認証器が生成した値を使用する必要がある。

--なので、実装に注意が必要(あるサンプルコードは失敗する)。~
https://github.com/OpenTouryoProject/MultiPurposeAuthSite/issues/50#issuecomment-336858649

--なお、CredentialIDを使用すれば、複数のデバイスの登録が可能。~
しかし、デバイスを特定する方法が無いので、登録が重複してしまう。

**Credential Management API(navigator.credentials.create & get) [#m60489ae]
-使用する (主な) 関数は 2 つ。

-W3C で定義されている API の名前は
--navigator.credentials.create()メソッド
--navigator.credentials.get()メソッド

***仕様 [#ec444782]

***メソッド [#l8a25548]

*参考 [#b22f8c0c]

**w3c [#wfcfd0f0]
-Web Authentication Working Group~
https://www.w3.org/Webauthn/

--Credential Management Level 1~
https://www.w3.org/TR/credential-management-1/

--Web Authentication: An API for accessing Public Key Credentials - Level 1~
http://w3c.github.io/webauthn/

**webauthn.org [#ec6dcea6]
-WebAuthn demo~
https://webauthn.org
--apowers313/fido2-server-demo: A set of FIDO2 / WebAuthn demo servers~
https://github.com/apowers313/fido2-server-demo/

***fido2-net-lib [#re8fa185]
-abergs/fido2-net-lib: A proof of Concept implementation library~
https://github.com/abergs/fido2-net-lib

--+ demo for fido2 and WebAuthn using .NET (Work in progress)~
https://github.com/abergs/fido2-net-lib/tree/master/Fido2Demo

-WebAuthn.io~
https://fido2.azurewebsites.net/

-FIDO2 - Things I learned by building a FIDO2 server – Ideas Of Anders Åberg~
http://ideasof.andersaberg.com/development/fido2-net-library

**Yubico [#m94f60dc]
-Yubico WebAuthn demo~
https://demo.yubico.com/webauthn/

-Developer Program~
https://www.yubico.com/why-yubico/for-developers/developer-program/

-New NIST Authentication Guidelines for Public Safety and First Responders~
https://www.yubico.com/2018/05/new-nist-authentication-guidelines-for-public-safety-and-first-responders/

***blog.jxck.io [#u5a7037b]
-Web Authentication API で FIDO U2F(YubiKey) 認証 | ~
https://blog.jxck.io/entries/2018-05-15/webauthentication-api.html
--Web Authentication API (FIDO-U2F) DEMO~
https://labs.jxck.io/webauthentication/fido-u2f/

***enjoy struggling [#ne242fa6]
-Edge が WebAuthN をサポートしたらしいので色々試してみた(Insider Preview)~
https://blog.haniyama.com/2018/06/17/edge-support-webauthn/
--HWataru/webauthn-demo: WebAuthn Demo~
https://github.com/HWataru/webauthn-demo
--fido-alliance/webauthn-demo: WebAuthn Demo~
https://github.com/fido-alliance/webauthn-demo

***(株)ソフト技研 [#hdc805ce]
-ワンタイムパスワードトークンYubiKey~
http://yubikey.yubion.com
--ブログ~
http://yubikey.yubion.com/blog.html

**Qiita [#rff64274]
-もうすぐ来る? Web Authentication APIについて調べてみた~
https://qiita.com/syoichi/items/62e6aa66938692a3c0b6

*参考(旧)[#rdddcc10]
[[ドラフト実装(makeCredential & getAssertion)>#e44e4639]]の頃の参考情報。

**しばやん雑記 [#t7f57b1c]
-Windows Hello を Web で使うための Web Authentication API (FIDO 2.0) について調べた ~
http://blog.shibayan.jp/entry/20170129/1485665985

-ASP.NET Core Identity に Windows Hello を使ったログイン機能を追加する~
http://blog.shibayan.jp/entry/20170131/1485844075
--shibayan/webauthn-aspnet-demo: Demo Application for Windows Hello (Web Authn API)~
https://github.com/shibayan/webauthn-aspnet-demo

***Views [#vf27ef62]
-Manage/AddPublicKey.cshtml~
https://github.com/shibayan/webauthn-aspnet-demo/blob/master/src/WebAuthnDemo/Views/Manage/AddPublicKey.cshtml

-Account/Login.cshtml~
https://github.com/shibayan/webauthn-aspnet-demo/blob/master/src/WebAuthnDemo/Views/Account/Login.cshtml

***Controllers [#ddeef527]
-AccountController.cs~
https://github.com/shibayan/webauthn-aspnet-demo/blob/master/src/WebAuthnDemo/Controllers/AccountController.cs#L149
-ManageController.cs~
https://github.com/shibayan/webauthn-aspnet-demo/blob/master/src/WebAuthnDemo/Controllers/ManageController.cs#L127

***Services [#jd6b7233]
-FidoAuthenticator.cs~
https://github.com/shibayan/webauthn-aspnet-demo/blob/master/src/WebAuthnDemo/Services/FidoAuthenticator.cs

**microsoft.com [#z2da3470]
-Web Authentication API 紹介 (Windows Hello を使った Edge 開発) – Tsmatz~
https://blogs.msdn.microsoft.com/tsmatsuz/2016/06/08/w3c-web-authentication-api-javascript/

-Dev guide: Web authentication - Microsoft Edge Development~
https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/dev-guide/device/web-authentication/

-A world without passwords: Windows Hello in Microsoft Edge - Microsoft Edge Dev BlogMicrosoft Edge Dev Blog~
https://blogs.windows.com/msedgedev/2016/04/12/a-world-without-passwords-windows-hello-in-microsoft-edge/

***API リファレンス [#x65290df]
-Web Authentication~
https://msdn.microsoft.com/en-us/library/mt697638.aspx
--MSCredentials object~
https://msdn.microsoft.com/en-us/library/mt697639.aspx
---makeCredential method~
https://msdn.microsoft.com/en-us/library/mt697641.aspx
---getAssertion method~
https://msdn.microsoft.com/en-us/library/mt697640.aspx

***adrianba/fido-snippets [#x7fbdb40]
-polyfill
--webauthn.js~
https://github.com/adrianba/fido-snippets/blob/master/polyfill/webauthn.js
--polyfill.html~
https://github.com/adrianba/fido-snippets/blob/master/polyfill/polyfill.html
-csharp/app.cs~
https://github.com/adrianba/fido-snippets/blob/master/csharp/app.cs

**Qiita [#y5466d73]
-まだパスワードで消耗してるの? TouchIDとFIDO2.0でパスワードレス認証を実装してみた(Keycloak編)~
https://qiita.com/rkato/items/3607e6870c71fbd3ec06

*[[FIDO2.0対応 - Open 棟梁 Wiki>https://opentouryo.osscons.jp/index.php?FIDO2.0%E5%AF%BE%E5%BF%9C]] [#r622885f]

----
Tags: [[:認証基盤]]

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS