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 authenticator attachment used during authentication to assertion payload #1668

Merged
merged 14 commits into from
Oct 7, 2021

Conversation

z11h
Copy link
Contributor

@z11h z11h commented Sep 8, 2021

This spec change adds the authenticator attachments (platform/cross-platform) used during authentication to the assertion payload returned from the browser to the RP.

Fixes: #1666

Also discussed in #1637


Preview | Diff

* add transport docs

* Update index.bs

Co-authored-by: Nina Satragno <[email protected]>

* Update index.bs

Co-authored-by: Nina Satragno <[email protected]>

* Update index.bs

Co-authored-by: Nina Satragno <[email protected]>

* Update index.bs

Co-authored-by: Nina Satragno <[email protected]>

Co-authored-by: zakaria ridouh <[email protected]>
Co-authored-by: Nina Satragno <[email protected]>
Copy link
Member

@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.

lgtm

@nadalin nadalin added this to the L3-WD-01 milestone Sep 8, 2021
@Firstyear
Copy link
Contributor

This field isn't part of the signed collected client data, so can't this be tampered with during the response? This may lead to failse assumptions of security/validity of this data. There is already a signed extension for this purpose, so how is this an improvement?

@agl
Copy link
Contributor

agl commented Sep 9, 2021

This field isn't part of the signed collected client data, so can't this be tampered with during the response?

The user-agent could "tamper" with it, yes. As with several other fields (including the transport list in the registration).

There is already a signed extension for this purpose, so how is this an improvement?

There's no extension defined for this but, even if we defined one, it wouldn't have any support from authenticators. An extension isn't needed for the motivating use here, which is allow a website to figure out whether to offer to register a platform authenticator.

@Firstyear
Copy link
Contributor

There's no extension defined for this but, even if we defined one, it wouldn't have any support from authenticators. An extension isn't needed for the motivating use here, which is allow a website to figure out whether to offer to register a platform authenticator.

If this is the case, it should be called a transportSelectionHint to make it extremely clear that it is not an enforceable security property. There have already been multiple instances of RP's implementing webauthn that have incorrectly assumed that criteria are security properties rather than UX hints, and I think we should improve this in the language we use for these values.

@agl
Copy link
Contributor

agl commented Sep 9, 2021

If this is the case, it should be called a transportSelectionHint to make it extremely clear that it is not an enforceable security property. There have already been multiple instances of RP's implementing webauthn that have incorrectly assumed that criteria are security properties rather than UX hints, and I think we should improve this in the language we use for these values.

I don't think we can save such RPs. We can't rename everything that exists and, if we start calling things transportAsReportedByTheBrowser then it suggests that the other values are coming from the authenticator!

@agl
Copy link
Contributor

agl commented Sep 9, 2021

Another point from the above: might RPs do silly things with this like decided that assertions over USB are ok but NFC aren't? If we're saying that the point is to determine platform vs not, might be spell this attachment=platform or attachment=cross-platform?

pull bot pushed a commit to jamlee-t/chromium that referenced this pull request Sep 16, 2021
This patch adds the transport used during authentication to the
assertion payload returned from the browser to the relying party
following a successful authentication.

Spec change: w3c/webauthn#1668

This feature is gated behind #enable-web-authentication-assertion-transport

Bug: 1243721

Change-Id: I90378d5a4b454f4180d020ed1e5c8fc63f2bf2d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3124587
Auto-Submit: zakaria ridouh <[email protected]>
Reviewed-by: Yutaka Hirano <[email protected]>
Reviewed-by: Ken Buchanan <[email protected]>
Reviewed-by: Rouslan Solomakhin <[email protected]>
Reviewed-by: Nina Satragno <[email protected]>
Reviewed-by: Liquan (Max) Gu <[email protected]>
Commit-Queue: Ken Buchanan <[email protected]>
Commit-Queue: zakaria ridouh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#921727}
@z11h z11h changed the title Add transport used during authentication to assertion payload Add platform attachment used during authentication to assertion payload Sep 16, 2021
@z11h z11h changed the title Add platform attachment used during authentication to assertion payload Add authenticator attachment used during authentication to assertion payload Sep 17, 2021
* transport to platform attachment

* pt2

* add section

* move authenticator attachment to public key credential

* slight changes

* slight changes

Co-authored-by: zakaria ridouh <[email protected]>
z11h and others added 2 commits September 21, 2021 16:23
Co-authored-by: Nina Satragno <[email protected]>
Co-authored-by: Emil Lundberg <[email protected]>
Copy link
Member

@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.

lgtm

@nadalin nadalin requested a review from equalsJeffH September 22, 2021 19:15
@equalsJeffH
Copy link
Contributor

on 2021-09-22 call:
various folks to re-review

Copy link
Contributor

@equalsJeffH equalsJeffH left a comment

Choose a reason for hiding this comment

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

I've reviewed and caught one link mistake I made (apologies). Also, these changes link to [[#sctn-attachments-from-transports]] and assume the suggestions I made in PR #1670 are accepted , but it seems @emlun hasn't had a chance to review that as yet.

So we can fix the link below, and then either (a) wait for @emlun to review #1670 and proceed per however that works out, or (b) merge this PR and then be prepared to revise things as necessary depending on how #1670 shakes out.

What do folks wish to do?

Co-authored-by: =JeffH <[email protected]>
@z11h
Copy link
Contributor Author

z11h commented Sep 27, 2021

@equalsJeffH: Since @emlun is in a different time zone, I'm fine waiting until he has a look at your comments on #1670 and we can sit on this PR until that PR shakes out and we'll go ahead and merge this, to prevent any dead links.

@emlun
Copy link
Member

emlun commented Oct 1, 2021

Thanks for your patience everyone! #1670 has now evolved to be mutually dependent on this PR, so I think it makes more sense to merge it into here instead of into #1621. I couldn't re-target the PR base branch though, because this branch is in https://github.com/z11h/webauthn, so I instead replaced #1670 with z11h#3.

emlun and others added 2 commits October 1, 2021 11:11
* Describe how to determine authenticator attachment from transports

* Accept @equalsJeffH's rewrite of #sctn-attachment-from-transports

Co-authored-by: =JeffH <[email protected]>

Co-authored-by: =JeffH <[email protected]>
@z11h
Copy link
Contributor Author

z11h commented Oct 1, 2021

@emlun, merged your branch onto my fork.

all comments have been resolved, PR is ready for another look :)

Copy link
Contributor

@equalsJeffH equalsJeffH left a comment

Choose a reason for hiding this comment

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

This is looking good @z11h & @emlun, thanks for merging PR #1670 into here. Upon review it seems having the new #sctn-attachments-from-transports section embedded in section 5.2, which is about authenticator responses, is odd because it describes client platform behavior that sets an attribute on the PublicKeyCredential interface. I suggest we move the new #sctn-attachments-from-transports section up into section 5.1, say as a peer to and after sctn-isUserVerifyingPlatformAuthenticatorAvailable (it'd now have only three hashs in its title).
WDYT?

Also, I suggest we use the existing term "authenticator transport" rather than introducing a new term "credential transport" (suggestions and a nit fix below).

Plus, we ought to have at least @nsatragno review the normative language we're adding here.

Copy link
Member

@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.

Still LGTM with a minor nit.

@z11h
Copy link
Contributor Author

z11h commented Oct 1, 2021

@nsatragno resolved.

@equalsJeffH great comments, I've reordered the sections, and agree that authenticator transport is a more fitting term.

@equalsJeffH
Copy link
Contributor

thanks @z11h, LGTM. If @emlun approves upon re-review we should be ready to merge :)

Copy link
Member

@emlun emlun left a comment

Choose a reason for hiding this comment

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

Sorry for the back-and-forth, but seeing it in its new context I don't think the new section (#sctn-attachments-from-transports) makes much sense anymore - the client (unlike an RP) doesn't need to "determine the attachment from the transports", it already knows the attachment. So rewriting the section for this new purpose, the "algorithm" would become something like:

If the authenticator

which seems pretty redundant since the §5.4.5. Authenticator Attachment Enumeration (enum AuthenticatorAttachment) section already defines the same mapping. So I think we can get rid of the new section entirely and just refer back to AuthenticatorAttachment. Here are some suggestions for that.

Copy link
Contributor Author

@z11h z11h left a comment

Choose a reason for hiding this comment

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

@emlun, proposal updated. :)

@z11h
Copy link
Contributor Author

z11h commented Oct 6, 2021

PR updated. :)

@equalsJeffH
Copy link
Contributor

equalsJeffH commented Oct 7, 2021

Actually, I think this is good enough for now (thanks for your patience @z11h & @nsatragno!) as of commit 6951078 and we ought to land this as-is.

If we wish to further clarify detail-level things that client devs need to be aware of (e.g., underlying platform not supplying transport info, so it's reported as null (as discussed briefly on today's webauthn call)), we ought to submit an issue and deal with it separately.

Copy link
Member

@emlun emlun left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for your patience everyone!

@nsatragno nsatragno merged commit 5227874 into w3c:main Oct 7, 2021
github-actions bot added a commit that referenced this pull request Oct 7, 2021
…payload (#1668)

SHA: 5227874
Reason: push, by @nsatragno

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to nsatragno/webauthn that referenced this pull request Oct 15, 2021
…payload (w3c#1668)

SHA: 5227874
Reason: push, by @nsatragno

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authenticator Attachment in Public Key Credential