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

Add "webauthn" autocomplete token #8006

Merged
merged 6 commits into from
Jun 16, 2022
Merged

Conversation

nsatragno
Copy link
Contributor

@nsatragno nsatragno commented Jun 13, 2022

Add a "webauthn" autocomplete token to display WebAuthn credentials through Conditional Mediation. This lets websites indicate that they want webauthn credentials ("passkeys") to show up in addition to username / passwords on autofill prompts.

Explainer

  • At least two implementers are interested (and none opposed):
    • Apple
    • Google (that's us filing the PR so yeah... we are interested)
    • MSFT has approved the webauthn side PR
  • Tests are written and can be reviewed and commented upon at:
    • Autocomplete tag parsing
    • Note: Integration testing this feature is very tricky and I'm not sure we'll be able to do it in a meaningful way. There is automation support for webauthn, but not for autocomplete. Right now, a WPT for autocomplete="webauthn" would fire a webauthn request which the automation support would resolve immediately. The request is indistinguishable from a regular webauthn request, so a browser not implementing the feature would pass.
  • Implementation bugs are filed:

Fixes #7999


/acknowledgements.html ( diff )
/form-control-infrastructure.html ( diff )
/infrastructure.html ( diff )
/references.html ( diff )

Add a "webauthn" autocomplete token to display WebAuthn credentials
through Conditional Mediation.

Fixes whatwg#7999
@nsatragno nsatragno marked this pull request as ready for review June 13, 2022 21:44
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 13, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test that was not
actually testing the contact category.

See whatwg/html#8006

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
@nsatragno
Copy link
Contributor Author

@domenic please take a look.

Thank you! ^_^

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 13, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test that was not
actually testing the contact category.

See whatwg/html#8006

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Is there an explainer for this feature in a bit more detail? I can't really understand why autocomplete is involved here, or why the autocompleted value would be something like "Tim Berners-Lee's phone credential" and why the string "Tim Berners-Lee's phone credential" would be treated like a password.

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
Copy link
Contributor Author

@nsatragno nsatragno left a comment

Choose a reason for hiding this comment

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

Is there an explainer for this feature in a bit more detail?

I'm not sure from your comment if you missed the explainer linked on the PR description or found it insufficient. I'll try answering below, and will update the explainer if it turns out we need more detail.

I can't really understand why autocomplete is involved here,

We want to solve the problem of transitioning from passwords to webauthn credentials ("passkeys"). Websites can't tell in advance if a user has webauthn credentials or not, so they make a "conditional" request that will only show credentials if the user has them. We want these credentials to be shown in the same autofill prompt as passwords & usernames because that's what users are used to. This way, websites don't have to change their existing sign-in UX to support webauthn credentials.

The webauthn autocomplete token lets the website say where they want to show webauthn credentials.

or why the autocompleted value would be something like "Tim Berners-Lee's phone credential"

On the autofill prompt, the browser will somehow show the user these webauthn credentials. The language is up to the user agent but will likely be something like:

Nina Satragno
Sign in with Pixel Imprint

I tried to communicate that without using the name of a specific product.

and why the string "Tim Berners-Lee's phone credential" would be treated like a password.

This is probably the trickiest detail to describe correctly -- if the user clicks on a webauthn credential the browser won't autofill anything. Instead, a pending webauthn request will resolve and presumably that will sign-in the user. I tried clarifying this point on the PR.

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 14, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

I'm not sure from your comment if you missed the explainer linked on the PR description or found it insufficient. I'll try answering below, and will update the explainer if it turns out we need more detail.

Sorry, I missed it! I appreciate the extra background regardless, and have now read it. I added some comments inline about how to best integrate this sort of thing into the spec infrastructure, IMO.

source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

OK, I like this approach. The remaining things are just editorial.

source Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
Copy link
Contributor Author

@nsatragno nsatragno left a comment

Choose a reason for hiding this comment

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

Thank you for your patient & detailed review! Comments addressed:

source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 16, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 16, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 16, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}
@domenic domenic merged commit eebb490 into whatwg:main Jun 16, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 22, 2022
…n", a=testonly

Automatic update from web-platform-tests
[webauthn] WPT for autocomplete="webauthn"

Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}

--

wpt-commits: 57933a8edb4f01c8b63435d7f08cbd8ba4efd32b
wpt-pr: 34410
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Jun 23, 2022
…n", a=testonly

Automatic update from web-platform-tests
[webauthn] WPT for autocomplete="webauthn"

Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}

--

wpt-commits: 57933a8edb4f01c8b63435d7f08cbd8ba4efd32b
wpt-pr: 34410
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
Add a web platform test for the "webauthn" autocomplete detail token.

Drive-by fix to the "contact category" bit of the test. The test
intended to exceed the maximum number of tokens for an autofill field
type of category "contact" [1], but used the field name "name" which
is of category "normal". Change "name" to "tel" which actually is of
category "contact".

See whatwg/html#8006

[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model

Bug: 1171985
Change-Id: Idfdee8447c5eaa6b4d5ab34249dee2c46b82ecec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3704319
Commit-Queue: Nina Satragno <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1014943}
NOKEYCHECK=True
GitOrigin-RevId: 817b6a79e3a8bc3b29044ced23a09b4be2ad115b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add support for WebAuthn's Conditional Mediation / Integration with autocomplete
2 participants