ASP.NET Core 3.1 - FIDO2 Authenticators
Ken HaggertyCreated 05/10/2020 - Updated 05/23/2020 15:24
This article will describe the FIDO2 authenticator. I will assume you have created a new ASP.NET Core 3.1 Razor Pages project and have reviewed the previous articles of the series. I won't use Identity or Individual User Accounts. See Tutorial: Get started with Razor Pages in ASP.NET Core.
I started my FIDO research over 8 months ago when I purchased a Security Key NFC by Yubico. The first time I attempted to implement it with Windows 10 sign-in, the warnings about adding a second key for backup scared me away. Now, Windows 10 account sign-in does not support security keys but allows you to add a key for FIDO2. See Settings > Accounts > Sign-in options > Security Keys. My laptop has a fingerprint scanner which is supported by Windows 10 Hello. Windows 10 Hello is certified as a FIDO2 authenticator for passwordless sign-in on the web. Windows 10 Hello also supports a PIN and face recognition with a compatible IR camera. See MSDocs - Windows Hello
I am using the Users Without Passwords Project to do the research for this article. A FIDO2 web application needs to support multiple authenticators in the event the first one is lost, stolen or broken. When the credential is created, the authenticator returns a response with ClientDataJson and AttestationObject. First you decode the ClientDataJson to verify the type (create or get), the challenge and Relying Party's origin. Then the attestationObject is cast as a CBOR object which produces a byte array called authData. The authData byte array is sliced, diced and hashed to extract and validate properties. The most important are the CredentialId and the PublicKey.
I read somewhere external authenticators support the ES256 algorithm and Windows Hello supports the RS256 algorithm. Typically, the attestation signature is the concatenation of the authenticator data and the client data hash. I have developed a crypto service class with algorithm models for the Users Without Passwords Project.
I have purchased a second Security Key and updated the YubiKey Manager. You have to run the manager as an administrator to display the firmware version and update the PIN or Reset (restore defaults) for one key at a time.
The manager also allows you to enable or disable the interfaces for the key.
The early FIDO authenticators required a Metadata Service to validate security certificates and acquire make and model information. FIDO2 authenticators employ a packed format for encryption which doesn't require a certificate lookup for validation. You can request an AaGuid (Authenticator Attestation GUID) from FIDO2 authenticators which can be used with Metadata Services to acquire make, model and firmware. You can use this information to restrict access to specific authenticators. If you request the AaGuid, you will be prompted by the client to allow the request.
I added the AES Cipher article link.
- Your Complete Guide to FIDO, FIDO2 and WebAuthn
- Introduction to FIDO(Fast IDentity Online)
- FIDO2 DEEP DIVE: ATTESTATIONS, TRUST MODEL AND SECURITY
- Can I Duplicate or Back Up a YubiKey?
- eWBM Goldengate security key with integrated fingerprint reader
- FIDO - Metadata Service
- FIDO - Metadata Service Tokens
- GitHub - apowers313 / mds-client