「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicrosofttech.osscons.jp/]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。 -[[戻る>Web Authentication API]] * 目次 [#ve4bca3a] #contents *概要 [#cd1246fb] 旧情報 旧情報 → [[新情報>Web Authentication API]] *詳細 [#e44e4639] 使用する (主な) 関数は 2 つ。 -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()メソッド [#u6dfd455] 初回の key pair の作成 -private key の (Device への) 登録 -public key の取得 ([[JWK>JWT]] format) ***getAssertion()メソッド [#ocaf5400] private key を用いた challenge data のデジタル署名 **補足 [#x49db2e9] -(現時点で)以下に値が入ってこない。 --result.algorithm --result.attestation -PKIのキーペアは、CredentialIDを使用して、紐付けを行う模様。 --このキーペアは、[[AIK(認証IDキー)>TPM(Trusted Platform Module)#e8431d17]]だと思われる。 --従って、CredentialIDには、[[認証器>FIDO#lf855e22]]が生成した値を使用する必要がある。 --なので、実装に注意が必要(あるサンプルコードは失敗する)。~ https://github.com/OpenTouryoProject/MultiPurposeAuthSite/issues/50#issuecomment-336858649 --なお、CredentialIDを使用すれば、複数のデバイスの登録が可能。~ しかし、デバイスを特定する方法が無いので、登録が重複してしまう。 *参考(旧)[#rdddcc10] **しばやん雑記 [#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: [[:認証基盤]]