WebAuthn: Difference between revisions

m →External links: add external link to resource by a recognized authority
reorganize content for clarity
Line 1: Line 1:
{{short description|Public-key authentication standard}}
{{short description|Public-key authentication standard}}


'''WebAuthn''' ('''Web Authentication''') is a [[web standard]] by the [[World Wide Web Consortium]] (W3C),<ref name="W3C-WebAuthn-Level-1">{{cite web |editor1-last=Balfanz |editor1-first=Dirk |editor2-last=Czeskis |editor2-first=Alexei |editor3-last=Hodges |editor3-first=Jeff |editor4-last=Jones |editor4-first=J.C. |editor5-last=Jones |editor5-first=Michael B. |editor6-last=Kumar |editor6-first=Akshay |editor7-last=Liao |editor7-first=Angelo |editor8-last=Lindemann |editor8-first=Rolf |editor9-last=Lundberg |editor9-first=Emil |title=Web Authentication: An API for accessing Public Key Credentials Level&nbsp;1 |url=https://www.w3.org/TR/2019/REC-webauthn-1-20190304/ |publisher=World Wide Web Consortium (W3C) |date=4 March 2019 |accessdate=4 March 2019}}</ref><ref>{{cite web |url=https://www.w3.org/blog/webauthn/ |title=Web Authentication Working Group |accessdate=2018-05-11 |publisher=W3C}}</ref> with input from the [[FIDO Alliance]],<ref name="fido2">{{cite web|url=https://fidoalliance.org/fido2/|title=FIDO2 Project|publisher=FIDO Alliance|accessdate=2018-05-11}}</ref> to standardize an interface for [[public-key authentication]] of users to web-based applications and services. It implements an extension of the W3C's more general [[Credential Management]] [[application programming interface|API]], which is an attempt to formalize the interaction between websites and [[web browser|web browsers]] when exchanging user credentials.
'''WebAuthn''' ('''Web Authentication''') is a [[web standard]] published by the [[World Wide Web Consortium]] (W3C).<ref name="W3C-WebAuthn-Level-1">{{cite web |editor1-last=Balfanz |editor1-first=Dirk |editor2-last=Czeskis |editor2-first=Alexei |editor3-last=Hodges |editor3-first=Jeff |editor4-last=Jones |editor4-first=J.C. |editor5-last=Jones |editor5-first=Michael B. |editor6-last=Kumar |editor6-first=Akshay |editor7-last=Liao |editor7-first=Angelo |editor8-last=Lindemann |editor8-first=Rolf |editor9-last=Lundberg |editor9-first=Emil |title=Web Authentication: An API for accessing Public Key Credentials Level&nbsp;1 |url=https://www.w3.org/TR/2019/REC-webauthn-1-20190304/ |publisher=World Wide Web Consortium (W3C) |date=4 March 2019 |accessdate=4 March 2019}}</ref><ref>{{cite web |url=https://www.w3.org/blog/webauthn/ |title=Web Authentication Working Group |accessdate=2018-05-11 |publisher=W3C}}</ref> WebAuthn is a core component of the [[FIDO2 Project]] under the guidance of the [[FIDO Alliance]].<ref name="fido2">{{cite web|url=https://fidoalliance.org/fido2/|title=FIDO2 Project|publisher=FIDO Alliance|accessdate=2018-05-11}}</ref> The goal of the project is to standardize an interface for [[public-key authentication]] of users to web-based applications and services.


WebAuthn can be used in a single-factor capacity, whereby the user does not have to provide any additional information, such as username and passwords. However, for additional security, the party asking for authentication can still require those characteristics, effectively making this a [[multi-factor authentication]] scheme. Optionally, this can also be combined with other authentication factors, such as gestures or [[biometric]] verification, which improves overall security, while it is still unnecessary for users to type in long, complex strings of characters.
WebAuthn can be used in a single-factor capacity, whereby the user does not have to provide any additional information, such as username and passwords. However, for additional security, the party asking for authentication can still require those characteristics, effectively making this a [[multi-factor authentication]] scheme. Optionally, this can also be combined with other authentication factors, such as gestures or [[biometric]] verification, which improves overall security, while it is still unnecessary for users to type in long, complex strings of characters.


WebAuthn can be implemented in a variety of different ways, since the underlying cryptographic operations are performed by an [[authenticator]], which is an abstract functional model that is mostly agnostic on the details of how the key material is managed. This makes it possible to implement WebAuthn purely in software, but also to make use of a processor's [[trusted execution environment]] or a [[Trusted Platform Module]] (TPM). Sensitive cryptographic operations can also be offloaded to external hardware tokens that can in turn be accessed via [[USB]], [[Bluetooth Low Energy]], or [[near-field communication]]s (NFC). This, in general, is more secure, as private key material is at no time accessible to software running on the host machine. The communication with external hardware tokens is designed to work with the [[Client to Authenticator Protocol]] (CTAP), making WebAuthn effectively backward compatible with the [[Universal 2nd Factor]] (U2F) standard.
WebAuthn can be implemented in a variety of different ways, since the underlying cryptographic operations are performed by an [[authenticator]], which is an abstract functional model that is mostly agnostic on the details of how the key material is managed. This makes it possible to implement WebAuthn purely in software, but also to make use of a processor's [[trusted execution environment]] or a [[Trusted Platform Module]] (TPM). Sensitive cryptographic operations can also be offloaded to external hardware tokens that can in turn be accessed via [[USB]], [[Bluetooth Low Energy]], or [[near-field communication]]s (NFC). This, in general, is more secure, as private key material is at no time accessible to software running on the host machine. The communication with external hardware tokens is designed to work with the [[Client to Authenticator Protocol]] (CTAP), making WebAuthn effectively backward compatible with the FIDO [[Universal 2nd Factor]] (U2F) standard.
 
WebAuthn as well as CTAP are both outgrowths of the [[FIDO2 Project]], which  tries to standardize on secure and password-less authentication schemes and goes beyond the scope of browsers and the Web. It is based upon previous work done by the FIDO Alliance, in particular the [[Universal Authentication Framework]] (UAF) and Universal 2nd Factor (U2F) standards.


The WebAuthn Level&nbsp;1 standard was published as a W3C Recommendation on 4&nbsp;March 2019.<ref name="W3C-WebAuthn-announce">{{cite web |title=W3C and FIDO Alliance Finalize Web Standard for Secure, Passwordless Logins |url=https://www.w3.org/2019/03/pressrelease-webauthn-rec.html.en |publisher=[[World Wide Web Consortium]] (W3C) |accessdate=4 March 2019 |date=4 March 2019}}</ref> A Level&nbsp;2 specification is under development.<ref name="W3C-WebAuthn-Level-2">{{cite web |editor1-last=Balfanz |editor1-first=Dirk |editor2-last=Czeskis |editor2-first=Alexei |editor3-last=Hodges |editor3-first=Jeff |editor4-last=Jones |editor4-first=J.C. |editor5-last=Jones |editor5-first=Michael B. |editor6-last=Kumar |editor6-first=Akshay |editor7-last=Liao |editor7-first=Angelo |editor8-last=Lindemann |editor8-first=Rolf |editor9-last=Lundberg |editor9-first=Emil |title=Web Authentication: An API for accessing Public Key Credentials Level&nbsp;2 |url=https://w3c.github.io/webauthn/ |publisher=World Wide Web Consortium (W3C) |accessdate=6 March 2019}}</ref>
The WebAuthn Level&nbsp;1 standard was published as a W3C Recommendation on 4&nbsp;March 2019.<ref name="W3C-WebAuthn-announce">{{cite web |title=W3C and FIDO Alliance Finalize Web Standard for Secure, Passwordless Logins |url=https://www.w3.org/2019/03/pressrelease-webauthn-rec.html.en |publisher=[[World Wide Web Consortium]] (W3C) |accessdate=4 March 2019 |date=4 March 2019}}</ref> A Level&nbsp;2 specification is under development.<ref name="W3C-WebAuthn-Level-2">{{cite web |editor1-last=Balfanz |editor1-first=Dirk |editor2-last=Czeskis |editor2-first=Alexei |editor3-last=Hodges |editor3-first=Jeff |editor4-last=Jones |editor4-first=J.C. |editor5-last=Jones |editor5-first=Michael B. |editor6-last=Kumar |editor6-first=Akshay |editor7-last=Liao |editor7-first=Angelo |editor8-last=Lindemann |editor8-first=Rolf |editor9-last=Lundberg |editor9-first=Emil |title=Web Authentication: An API for accessing Public Key Credentials Level&nbsp;2 |url=https://w3c.github.io/webauthn/ |publisher=World Wide Web Consortium (W3C) |accessdate=6 March 2019}}</ref>
Line 43: Line 41:
== API ==
== API ==


The WebAuthn API extends the Credential Management <code>navigator.credentials.create()</code> and <code>navigator.credentials.get()</code> [[JavaScript]] methods so they accept a <code>publicKey</code> parameter. The <code>create()</code> method is used for registering public key [[authenticator]]s as part of associating them with user accounts (possibly at initial account creation time but more likely when adding a new security device to an existing account) while the <code>get()</code> method is used for authenticating (such as when logging in).
WebAuthn implements an extension of the W3C's more general [[Credential Management]] [[application programming interface|API]], which is an attempt to formalize the interaction between [[website]]s and [[web browser]]s when exchanging user credentials. The WebAuthn API extends the Credential Management <code>navigator.credentials.create()</code> and <code>navigator.credentials.get()</code> [[JavaScript]] methods so they accept a <code>publicKey</code> parameter. The <code>create()</code> method is used for registering public key [[authenticator]]s as part of associating them with user accounts (possibly at initial account creation time but more likely when adding a new security device to an existing account) while the <code>get()</code> method is used for authenticating (such as when logging in).


To check if a browser supports WebAuthn, scripts should check if the <code>window.PublicKeyCredential</code> interface is defined. In addition to <code>PublicKeyCredential</code>, the standard also defines the <code>AuthenticatorResponse</code>, <code>AuthenticatorAttestationResponse</code>, and <code>AuthenticatorAssertionResponse</code> interfaces in addition to a variety of dictionaries and other datatypes.
To check if a browser supports WebAuthn, scripts should check if the <code>window.PublicKeyCredential</code> interface is defined. In addition to <code>PublicKeyCredential</code>, the standard also defines the <code>AuthenticatorResponse</code>, <code>AuthenticatorAttestationResponse</code>, and <code>AuthenticatorAssertionResponse</code> interfaces in addition to a variety of dictionaries and other datatypes.