「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。 -戻る --[[FIDO]] --[[Microsoft Passport]] * 目次 [#t997f2c6] #contents *概要 [#oe736650] [[FIDO]] 2.0 の Web Application用 JavaScript Library。 **現状 [#d26348bb] ***仕様 [#i6f012ef] -早期ドラフトの実装 (ms-prefix実装)。 -現在は Microsoft Edge のみで動作 ***認証器 [#l10ca068] -Embedded Authenticator (利用 Device に付随した認証) に限定 -External Authenticator (外部 Device による認証) は将来対応予定 *API [#e44e4639] -Web Authentication API で使用する (主な) 関数は 2 つだけ。 -W3C で定義されている API の名前空間は --webauthn.[[makeCredential>#ed03528a]] --webauthn.[[getAssertion>#vb05a7a9]] **仕様 [#c9b811f4] ***ドラフト [#a8e59cb8] -現在はドラフト仕様に基づく ms-prefix実装であるため、~ 現在 (2016/05 時点) の Edge の実装では、明示的に下記を使用。 --msCredentials.[[makeCredential>#ed03528a]] --msCredentials.[[getAssertion>#vb05a7a9]] ***[[Polyfill>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#me2ddef5]] [#z9c36841] -[[webauthn.js>#x7fbdb40]]という[[Polyfill>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#me2ddef5]]を使用すると良い。 ***Promise [#c3481199] [[Promise>https://dotnetdevelopmentinfrastructure.osscons.jp/index.php?JavaScript#j2209b5b]]で実装されている。 **メソッド [#z9b20aaa] ***makeCredential()メソッド [#ed03528a] 初回の key pair の作成 -private key の (Device への) 登録 -public key の取得 ([[JWK>JWT]] format) ***getAssertion()メソッド [#vb05a7a9] private key を用いた challenge data のデジタル署名 *補足 [#x49db2e9] -(現時点で)以下に値が入ってこない。 --result.algorithm --result.attestation -デバイスを特定する方法がないので、~ 1サイト、1ユーザに複数デバイス登録することができない。 -まだ、うまく動いていない。~ https://github.com/OpenTouryoProject/MultiPurposeAuthSite/issues/50#issuecomment-336858649 *参考 [#b22f8c0c] -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 **しばやん雑記 [#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 ---- Tags: [[:認証基盤]]