From d945586b73d6927ca3cf1346387338f5b986ea26 Mon Sep 17 00:00:00 2001 From: Tim Cappalli Date: Mon, 8 Jul 2024 20:30:42 +0000 Subject: [PATCH] Merge pull request #2085 from w3c/tc-remove-uvm SHA: 061a649f3ae7634e1448129ea72951fa7e387fdd Reason: push, by nsatragno Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 6606 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 3824 insertions(+), 2782 deletions(-) diff --git a/index.html b/index.html index d84ef2b89..f778e7c04 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,10 @@ Web Authentication: An API for accessing Public Key Credentials - Level 3 - + - + + - + - + - +

Web Authentication:
An API for accessing Public Key Credentials
Level 3

-

Editor’s Draft,

+

Editor’s Draft,

More details about this document
@@ -931,9 +982,11 @@

Web Authentication:
An API for accessing Public Key Credentials
Level
Feedback:
GitHub
Editors: +
(Okta)
(Self-Issued Consulting)
(Microsoft)
(Yubico) +
(Cisco)
Former Editors:
(Google)
(Microsoft) @@ -947,10 +1000,9 @@

Web Authentication:
An API for accessing Public Key Credentials
Level
Contributors:
John Bradley (Yubico)
Christiaan Brand (Google) -
Tim Cappalli (Microsoft)
Adam Langley (Google)
Giridhar Mandyam (Qualcomm) -
Matthew Miller (Cisco) +
Pascoe (Apple)
Nina Satragno (Google)
Ki-Eun Shin (SK Telecom)
Nick Steele (1Password) @@ -958,24 +1010,24 @@

Web Authentication:
An API for accessing Public Key Credentials
Level
Shane Weeden (IBM)
Mike West (Google)
Jeffrey Yasskin (Google) +
Anders Åberg (Bitwarden)
Tests:
web-platform-tests webauthn/ (ongoing work)

- +

Abstract

This specification defines an API enabling the creation and use of strong, attested, scoped, public key-based - - credentials by web applications, for the purpose of strongly authenticating users. Conceptually, one or more public key - credentials, each scoped to a given WebAuthn Relying Party, are created by and bound to authenticators as requested by the web application. The user agent mediates access to authenticators and their public - key credentials in order to preserve user - privacy. Authenticators are responsible for ensuring that no operation is performed without user consent. Authenticators provide cryptographic proof of their properties to Relying Parties via attestation. This - specification also describes the functional model for WebAuthn conformant authenticators, including their signature and attestation functionality.

+credentials by web applications, for the purpose of strongly authenticating users. Conceptually, one or more public key +credentials, each scoped to a given WebAuthn Relying Party, are created by and bound to authenticators as requested by the web application. The user agent mediates access to authenticators and their public +key credentials in order to preserve user +privacy. Authenticators are responsible for ensuring that no operation is performed without user consent. Authenticators provide cryptographic proof of their properties to Relying Parties via attestation. This +specification also describes the functional model for WebAuthn conformant authenticators, including their signature and attestation functionality.

Status of this document

@@ -995,7 +1047,7 @@

Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

-

This document is governed by the 03 November 2023 W3C Process Document.

+

This document is governed by the 03 November 2023 W3C Process Document.

@@ -1059,11 +1111,10 @@

Table of Contents

  • 5.1.4.2 Issuing a Credential Request to an Authenticator
  • 5.1.5 Store an Existing Credential - PublicKeyCredential’s [[Store]](credential, sameOriginWithAncestors) Method -
  • 5.1.6 Preventing Silent Access to an Existing Credential - PublicKeyCredential’s [[preventSilentAccess]](credential, sameOriginWithAncestors) Method -
  • 5.1.7 Availability of User-Verifying Platform Authenticator - PublicKeyCredential’s isUserVerifyingPlatformAuthenticatorAvailable() Method -
  • 5.1.8 Availability of a passkey platform authenticator - PublicKeyCredential’s isPasskeyPlatformAuthenticatorAvailable() Method -
  • 5.1.9 Deserialize Registration ceremony options - PublicKeyCredential’s parseCreationOptionsFromJSON() Method -
  • 5.1.10 Deserialize Authentication ceremony options - PublicKeyCredential’s parseRequestOptionsFromJSON() Methods +
  • 5.1.6 Availability of User-Verifying Platform Authenticator - PublicKeyCredential’s isUserVerifyingPlatformAuthenticatorAvailable() Method +
  • 5.1.7 Availability of client capabilities - PublicKeyCredential’s getClientCapabilities() Method +
  • 5.1.8 Deserialize Registration ceremony options - PublicKeyCredential’s parseCreationOptionsFromJSON() Method +
  • 5.1.9 Deserialize Authentication ceremony options - PublicKeyCredential’s parseRequestOptionsFromJSON() Methods
  • 5.2 Authenticator Responses (interface AuthenticatorResponse) @@ -1112,7 +1163,8 @@

    Table of Contents

  • 5.8.4 Authenticator Transport Enumeration (enum AuthenticatorTransport)
  • 5.8.5 Cryptographic Algorithm Identifier (typedef COSEAlgorithmIdentifier)
  • 5.8.6 User Verification Requirement Enumeration (enum UserVerificationRequirement) -
  • 5.8.7 User-agent Hints Enumeration (enum PublicKeyCredentialHints) +
  • 5.8.7 Client Capability Enumeration (enum ClientCapability) +
  • 5.8.8 User-agent Hints Enumeration (enum PublicKeyCredentialHints)
  • 5.9 Permissions Policy integration
  • 5.10 Using Web Authentication within iframe elements @@ -1146,22 +1198,26 @@

    Table of Contents

  • 6.4 String Handling
      -
    1. 6.4.1 String Truncation +
    2. + 6.4.1 String Truncation +
        +
      1. 6.4.1.1 String Truncation by Clients +
      2. 6.4.1.2 String Truncation by Authenticators +
    3. 6.4.2 Language and Direction Encoding
  • 6.5 Attestation
      -
    1. 6.5.1 Attestation in assertions
    2. - 6.5.2 Attested Credential Data + 6.5.1 Attested Credential Data
        -
      1. 6.5.2.1 Examples of credentialPublicKey Values Encoded in COSE_Key Format +
      2. 6.5.1.1 Examples of credentialPublicKey Values Encoded in COSE_Key Format
      -
    3. 6.5.3 Attestation Statement Formats -
    4. 6.5.4 Attestation Types -
    5. 6.5.5 Generating an Attestation Object -
    6. 6.5.6 Signature Formats for Packed Attestation, FIDO U2F Attestation, and Assertion Signatures +
    7. 6.5.2 Attestation Statement Formats +
    8. 6.5.3 Attestation Types +
    9. 6.5.4 Generating an Attestation Object +
    10. 6.5.5 Signature Formats for Packed Attestation, FIDO U2F Attestation, and Assertion Signatures
  • @@ -1219,22 +1275,21 @@

    Table of Contents

  • 10.2 Authenticator Extensions
      -
    1. 10.2.1 User Verification Method Extension (uvm)
    2. - 10.2.2 Supplemental public keys extension (supplementalPubKeys) + 10.2.1 Supplemental public keys extension (supplementalPubKeys)
        -
      1. 10.2.2.1 Relying Party Usage +
      2. 10.2.1.1 Relying Party Usage
      3. - 10.2.2.2 Extension Definition + 10.2.1.2 Extension Definition
          -
        1. 10.2.2.2.1 AAGUIDs -
        2. 10.2.2.2.2 Attestation calculations +
        3. 10.2.1.2.1 AAGUIDs +
        4. 10.2.1.2.2 Attestation calculations
      4. - 10.2.2.3 supplementalPubKeys Extension Output Verification Procedures + 10.2.1.3 supplementalPubKeys Extension Output Verification Procedures
          -
        1. 10.2.2.3.1 Registration (create()) -
        2. 10.2.2.3.2 Authentication (get()) +
        3. 10.2.1.3.1 Registration (create()) +
        4. 10.2.1.3.2 Authentication (get())
    @@ -1255,6 +1310,7 @@

    Table of Contents

  • 11.7 Remove Credential
  • 11.8 Remove All Credentials
  • 11.9 Set User Verified +
  • 11.10 Set Credential Properties
  • 12 IANA Considerations @@ -1307,6 +1363,7 @@

    Table of Contents

  • 14.5.1 Registration Ceremony Privacy
  • 14.5.2 Authentication Ceremony Privacy
  • 14.5.3 Privacy Between Operating System Accounts +
  • 14.5.4 Disclosing Client Capabilities
  • 14.6 Privacy considerations for Relying Parties @@ -1398,7 +1455,7 @@

    Note: Along with the Web Authentication API itself, this specification defines a - request-response cryptographic protocol—the WebAuthn/FIDO2 protocol—between + request-response cryptographic protocol—the WebAuthn/FIDO2 protocol—between a WebAuthn Relying Party server and an authenticator, where the Relying Party's request consists of a challenge and other input data supplied by the Relying Party and sent to the authenticator. The request is conveyed via the @@ -1873,9 +1930,9 @@

    2.3. WebAuthn Relying Parties

    A WebAuthn Relying Party MUST behave as described in § 7 WebAuthn Relying Party Operations to obtain all the security benefits offered by this specification. See § 13.4.1 Security Benefits for WebAuthn Relying Parties for further discussion of this.

    2.4. All Conformance Classes

    -

    All CBOR encoding performed by the members of the above conformance classes MUST be done using the CTAP2 canonical CBOR encoding form. +

    All CBOR encoding performed by the members of the above conformance classes MUST be done using the CTAP2 canonical CBOR encoding form. All decoders of the above conformance classes SHOULD reject CBOR that is not validly encoded -in the CTAP2 canonical CBOR encoding form and SHOULD reject messages with duplicate map keys.

    +in the CTAP2 canonical CBOR encoding form and SHOULD reject messages with duplicate map keys.

    3. Dependencies

    This specification relies on several other underlying specifications, listed below and in Terms defined by reference.

    @@ -1887,7 +1944,7 @@

    CTAP2 canonical CBOR encoding form of the Compact Binary Object Representation (CBOR) [RFC8949], +

    A number of structures in this specification, including attestation statements and extensions, are encoded using the CTAP2 canonical CBOR encoding form of the Compact Binary Object Representation (CBOR) [RFC8949], as defined in [FIDO-CTAP].

    CDDL
    @@ -1905,9 +1962,6 @@

    %ArrayBuffer% is defined in [ECMAScript].

    -
    HTML -
    -

    The concepts of browsing context, origin, opaque origin, tuple origin, relevant settings object, same site and is a registrable domain suffix of or is equal to are defined in [HTML].

    URL

    The concepts of domain, host, port, scheme, valid domain and valid domain string are defined in [URL].

    @@ -1921,8 +1975,9 @@

    determining the FacetID of a calling application and determining if a caller’s FacetID is authorized for an AppID (used only in the AppID extension) are defined by [FIDO-APPID].

    -

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and -"OPTIONAL" in this document are to be interpreted as described in [RFC2119].

    +

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", +"NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in +BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

    4. Terminology

    Attestation @@ -1958,7 +2013,7 @@

    register a user with a given Relying Party and later assert possession of the registered public key credential, and optionally verify the user to the Relying Party. Authenticators can report information regarding their type and security characteristics via attestation during registration and assertion.

    A WebAuthn Authenticator could be a roaming authenticator, a dedicated hardware subsystem integrated into the client device, -or a software component of the client or client device. A WebAuthn Authenticator is not necessarily confined to operating in +or a software component of the client or client device. A WebAuthn Authenticator is not necessarily confined to operating in a local context, and can generate or store a credential key pair in a server outside of client-side hardware.

    In general, an authenticator is assumed to have only one user. If multiple natural persons share access to an authenticator, @@ -2278,19 +2333,25 @@

    WebAuthn API, a relying party identifier is a valid domain string identifying the WebAuthn Relying Party on whose behalf a given registration or authentication ceremony is being performed. A public key credential can only be used for authentication with the same entity (as identified by RP ID) it was registered with.

    By default, the RP ID for a WebAuthn operation is set to the caller’s origin's effective domain. This default MAY be -overridden by the caller, as long as the caller-specified RP ID value is a registrable domain suffix of or is equal +overridden by the caller, as long as the caller-specified RP ID value is a registrable domain suffix of or is equal to the caller’s origin's effective domain. See also § 5.1.3 Create a New Credential - PublicKeyCredential’s [[Create]](origin, options, sameOriginWithAncestors) Method and § 5.1.4 Use an Existing Credential to Make an Assertion - PublicKeyCredential’s [[Get]](options) Method.

    - Note: An RP ID is based on a host's domain name. It does not itself include a scheme or port, as an origin does. The RP ID of a public key credential determines its scope. I.e., it determines the set of origins on which the public key credential may be exercised, as follows: + Note: An RP ID is based on a host's domain name. It does not itself include a scheme or port, as an origin does. The RP ID of a public key credential determines its scope. I.e., it determines the set of origins on which the public key credential may be exercised, as follows: -

    For example, given a Relying Party whose origin is https://login.example.com:1337, then the following RP IDs are valid: login.example.com (default) and example.com, but not m.login.example.com and not com.

    +

    For example, given a Relying Party whose origin is https://login.example.com:1337, then the following RP IDs are valid: login.example.com (default) and example.com, but not m.login.example.com and not com. Another example of a valid origin is http://localhost:8000, due to the origin being localhost.

    This is done in order to match the behavior of pervasively deployed ambient credentials (e.g., cookies, [RFC6265]). Please note that this is a greater relaxation of "same-origin" restrictions than what document.domain's setter provides.

    These restrictions on origin values apply to WebAuthn Clients.

    @@ -2398,16 +2459,16 @@

    5. deletion are considered to be the responsibility of such a user interface and are deliberately omitted from the API exposed to scripts.

    The security properties of this API are provided by the client and the authenticator working together. The authenticator, which -holds and manages credentials, ensures that all operations are scoped to a particular origin, and cannot be replayed against -a different origin, by incorporating the origin in its responses. Specifically, as defined in § 6.3 Authenticator Operations, -the full origin of the requester is included, and signed over, in the attestation object produced when a new credential +holds and manages credentials, ensures that all operations are scoped to a particular origin, and cannot be replayed against +a different origin, by incorporating the origin in its responses. Specifically, as defined in § 6.3 Authenticator Operations, +the full origin of the requester is included, and signed over, in the attestation object produced when a new credential is created as well as in all assertions produced by WebAuthn credentials.

    Additionally, to maintain user privacy and prevent malicious Relying Parties from probing for the presence of public key credentials belonging to other Relying Parties, each credential is also scoped to a Relying Party Identifier, or RP ID. This RP ID is provided by the client to the authenticator for all operations, and the authenticator ensures that credentials created by a Relying Party can only be used in operations -requested by the same RP ID. Separating the origin from the RP ID in this way allows the API to be used in cases -where a single Relying Party maintains multiple origins.

    -

    The client facilitates these security measures by providing the Relying Party's origin and RP ID to the authenticator for +requested by the same RP ID. Separating the origin from the RP ID in this way allows the API to be used in cases +where a single Relying Party maintains multiple origins.

    +

    The client facilitates these security measures by providing the Relying Party's origin and RP ID to the authenticator for each operation. Since this is an integral part of the WebAuthn security model, user agents only expose this API to callers in secure contexts. For web contexts in particular, this only includes those accessed via a secure transport (e.g., TLS) established without errors.

    @@ -2456,10 +2517,11 @@

    This operation returns the value of [[clientExtensionsResults]], which is a map containing extension identifierclient extension output entries produced by the extension’s client extension processing.

    isConditionalMediationAvailable()
    -

    PublicKeyCredential overrides this method to indicate availability for conditional mediation. WebAuthn Relying Parties SHOULD verify availability before attempting to set options.mediation to conditional.

    +

    PublicKeyCredential overrides this method to indicate availability for conditional mediation during navigator.credentials.get(). WebAuthn Relying Parties SHOULD verify availability before +attempting to set options.mediation to conditional.

    Upon invocation, a promise is returned that resolves with a value of true if conditional user mediation is available, or false otherwise.

    This method has no arguments and returns a promise to a Boolean value.

    -

    Note: If this method is not present, conditional user mediation is not available.

    +

    Note: If this method is not present, conditional user mediation is not available for navigator.credentials.get().

    toJSON()

    This operation returns RegistrationResponseJSON or AuthenticationResponseJSON, @@ -2480,58 +2542,57 @@

    typedef object PublicKeyCredentialJSON; dictionary RegistrationResponseJSON { - required Base64URLString id; - required Base64URLString rawId; - required AuthenticatorAttestationResponseJSON response; - DOMString authenticatorAttachment; - required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; - required DOMString type; + required Base64URLString id; + required Base64URLString rawId; + required AuthenticatorAttestationResponseJSON response; + DOMString authenticatorAttachment; + required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; + required DOMString type; }; dictionary AuthenticatorAttestationResponseJSON { - required Base64URLString clientDataJSON; - required Base64URLString authenticatorData; - required sequence<DOMString> transports; + required Base64URLString clientDataJSON; + required Base64URLString authenticatorData; + required sequence<DOMString> transports; // The publicKey field will be missing if pubKeyCredParams was used to - // negotiate a public-key algorithm that the user agent doesn’t + // negotiate a public-key algorithm that the user agent doesn't // understand. (See section “Easily accessing credential data” for a // list of which algorithms user agents must support.) If using such an // algorithm then the public key must be parsed directly from // attestationObject or authenticatorData. - Base64URLString publicKey; - required long long publicKeyAlgorithm; + Base64URLString publicKey; + required long long publicKeyAlgorithm; // This value contains copies of some of the fields above. See // section “Easily accessing credential data”. - required Base64URLString attestationObject; + required Base64URLString attestationObject; }; dictionary AuthenticationResponseJSON { - required Base64URLString id; - required Base64URLString rawId; - required AuthenticatorAssertionResponseJSON response; - DOMString authenticatorAttachment; - required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; - required DOMString type; + required Base64URLString id; + required Base64URLString rawId; + required AuthenticatorAssertionResponseJSON response; + DOMString authenticatorAttachment; + required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; + required DOMString type; }; dictionary AuthenticatorAssertionResponseJSON { - required Base64URLString clientDataJSON; - required Base64URLString authenticatorData; - required Base64URLString signature; - Base64URLString userHandle; - Base64URLString attestationObject; + required Base64URLString clientDataJSON; + required Base64URLString authenticatorData; + required Base64URLString signature; + Base64URLString userHandle; }; dictionary AuthenticationExtensionsClientOutputsJSON { };
    -
    [[type]] +
    [[type]]

    The PublicKeyCredential interface object's [[type]] internal slot's value is the string "public-key".

    Note: This is reflected via the type attribute getter inherited from Credential.

    -
    [[discovery]] +
    [[discovery]]

    The PublicKeyCredential interface object's [[discovery]] internal slot's value is "remote".

    @@ -2545,35 +2606,42 @@

    credential private key wrapped with a symmetric key that is burned into the authenticator.

    [[clientExtensionsResults]]
    -

    This internal slot contains the results of processing client extensions requested by the Relying Party upon the Relying Party's invocation of either navigator.credentials.create() or navigator.credentials.get().

    +

    This internal slot contains the results of processing client extensions requested by the Relying Party upon the Relying Party's invocation of either navigator.credentials.create() or navigator.credentials.get().

    PublicKeyCredential's interface object inherits Credential's implementation of [[CollectFromCredentialStore]](origin, options, sameOriginWithAncestors), and defines its own implementation of each of [[Create]](origin, options, sameOriginWithAncestors), [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors), and [[Store]](credential, sameOriginWithAncestors).

    +

    Calling CredentialsContainer's preventSilentAccess() method +will have no effect on PublicKeyCredential credentials, since they always require user interaction.

    5.1.1. CredentialCreationOptions Dictionary Extension

    To support registration via navigator.credentials.create(), this document extends the CredentialCreationOptions dictionary as follows:

    partial dictionary CredentialCreationOptions {
    -    PublicKeyCredentialCreationOptions      publicKey;
    +    PublicKeyCredentialCreationOptions      publicKey;
     };
     

    5.1.2. CredentialRequestOptions Dictionary Extension

    -

    To support obtaining assertions via navigator.credentials.get(), this document extends the CredentialRequestOptions dictionary as follows:

    +

    To support obtaining assertions via navigator.credentials.get(), this document extends the CredentialRequestOptions dictionary as follows:

    partial dictionary CredentialRequestOptions {
    -    PublicKeyCredentialRequestOptions      publicKey;
    +    PublicKeyCredentialRequestOptions      publicKey;
     };
     

    5.1.3. Create a New Credential - PublicKeyCredential’s [[Create]](origin, options, sameOriginWithAncestors) Method

    - PublicKeyCredential's interface object's implementation of the [[Create]](origin, -options, sameOriginWithAncestors) internal method [CREDENTIAL-MANAGEMENT-1] allows WebAuthn Relying Party scripts to call navigator.credentials.create() to request the creation of a new public key credential source, bound to an authenticator. This navigator.credentials.create() operation can be aborted by leveraging the AbortController; -see DOM § 3.3 Using AbortController and AbortSignal objects in APIs for detailed instructions. + PublicKeyCredential's interface object's implementation of the [[Create]](origin, +options, sameOriginWithAncestors) internal method [CREDENTIAL-MANAGEMENT-1] allows WebAuthn Relying Party scripts to call navigator.credentials.create() to request the creation of a new public key credential source, bound to an authenticator. +

    By setting options.mediation to conditional, Relying Parties can indicate that they would like to register a credential without prominent modal UI if user has already consented to create a credential. The Relying Party SHOULD first check that conditionalCreate is present +in the result of getClientCapabilities() in order to avoid the possibility of causing a user-visible error to be returned if the user agent does +not support conditional user mediation for navigator.credentials.create(). +The client MUST set BOTH requireUserPresence and requireUserVerification to FALSE when options.mediation is set to conditional unless they may explicitly performed during the ceremony.

    +

    Any navigator.credentials.create() operation can be aborted by leveraging the AbortController; +see DOM § 3.3 Using AbortController and AbortSignal objects in APIs for detailed instructions.

    This internal method accepts three arguments:

    origin
    -

    This argument is the relevant settings object's origin, as determined by the -calling create() implementation.

    -
    options +

    This argument is the relevant settings object's origin, as determined by the +calling create() implementation.

    +
    options

    This argument is a CredentialCreationOptions object whose options.publicKey member contains a PublicKeyCredentialCreationOptions object specifying the desired attributes of the to-be-created public key credential.

    sameOriginWithAncestors @@ -2582,7 +2650,7 @@

    Note: Invocation of this internal method indicates that it was allowed by permissions policy, which is evaluated at the [CREDENTIAL-MANAGEMENT-1] level. See § 5.9 Permissions Policy integration.

    -

    Note: This algorithm is synchronous: the Promise resolution/rejection is handled by navigator.credentials.create().

    +

    Note: This algorithm is synchronous: the Promise resolution/rejection is handled by navigator.credentials.create().

    Note: All BufferSource objects used in this algorithm must be snapshotted when the algorithm begins, to avoid potential synchronization issues. The algorithm implementations should get a copy of the bytes held by the buffer source and use that copy for relevant portions of the algorithm.

    @@ -2594,15 +2662,21 @@

    If sameOriginWithAncestors is false:

    1. -

      If the relevant global object, as determined by the calling create() implementation, does not have transient activation:

      +

      If options.mediation is present with the value conditional:

      +
        +
      1. +

        Throw a "NotAllowedError" DOMException

        +
      +
    2. +

      If the relevant global object, as determined by the calling create() implementation, does not have transient activation:

      1. -

        Throw a "NotAllowedError" DOMException.

        +

        Throw a "NotAllowedError" DOMException.

    3. Consume user activation of the relevant global object.

    -

    NOTE: The client SHOULD make it clear to the user in the case where the origin that is creating a credential is different from the top-level origin of the relevant global object (i.e., is a +

    NOTE: The client SHOULD make it clear to the user in the case where the origin that is creating a credential is different from the top-level origin of the relevant global object (i.e., is a different origin than the user can see in the address bar).

  • Let pkOptions be the value of options.publicKey.

    @@ -2615,14 +2689,14 @@

    If the length of pkOptions.user.id is not between 1 and 64 bytes (inclusive) then throw a TypeError.

  • -

    Let callerOrigin be origin. If callerOrigin is an opaque origin, throw a "NotAllowedError" DOMException.

    +

    Let callerOrigin be origin. If callerOrigin is an opaque origin, throw a "NotAllowedError" DOMException.

  • Let effectiveDomain be the callerOrigin’s effective domain. If effective domain is not a valid domain, then throw a -"SecurityError" DOMException.

    -

    Note: An effective domain may resolve to a host, which can be represented in various manners, +"SecurityError" DOMException.

    +

    Note: An effective domain may resolve to a host, which can be represented in various manners, such as domain, ipv4 address, ipv6 address, opaque host, or empty host. - Only the domain format of host is allowed here. This is for simplification and also + Only the domain format of host is allowed here. This is for simplification and also is in recognition of various issues with using direct IP address identification in concert with PKI-based security.

  • @@ -2631,14 +2705,14 @@

    is present
    -

    If pkOptions.rp.id is not a -registrable domain suffix of and is not equal to effectiveDomain, throw a "SecurityError" DOMException.

    +

    If pkOptions.rp.id is not a +registrable domain suffix of and is not equal to effectiveDomain, throw a "SecurityError" DOMException.

    Is not present

    Set pkOptions.rp.id to effectiveDomain.

  • Note: pkOptions.rp.id represents the - caller’s RP ID. The RP ID defaults to being the caller’s origin's effective domain unless the caller has explicitly set pkOptions.rp.id when calling create().

    + caller’s RP ID. The RP ID defaults to being the caller’s origin's effective domain unless the caller has explicitly set pkOptions.rp.id when calling create().

  • Let credTypesAndPubKeyAlgs be a new list whose items are pairs of PublicKeyCredentialType and a COSEAlgorithmIdentifier.

    @@ -2666,7 +2740,7 @@

    Append the pair of current.type and alg to credTypesAndPubKeyAlgs.

    -

    If credTypesAndPubKeyAlgs is empty, throw a "NotSupportedError" DOMException.

    +

    If credTypesAndPubKeyAlgs is empty, throw a "NotSupportedError" DOMException.

  • Let clientExtensions be a new map and let authenticatorExtensions be a new map.

    @@ -2717,6 +2791,15 @@

    Let authenticators represent a value which at any given instant is a set of client platform-specific handles, where each item identifies an authenticator presently available on this client platform at that instant.

    Note: What qualifies an authenticator as "available" is intentionally unspecified; this is meant to represent how authenticators can be hot-plugged into (e.g., via USB) or discovered (e.g., via NFC or Bluetooth) by the client by various mechanisms, or permanently built into the client.

    +
  • +

    If options.mediation is present with the value conditional:

    +
      +
    1. +

      If the user agent has not recently mediated an authentication, the origin of said authentication is not callerOrigin, or the user +does not consent to this type of credential creation, throw a "NotAllowedError" DOMException.

      +

      It is up to the user agent to decide when it believes an authentication ceremony has +been completed. That authentication ceremony MAY be performed via other means than the Web Authentication API.

      +
  • Consider the value of hints and craft the user interface accordingly, as the user-agent sees fit.

  • @@ -2730,7 +2813,7 @@

    For each authenticator in issuedRequests invoke the authenticatorCancel operation on authenticator and remove authenticator from issuedRequests.

    If the user exercises a user agent user-interface option to cancel the process,
    -

    For each authenticator in issuedRequests invoke the authenticatorCancel operation on authenticator and remove authenticator from issuedRequests. Throw a "NotAllowedError" DOMException.

    +

    For each authenticator in issuedRequests invoke the authenticatorCancel operation on authenticator and remove authenticator from issuedRequests. Throw a "NotAllowedError" DOMException.

    If options.signal is present and aborted,

    For each authenticator in issuedRequests invoke the authenticatorCancel operation on authenticator and remove authenticator from issuedRequests. Then throw the options.signal’s abort reason.

    @@ -2797,15 +2880,21 @@

    is set to required
    -

    Let userVerification be true.

    +
      +
    1. +

      If options.mediation is set to conditional and user verification cannot be collected during the ceremony, +throw a ConstraintError DOMException.

      +
    2. +

      Let userVerification be true.

      +
    is set to preferred

    If the authenticator

    -
    is capable of user verification +
    is capable of user verification

    Let userVerification be true.

    -
    is not capable of user verification +
    is not capable of user verification

    Let userVerification be false.

    @@ -2818,7 +2907,7 @@

    is set to enterprise
    -

    Let enterpriseAttestationPossible be true if the user agent wishes to support enterprise attestation for pkOptions.rp.id (see Step 8, above). Otherwise false.

    +

    Let enterpriseAttestationPossible be true if the user agent wishes to support enterprise attestation for pkOptions.rp.id (see step 8, above). Otherwise false.

    otherwise

    Let enterpriseAttestationPossible be false.

    @@ -2846,11 +2935,9 @@

  • Otherwise, Append C to excludeCredentialDescriptorList.

    -
  • - -

    Invoke the authenticatorMakeCredential operation on authenticator with clientDataHash, pkOptions.rp, pkOptions.user, requireResidentKey, userVerification, credTypesAndPubKeyAlgs, excludeCredentialDescriptorList, enterpriseAttestationPossible, attestationFormats, - and authenticatorExtensions as parameters.

    +
  • Invoke the authenticatorMakeCredential operation on authenticator with clientDataHash, pkOptions.rp, pkOptions.user, requireResidentKey, userVerification, credTypesAndPubKeyAlgs, excludeCredentialDescriptorList, enterpriseAttestationPossible, attestationFormats, + and authenticatorExtensions as parameters.
  • Append authenticator to issuedRequests.

    @@ -2875,14 +2962,14 @@

    For each remaining authenticator in issuedRequests invoke the authenticatorCancel operation on authenticator and remove it from issuedRequests.

  • -

    Throw an "InvalidStateError" DOMException.

    +

    Throw an "InvalidStateError" DOMException.

    Note: This error status is handled separately because the authenticator returns it only if excludeCredentialDescriptorList identifies a credential bound to the authenticator and the user has consented to the operation. Given this explicit consent, it is acceptable for this case to be -distinguishable to the Relying Party.

    +distinguishable to the Relying Party.

    If any authenticator returns an error status not equivalent to "InvalidStateError",

    Remove authenticator from issuedRequests.

    -

    Note: This case does not imply user consent for the operation, so details about the error are hidden from the Relying Party in order to prevent leak of potentially identifying information. See § 14.5.1 Registration Ceremony Privacy for +

    Note: This case does not imply user consent for the operation, so details about the error are hidden from the Relying Party in order to prevent leak of potentially identifying information. See § 14.5.1 Registration Ceremony Privacy for details.

    If any authenticator indicates success,
    @@ -2895,7 +2982,7 @@

    attestationObjectResult

    whose value is the bytes returned from the successful authenticatorMakeCredential operation.

    -

    Note: this value is attObj, as defined in § 6.5.5 Generating an Attestation Object.

    +

    Note: this value is attObj, as defined in § 6.5.4 Generating an Attestation Object.

    clientDataJSONResult

    whose value is the bytes of clientDataJSON.

    @@ -2920,12 +3007,12 @@

    If the aaguid in the attested credential data is 16 zero bytes, credentialCreationData.attestationObjectResult.fmt is "packed", and "x5c" is absent from credentialCreationData.attestationObjectResult, then self attestation is being used and no further action is needed.

  • -

    Otherwise

    +

    Otherwise:

    1. -

      Replace the aaguid in the attested credential data with 16 zero bytes.

      +

      Set the value of credentialCreationData.attestationObjectResult.fmt to "none", and set the value of credentialCreationData.attestationObjectResult.attStmt to be an empty CBOR map. (See § 8.7 None Attestation Statement Format and § 6.5.4 Generating an Attestation Object).

    2. -

      Set the value of credentialCreationData.attestationObjectResult.fmt to "none", and set the value of credentialCreationData.attestationObjectResult.attStmt to be an empty CBOR map. (See § 8.7 None Attestation Statement Format and § 6.5.5 Generating an Attestation Object).

      +

      If authenticator is not a platform authenticator then replace the aaguid in the attested credential data with 16 zero bytes.

    indirect @@ -2934,7 +3021,7 @@

    Anonymization CA).

    direct or enterprise
    -

    Convey the authenticator's AAGUID and attestation statement, unaltered, to the Relying Party.

    +

    Convey the authenticator's AAGUID and attestation statement, unaltered, to the Relying Party.

  • Let attestationObject be a new ArrayBuffer, created using global’s %ArrayBuffer%, containing the @@ -2942,7 +3029,7 @@

    Let id be attestationObject.authData.attestedCredentialData.credentialId.

  • -

    Let pubKeyCred be a new PublicKeyCredential object associated with global whose fields are:

    +

    Let pubKeyCred be a new PublicKeyCredential object associated with global whose fields are:

    [[identifier]]
    @@ -2963,9 +3050,9 @@

    [[transports]]

    A sequence of zero or more unique DOMStrings, in lexicographical order, that the authenticator is believed to support. The values SHOULD be members of AuthenticatorTransport, but client platforms MUST ignore unknown values.

    -

    If a user agent does not wish to divulge this information it MAY substitute an arbitrary sequence designed to preserve privacy. This sequence MUST still be valid, i.e. lexicographically sorted and free of duplicates. For example, it may use the empty sequence. Either way, in this case the user agent takes the risk that Relying Party behavior may be suboptimal.

    +

    If a user agent does not wish to divulge this information it MAY substitute an arbitrary sequence designed to preserve privacy. This sequence MUST still be valid, i.e. lexicographically sorted and free of duplicates. For example, it may use the empty sequence. Either way, in this case the user agent takes the risk that Relying Party behavior may be suboptimal.

    If the user agent does not have any transport information, it SHOULD set this field to the empty sequence.

    -

    Note: How user agents discover transports supported by a given authenticator is outside the scope of this specification, but may include information from an attestation certificate (for example [FIDO-Transports-Ext]), metadata communicated in an authenticator protocol such as CTAP2, or special-case knowledge about a platform authenticator.

    +

    Note: How user agents discover transports supported by a given authenticator is outside the scope of this specification, but may include information from an attestation certificate (for example [FIDO-Transports-Ext]), metadata communicated in an authenticator protocol such as CTAP2, or special-case knowledge about a platform authenticator.

    [[clientExtensionsResults]]
    @@ -2981,26 +3068,26 @@

  • -

    Throw a "NotAllowedError" DOMException. In order to prevent information leak that could identify the +

    Throw a "NotAllowedError" DOMException. In order to prevent information leak that could identify the user without consent, this step MUST NOT be executed before lifetimeTimer has expired. See § 14.5.1 Registration Ceremony Privacy for details.

    During the above process, the user agent SHOULD show some UI to the user to guide them in the process of selecting and -authorizing an authenticator.

    +authorizing an authenticator. When options.mediation is set to conditional, prominent modal UI should not be shown unless credential creation was previously consented to via means determined by the user agent.

  • 5.1.4. Use an Existing Credential to Make an Assertion - PublicKeyCredential’s [[Get]](options) Method

    -

    WebAuthn Relying Parties call navigator.credentials.get({publicKey:..., ...}) to -discover and use an existing public key credential, with the user’s consent. Relying Party script optionally specifies some criteria +

    WebAuthn Relying Parties call navigator.credentials.get({publicKey:..., ...}) to +discover and use an existing public key credential, with the user’s consent. Relying Party script optionally specifies some criteria to indicate what public key credential sources are acceptable to it. The client platform locates public key credential sources matching the specified criteria, and guides the user to pick one that the script will be allowed to use. The user may choose to -decline the entire interaction even if a public key credential source is present, for example to maintain privacy. If the user picks a public key credential source, the user agent then uses § 6.3.3 The authenticatorGetAssertion Operation to sign a Relying Party-provided challenge and other collected data into an authentication assertion, which is used as a credential.

    -

    The navigator.credentials.get() implementation [CREDENTIAL-MANAGEMENT-1] calls PublicKeyCredential.[[CollectFromCredentialStore]]() to collect any credentials that -should be available without user mediation (roughly, this specification’s authorization gesture), and if it does not find +decline the entire interaction even if a public key credential source is present, for example to maintain privacy. If the user picks a public key credential source, the user agent then uses § 6.3.3 The authenticatorGetAssertion Operation to sign a Relying Party-provided challenge and other collected data into an authentication assertion, which is used as a credential.

    +

    The navigator.credentials.get() implementation [CREDENTIAL-MANAGEMENT-1] calls PublicKeyCredential.[[CollectFromCredentialStore]]() to collect any credentials that +should be available without user mediation (roughly, this specification’s authorization gesture), and if it does not find exactly one of those, it then calls PublicKeyCredential.[[DiscoverFromExternalSource]]() to have the user select a public key credential source.

    Since this specification requires an authorization gesture to create any assertions, the PublicKeyCredential.[[CollectFromCredentialStore]](origin, options, sameOriginWithAncestors) internal method inherits the default behavior of Credential.[[CollectFromCredentialStore]](), of returning an empty set.

    In general, the user agent SHOULD show some UI to the user to guide them in selecting and authorizing an authenticator with which -to complete the operation. By setting options.mediation to conditional, Relying Parties can indicate that a prominent modal UI should not be shown unless credentials are discovered. Relying Party script SHOULD first check that isConditionalMediationAvailable() returns true in order to avoid -the possibility of causing a user-visible error to be returned if the user agent does not support conditional user mediation.

    -

    This navigator.credentials.get() operation can be aborted by leveraging the AbortController; +to complete the operation. By setting options.mediation to conditional, Relying Parties can indicate that a prominent modal UI should not be shown unless credentials are discovered. Relying Party script SHOULD first check that isConditionalMediationAvailable() returns true in order to avoid +the possibility of causing a user-visible error to be returned if the user agent does not support conditional user mediation.

    +

    This navigator.credentials.get() operation can be aborted by leveraging the AbortController; see DOM § 3.3 Using AbortController and AbortSignal objects in APIs for detailed instructions.

    5.1.4.1. PublicKeyCredential’s [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) Method
    @@ -3008,9 +3095,9 @@
    origin
    -

    This argument is the relevant settings object's origin, as determined by the -calling get() implementation, i.e., CredentialsContainer's Request a Credential abstract operation.

    -
    options +

    This argument is the relevant settings object's origin, as determined by the +calling get() implementation, i.e., CredentialsContainer's Request a Credential abstract operation.

    +
    options

    This argument is a CredentialRequestOptions object whose options.publicKey member contains a PublicKeyCredentialRequestOptions object specifying the desired attributes of the public key credential to discover.

    sameOriginWithAncestors @@ -3019,7 +3106,7 @@
    Note: Invocation of this internal method indicates that it was allowed by permissions policy, which is evaluated at the [CREDENTIAL-MANAGEMENT-1] level. See § 5.9 Permissions Policy integration.

    -

    Note: This algorithm is synchronous: the Promise resolution/rejection is handled by navigator.credentials.get().

    +

    Note: This algorithm is synchronous: the Promise resolution/rejection is handled by navigator.credentials.get().

    Note: All BufferSource objects used in this algorithm must be snapshotted when the algorithm begins, to avoid potential synchronization issues. The algorithm implementations should get a copy of the bytes held by the buffer source and use that copy for relevant portions of the algorithm.

    @@ -3030,13 +3117,13 @@
    publicKey.

  • -

    If options.mediation is present with the value conditional:

    +

    If options.mediation is present with the value conditional:

    1. Let credentialIdFilter be the value of pkOptions.allowCredentials.

    2. Set pkOptions.allowCredentials to empty.

      -

      Note: This prevents non-discoverable credentials from being used during conditional requests.

      +

      Note: This prevents non-discoverable credentials from being used during conditional requests.

    3. Set a timer lifetimeTimer to a value of infinity.

      Note: lifetimeTimer is set to a value of infinity so that the user has the entire lifetime of @@ -3056,14 +3143,14 @@

      origin. If callerOrigin is -an opaque origin, throw a "NotAllowedError" DOMException.

      +an opaque origin, throw a "NotAllowedError" DOMException.

    4. Let effectiveDomain be the callerOrigin’s effective domain. If effective domain is not a valid domain, then throw a -"SecurityError" DOMException.

      -

      Note: An effective domain may resolve to a host, which can be represented in various manners, +"SecurityError" DOMException.

      +

      Note: An effective domain may resolve to a host, which can be represented in various manners, such as domain, ipv4 address, ipv6 address, opaque host, or empty host. - Only the domain format of host is allowed here. This is for simplification and also is + Only the domain format of host is allowed here. This is for simplification and also is in recognition of various issues with using direct IP address identification in concert with PKI-based security.

    5. @@ -3071,11 +3158,11 @@
      rpId is not a registrable domain suffix of and is not -equal to effectiveDomain, throw a "SecurityError" DOMException.

      +

      If pkOptions.rpId is not a registrable domain suffix of and is not +equal to effectiveDomain, throw a "SecurityError" DOMException.

    6. Set rpId to pkOptions.rpId.

      -

      Note: rpId represents the caller’s RP ID. The RP ID defaults to being the caller’s origin's effective domain unless the caller has explicitly set pkOptions.rpId when calling get().

      +

      Note: rpId represents the caller’s RP ID. The RP ID defaults to being the caller’s origin's effective domain unless the caller has explicitly set pkOptions.rpId when calling get().

  • Let clientExtensions be a new map and let authenticatorExtensions be a new map.

    @@ -3143,14 +3230,22 @@
  • 5.1.4.2. Issuing a Credential Request to an Authenticator

    This sub-algorithm of [[DiscoverFromExternalSource]]() encompasses the specific UI context-independent -steps necessary for requesting a credential from a given authenticator, using given PublicKeyCredentialRequestOptions. -It is called by [[DiscoverFromExternalSource]]() from various points depending on which user mediation the present authentication ceremony is subject to (e.g.: conditional mediation).

    +steps necessary for requesting a credential from a given authenticator, using given PublicKeyCredentialRequestOptions. +It is called by [[DiscoverFromExternalSource]]() from various points depending on which user mediation the present authentication ceremony is subject to (e.g.: conditional mediation).

    This algorithm accepts the following arguments:

    -
    authenticator +
    authenticator
    -

    A client platform-specific handle identifying an authenticator presently available on this client platform.

    -
    savedCredentialIds +

    A client platform-specific handle identifying an authenticator presently available on this client platform.

    +
    savedCredentialIds
    -

    A map containing authenticatorcredential ID. This argument will be modified in this algorithm.

    -
    pkOptions +

    A map containing authenticatorcredential ID. This argument will be modified in this algorithm.

    +
    pkOptions

    This argument is a PublicKeyCredentialRequestOptions object specifying the desired attributes of the public key credential to discover.

    -
    rpId +
    rpId

    The request RP ID.

    -
    clientDataHash +
    clientDataHash

    The hash of the serialized client data represented by clientDataJSON.

    -
    authenticatorExtensions +
    authenticatorExtensions

    A map containing extension identifiers to the base64url encoding of the client extension processing output for authenticator extensions.

    @@ -3348,7 +3435,7 @@