Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend duration of challenge validity #1855

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 26 additions & 22 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1736,17 +1736,9 @@ When this method is invoked, the user agent MUST execute the following algorithm
|lifetimeTimer| to this adjusted value. If <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/timeout}}</code> is not
present, then set |lifetimeTimer| to a [=client=]-specific default.

Recommended ranges and defaults for <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/timeout}}</code> are as follows.
If <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}}</code>
<dl class="switch">
: is set to {{UserVerificationRequirement/discouraged}}
:: Recommended range: 30000 milliseconds to 180000 milliseconds.
:: Recommended default value: 120000 milliseconds (2 minutes).

: is set to {{UserVerificationRequirement/required}} or {{UserVerificationRequirement/preferred}}
:: Recommended range: 30000 milliseconds to 600000 milliseconds.
:: Recommended default value: 300000 milliseconds (5 minutes).
</dl>
See the [=recommended ranges and defaults for a WebAuthn ceremony timeout=]
for guidance on deciding a reasonable range and default for <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/timeout}}</code>,
depending on the value of <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}}</code>.

Note: The user agent should take cognitive guidelines into considerations regarding timeout for users with special needs.

Expand Down Expand Up @@ -2232,17 +2224,9 @@ When this method is invoked, the user agent MUST execute the following algorithm
Set a timer |lifetimeTimer| to this adjusted value. If <code>|pkOptions|.{{PublicKeyCredentialRequestOptions/timeout}}</code>
is not present, then set |lifetimeTimer| to a [=client=]-specific default.

Recommended ranges and defaults for <code>|pkOptions|.{{PublicKeyCredentialRequestOptions/timeout}}</code> are as follows.
If <code>|pkOptions|.{{PublicKeyCredentialRequestOptions/userVerification}}</code>
<dl class="switch">
: is set to {{UserVerificationRequirement/discouraged}}
:: Recommended range: 30000 milliseconds to 180000 milliseconds.
:: Recommended default value: 120000 milliseconds (2 minutes).

: is set to {{UserVerificationRequirement/required}} or {{UserVerificationRequirement/preferred}}
:: Recommended range: 30000 milliseconds to 600000 milliseconds.
:: Recommended default value: 300000 milliseconds (5 minutes).
</dl>
See the [=recommended ranges and defaults for a WebAuthn ceremony timeout=]
for guidance on deciding a reasonable range and default for <code>|pkOptions|.{{PublicKeyCredentialRequestOptions/timeout}}</code>,
depending on the value of <code>|pkOptions|.{{PublicKeyCredentialRequestOptions/userVerification}}</code>.

Note: The user agent should take cognitive guidelines into considerations regarding timeout for users with special needs.

Expand Down Expand Up @@ -8068,6 +8052,9 @@ upon a client's behavior, e.g., the [=[RP]=] SHOULD store the challenge temporar
until the operation is complete. Tolerating a mismatch will compromise the security
of the protocol.

Challenges SHOULD be valid for a duration similar to the
upper limit of the [=recommended ranges and defaults for a WebAuthn ceremony timeout=].

In order to prevent replay attacks, the challenges MUST contain enough entropy to make guessing them infeasible. Challenges SHOULD
therefore be at least 16 bytes long.

Expand Down Expand Up @@ -8501,8 +8488,25 @@ as discussed in [[#sctn-username-enumeration]].

[=[RPS]=], at [=registration=] time, SHOULD provide affordances for users to complete future [=authorization gestures=] correctly. This could involve naming the authenticator, choosing a picture to associate with the device, or entering freeform text instructions (e.g., as a reminder-to-self).


## Recommended Ranges for Ceremony Timeouts ## {#sctn-timeout-recommended-ranges}

[=Ceremonies=] relying on timing, e.g., a [=registration ceremony=] (see {{PublicKeyCredentialCreationOptions/timeout}}) or an [=authentication ceremony=] (see {{PublicKeyCredentialRequestOptions/timeout}}), ought to follow [[!WCAG21]]'s [Guideline 2.2 Enough Time](https://www.w3.org/TR/WCAG21/#enough-time). If a [=client platform=] determines that a [=[RP]=]-supplied timeout does not appropriately adhere to the latter [[!WCAG21]] guidelines, then the [=client platform=] MAY adjust the timeout accordingly.

The <dfn>recommended ranges and defaults for a WebAuthn ceremony timeout</dfn> are as follows:

If the [=[RP]=]'s [=user verification=] preference for the ceremony is

<dl class="switch">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #1885 where I am proposing adjusting these ranges.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to account for the changes in #1885.

: {{UserVerificationRequirement/discouraged}}:
:: Recommended range: 30000 milliseconds to 180000 milliseconds.
:: Recommended default value: 120000 milliseconds (2 minutes).

: {{UserVerificationRequirement/required}}, {{UserVerificationRequirement/preferred}}, or unspecified:
:: Recommended range: 30000 milliseconds to 600000 milliseconds.
:: Recommended default value: 300000 milliseconds (5 minutes).
</dl>


# Acknowledgements # {#sctn-acknowledgements}
We thank the following people for their reviews of, and contributions to, this specification:
Expand Down