diff --git a/index.bs b/index.bs index 060d1b51e..e0820cbfa 100644 --- a/index.bs +++ b/index.bs @@ -58,6 +58,12 @@ Text Macro: WAA WebAuthn Authenticator Text Macro: WAC WebAuthn Client Text Macro: WRP WebAuthn Relying Party Text Macro: WRPS WebAuthn Relying Parties +Text Macro: CREATE-METHOD-ARGS (origin, options, sameOriginWithAncestors) +Text Macro: CREATE-METHOD [[Create]][CREATE-METHOD-ARGS] +Text Macro: CREATE-METHOD-DEF \[[Create]][CREATE-METHOD-ARGS] +Text Macro: DISCOVER-METHOD-ARGS (origin, options, sameOriginWithAncestors) +Text Macro: DISCOVER-METHOD [[DiscoverFromExternalSource]][DISCOVER-METHOD-ARGS] +Text Macro: DISCOVER-METHOD-DEF \[[DiscoverFromExternalSource]][DISCOVER-METHOD-ARGS] Ignored Vars: op, alg, type, algorithm 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 @@ -1009,7 +1015,7 @@ BCP 14 [[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capital : Client : [WAC] -:: Also referred to herein as simply a [=client=]. See also [=Conforming User Agent=]. A [=[WAC]=] is an intermediary entity typically implemented in the user agent (in whole, or in part). Conceptually, it underlies the [=Web Authentication API=] and embodies the implementation of the {{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)}} and {{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}} [=internal methods=]. It is responsible for both marshalling the inputs for the underlying [=authenticator operations=], and for returning the results of the latter operations to the [=Web Authentication API=]'s callers. +:: Also referred to herein as simply a [=client=]. See also [=Conforming User Agent=]. A [=[WAC]=] is an intermediary entity typically implemented in the user agent (in whole, or in part). Conceptually, it underlies the [=Web Authentication API=] and embodies the implementation of the {{PublicKeyCredential/[CREATE-METHOD]}} and {{PublicKeyCredential/[DISCOVER-METHOD]}} [=internal methods=]. It is responsible for both marshalling the inputs for the underlying [=authenticator operations=], and for returning the results of the latter operations to the [=Web Authentication API=]'s callers. The [=[WAC]=] runs on, and is distinct from, a [=[WAC] Device=]. @@ -1703,7 +1709,7 @@ that are returned to the caller when a new credential is created, or a new asser {{PublicKeyCredential}}'s [=interface object=] inherits {{Credential}}'s implementation of {{Credential/[[CollectFromCredentialStore]](origin, options, sameOriginWithAncestors)}}, and defines its own -implementation of each of {{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)}}, {{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}}, and +implementation of each of {{PublicKeyCredential/[CREATE-METHOD]}}, {{PublicKeyCredential/[DISCOVER-METHOD]}}, and {{PublicKeyCredential/[[Store]](credential, sameOriginWithAncestors)}}. Calling {{CredentialsContainer}}'s {{CredentialsContainer/preventSilentAccess()}} method @@ -1733,11 +1739,10 @@ To support obtaining assertions via {{CredentialsContainer/get()|navigator.crede -### Create a New Credential - PublicKeyCredential's `[[Create]](origin, options, sameOriginWithAncestors)` Method ### {#sctn-createCredential} +### Create a New Credential - PublicKeyCredential's [CREATE-METHOD-DEF] Internal Method ### {#sctn-createCredential} -
|pkOptions|.{{PublicKeyCredentialCreationOptions/user}}.{{PublicKeyCredentialUserEntity/id}}
is not between 1 and 64 bytes (inclusive) then throw a {{TypeError}}.
-1. Let |callerOrigin| be {{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)/origin}}. If |callerOrigin| is an [=opaque origin=], throw a "{{NotAllowedError}}" {{DOMException}}.
+1. Let |callerOrigin| be {{PublicKeyCredential/[CREATE-METHOD]/origin}}. If |callerOrigin| is an [=opaque origin=], throw a "{{NotAllowedError}}" {{DOMException}}.
1. Let |effectiveDomain| be the |callerOrigin|'s [=effective domain=].
If [=effective domain=] is not a [=valid domain=], then throw a
@@ -1916,11 +1921,11 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
:: The [=ascii serialization of an origin|serialization of=] |callerOrigin|.
: {{CollectedClientData/crossOrigin}}
:: The inverse of the value of the
- {{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)/sameOriginWithAncestors}}
+ {{PublicKeyCredential/[CREATE-METHOD]/sameOriginWithAncestors}}
argument passed to this [=internal method=].
: {{CollectedClientData/topOrigin}}
:: The [=ascii serialization of an origin|serialization of=] |callerOrigin|'s [=top-level origin=] if
- the {{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)/sameOriginWithAncestors}}
+ the {{PublicKeyCredential/[CREATE-METHOD]/sameOriginWithAncestors}}
argument passed to this [=internal method=] is [FALSE], else `undefined`.
1. Let |clientDataJSON| be the [=JSON-compatible serialization of client data=] constructed from |collectedClientData|.
@@ -2296,7 +2301,7 @@ The following [=simple exceptions=] can be raised:
navigator.credentials.get({publicKey:..., ...})
to
discover and use an existing [=public key credential=], with the [=user consent|user's consent=]. [=[RP]=] script optionally specifies some criteria
@@ -2310,12 +2315,13 @@ decline the entire interaction even if a [=public key credential source=] is pre
The {{CredentialsContainer/get()|navigator.credentials.get()}} implementation [[!CREDENTIAL-MANAGEMENT-1]] calls
PublicKeyCredential.{{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.{{PublicKeyCredential/[[DiscoverFromExternalSource]]()}}
to have
+exactly one of those, it then calls PublicKeyCredential.{{PublicKeyCredential/[DISCOVER-METHOD]}}
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]]()|Credential.[[CollectFromCredentialStore]]()}}, of returning an empty set.
+Since this specification requires an [=authorization gesture=] to create any [=assertions=],
+{{PublicKeyCredential}} inherits the default behavior of
+{{Credential/[[CollectFromCredentialStore]](origin, options, sameOriginWithAncestors)}}, of returning an empty set.
+{{PublicKeyCredential}}'s implementation of {{PublicKeyCredential/[DISCOVER-METHOD]}} is specified in the next section.
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|.{{CredentialRequestOptions/mediation}}
to {{CredentialMediationRequirement/conditional}}, [=[RPS]=] can indicate that a prominent modal UI should not be shown unless credentials are discovered.
@@ -2328,13 +2334,13 @@ Any
{{CredentialsContainer/get()|navigator.credentials.get()}} operation can be aborted by leveraging the {{AbortController}};
see [[dom#abortcontroller-api-integration]] for detailed instructions.
-#### PublicKeyCredential's \[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)
Method #### {#sctn-discover-from-external-source}
+#### PublicKeyCredential's [DISCOVER-METHOD-DEF]
Internal Method #### {#sctn-discover-from-external-source}
-iframe
elements ## {#sctn-iframe-guidance}
The [=Web Authentication API=] is disabled by default in cross-origin <{iframe}>s.
-To override this default policy and indicate that a cross-origin <{iframe}> is allowed to invoke the [=Web Authentication API=]'s {{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}} method, specify the <{iframe/allow}> attribute on the <{iframe}> element and include the [=publickey-credentials-get-feature|publickey-credentials-get=]
feature-identifier token in the <{iframe/allow}> attribute's value.
+To override this default policy and indicate that a cross-origin <{iframe}> is allowed to invoke the [=Web Authentication API=]'s {{PublicKeyCredential/[DISCOVER-METHOD]}} method, specify the <{iframe/allow}> attribute on the <{iframe}> element and include the [=publickey-credentials-get-feature|publickey-credentials-get=]
feature-identifier token in the <{iframe/allow}> attribute's value.
[=[RPS]=] utilizing the WebAuthn API in an embedded context should review [[#sctn-seccons-visibility]] regarding [=UI redressing=] and its possible mitigations.
@@ -7573,10 +7578,10 @@ However, [=authenticators=] that do not utilize [[!FIDO-CTAP]] do not necessaril
1. Set {{AuthenticationExtensionsLargeBlobOutputs/supported}} to [TRUE].
Note: This is in anticipation of an authenticator capable of storing large blobs becoming available.
- It occurs during extension processing in [step 12](#CreateCred-process-extensions) of {{PublicKeyCredential/[[Create]]()}}.
+ It occurs during extension processing in [step 12](#CreateCred-process-extensions) of {{PublicKeyCredential/[CREATE-METHOD]}}.
The {{AuthenticationExtensionsLargeBlobOutputs}} will be abandoned if no satisfactory authenticator becomes available.
- 1. If a [=create/candidate authenticator=] becomes available ([step 21](#CreateCred-async-loop) of {{PublicKeyCredential/[[Create]]()}}) then,
+ 1. If a [=create/candidate authenticator=] becomes available ([step 21](#CreateCred-async-loop) of {{PublicKeyCredential/[CREATE-METHOD]}}) then,
before evaluating any |options|
, [=iteration/continue=] (i.e. ignore the [=create/candidate authenticator=])
if the [=create/candidate authenticator=] is not capable of storing large blobs.
1. Otherwise (i.e. {{AuthenticationExtensionsLargeBlobInputs/support}} is absent or has the value {{LargeBlobSupport/preferred}}):
@@ -7590,7 +7595,7 @@ However, [=authenticators=] that do not utilize [[!FIDO-CTAP]] do not necessaril
1. Return a {{DOMException}} whose name is “{{NotSupportedError}}”.
1. If {{AuthenticationExtensionsLargeBlobInputs/read}} is present and has the value [TRUE]:
1. Initialize the [=client extension output=], {{AuthenticationExtensionsClientOutputs/largeBlob}}.
- 1. If any authenticator indicates success (in {{PublicKeyCredential/[[DiscoverFromExternalSource]]()}}), attempt to read any largeBlob data associated with the asserted credential.
+ 1. If any authenticator indicates success (in {{PublicKeyCredential/[DISCOVER-METHOD]}}), attempt to read any largeBlob data associated with the asserted credential.
1. If successful, set {{AuthenticationExtensionsLargeBlobOutputs/blob}} to the result.
Note: if the read is not successful, {{AuthenticationExtensionsClientOutputs/largeBlob}} will be present in {{AuthenticationExtensionsClientOutputs}} but the {{AuthenticationExtensionsLargeBlobOutputs/blob}} member will not be present.
@@ -8853,7 +8858,7 @@ These recommendations serve to prevent an adversary with physical access to an [
### Registration Ceremony Privacy ### {#sctn-make-credential-privacy}
In order to protect users from being identified without [=user consent|consent=], implementations of the
-{{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)}} method need to take care to not leak information that
+{{PublicKeyCredential/[CREATE-METHOD]}} method need to take care to not leak information that
could enable a malicious [=[WRP]=] to distinguish between these cases, where "excluded" means that at least one of the [=public key
credential|credentials=] listed by the [=[RP]=] in {{PublicKeyCredentialCreationOptions/excludeCredentials}} is [=bound credential|bound=] to the
[=authenticator=]:
@@ -8876,7 +8881,7 @@ leaked.
### Authentication Ceremony Privacy ### {#sctn-assertion-privacy}
In order to protect users from being identified without [=user consent|consent=], implementations of the
-{{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}} method need to take care to not
+{{PublicKeyCredential/[DISCOVER-METHOD]}} method need to take care to not
leak information that could enable a malicious [=[WRP]=] to distinguish between these cases, where "named" means that the [=public
key credential|credential=] is listed by the [=[RP]=] in {{PublicKeyCredentialRequestOptions/allowCredentials}}: