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

Clarify, simplify and align parameter descriptions #1621

Merged
merged 27 commits into from
Dec 15, 2021

Conversation

emlun
Copy link
Member

@emlun emlun commented Jun 13, 2021

Motivated by #1618, though I'm not sure this will fully resolve all the concerns there.

These parameter descriptions are the primary API documentation for Relying Parties, so this rewrite attempts to simplify the descriptions and clearer explain how to use them from an RP perspective. Also removes some unnecessary words and aligns some similar descriptions into more recognizable patterns.


Preview | Diff

emlun added 6 commits June 1, 2021 03:22
We already do this for UserVerificationRequirement values even though both types
are "non-exhaustive" enumerations for DOMString attributes.
These parameter descriptions are the primary API documentation for Relying
Parties, so this rewrites attempts to simplify the descriptions and clearer
explain how to use them from an RP perspective. Also removes some unnecessary
words and aligns some similar descriptions into more recognizable patterns.
@emlun emlun added this to the L3-WD-01 milestone Jun 13, 2021
@emlun emlun requested a review from equalsJeffH June 13, 2021 21:36
@emlun emlun self-assigned this Jun 13, 2021
@Firstyear
Copy link
Contributor

Looks good :)

index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
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.

Hi @emlun, thanks for taking on this gnarly complicated polishing! Overall it looks good, although I have several detail-level comments & suggestions.

An overall comment/suggestion is that we ought to define/circumscribe the difference between a "ceremony" and an "operation" and then use those terms consistently. Here's a back-of-the-envelope attempt:

A "ceremony" is the overall entire flow includes the user's actions, the UI the user interacts with, the RP's particular webauthn deployment approach, and the behavior of the webauthn-defined .create() / .get() operations (plus the "stack" underneath those operations (eg CTAP2 or a platform API+implementation)).

An "operation" is either a "registration operation" or "authentication operation" which are discrete invocations of .create() or .get(), including the marshalling of arguments and the subsequent evaluation of results.

Then in the below we may wish to use "operation" in some places where you're presently suggesting "ceremony".

Another item is that in various places we are using the term "user" where we actually mean "user account", and that creds are mapped to user accounts by RPs, via user handles. We ought to define "user account" in the terminology section.

index.bs Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@emlun emlun force-pushed the issue-1618-clarify-params branch from 5d354ef to 03becb6 Compare July 14, 2021 02:01
Co-authored-by: =JeffH <jdhodges@google.com>
@emlun emlun mentioned this pull request Jul 14, 2021
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 do not understand why you marked various comments below as "resolved" without incorporating the suggestion or offering rationale as to why not to incorporate the suggestion.

I'm away for an extended period and unable to split hairs over this, so do what you think is best.

@equalsJeffH equalsJeffH dismissed their stale review July 20, 2021 09:17

I'm away for an extended period and unable to split hairs over this, so do what you think is best.

@emlun
Copy link
Member Author

emlun commented Jul 21, 2021

I do not understand why you marked various comments below as "resolved" without incorporating the suggestion or offering rationale as to why not to incorporate the suggestion.

Sorry, my mistake. I'd resolved them locally but hadn't pushed the changes, I think I was waiting to see what happens in #1649 and base the continuation here on that. I'll go back and un-resolve them for now for proper bookkeeping.

Co-authored-by: =JeffH <jdhodges@google.com>
@equalsJeffH
Copy link
Contributor

Sorry, my mistake. I'd resolved them locally but hadn't pushed the changes, I think I was waiting to see what happens in #1649 and base the continuation here on that.

Ah, ok, thanks, that makes sense.

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.

LGTM, thx @emlun !

@equalsJeffH
Copy link
Contributor

is this waiting on @sbweeden ?

@emlun
Copy link
Member Author

emlun commented Aug 16, 2021

No, it's waiting on me. I'll update it within the next few days.

Co-authored-by: =JeffH <jdhodges@google.com>
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.

LGTM, thx @emlun!

Copy link
Contributor

@sbweeden sbweeden left a comment

Choose a reason for hiding this comment

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

A few minor comments to address/discuss, but overall looks really good. Thanks for the massive effort.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated
The value SHOULD be a member of {{AuthenticatorAttachment}} but [=client platforms=] MUST ignore unknown values,
treating an unknown value as if the [=map/exist|member does not exist=].

The [=[RP]=] can determine the resulting [=authenticator attachment modality|attachment=] for the created credential
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know that this is entirely true. My understanding is that the use of getTransports() will return all attachments supported by the authenticator that generated the credential - not just the particular transport used in this ceremony. There is a discussion in #1668 about potentially including a transport field in PublicKeyCredential for the purpose of determining the transport that was actually used.

Maybe the change here is just to reword to the plural attachments, as at the moment it reads as if it returns the singular transport that was used for the ceremony.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also a good point. I don't think we really clarify how one can determine the authenticator attachment(s) from the transports list, so it might be appropriate to introduce a small section on that. We already have §5.2.1.1. Easily accessing credential data as a subsection of the AuthenticatorAttestationResponse section, so another sibling subsection there seems reasonable. I think I'll do that as a meta-pull request into this one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in meta-PR #1670.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is good that #1670 adds an explanation of how getTransports() may be interpreted by the RP. That said, I don't think it addresses the original comment here, at least not always. If getTransports() returned a list, with one of those values being internal, and another being a different transport (such as the mobile phone as an authenticator use case), the RP cannot determine the resulting authenticator attachment modality for the created credential. This however could be determined with the proposal in #1668, which I think better addresses the use case of an RP trying to determine if a platform-bound credential has been created as part of this ceremony.

I am in favour of keeping the changes in #1670 to aid in the understanding of RPs interpretation and use of getTransports(), but I don't think that this section should attempt to claim that the getTransports() API is alone enough to determine the resulting authenticator attachment modality.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, looks like I missed that nuance in your first comment. getTransports() (if non-empty) is enough to determine the possible attachment options for the credential, but indeed it is not enough to determine the attachment used in this particular ceremony. So I agree that needs to be clearer. But perhaps an even better solution is to extend the proposal in issue #1666 and PR #1668 to apply to registration too?

Copy link
Contributor

Choose a reason for hiding this comment

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

To land this PR, we could just remove this section completely:

The [=[RP]=] can determine the resulting [=authenticator attachment modality|attachment=] for the created credential using the {{AuthenticatorAttestationResponse/getTransports()}} method of the resulting {{AuthenticatorAttestationResponse}}.
   See [[#enum-transport]] for details.

and let #1668 deal with the issue of deterministically allowing an RP to understand the attachment modality of an authenticator for a particular ceremony.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, yeah, that seems like a fair middle ground. We can keep #1670 open for tracking that we should add this back in once we have #1668 sorted.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking we need to resolve and land PRs #1668 and #1670 before landing this PR, and also before landing this PR we will need to revise this paragraph based on the final form of PRs #1668 and #1670.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that works too I guess. There's not really much reason to hurry to get this one merged.

Copy link
Contributor

@equalsJeffH equalsJeffH Nov 3, 2021

Choose a reason for hiding this comment

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

@sbweeden: Is this thread is now resolved given @emlun's having "...updated this to align with the new authenticatorAttachment property" ?

index.bs Show resolved Hide resolved
index.bs Show resolved Hide resolved
@equalsJeffH
Copy link
Contributor

on 2021-09-22 call:
@sbweeden asks about whether self-attstn is returned when the attstnConvyPref is "none" ...?
(because chrome behavior replaces the self-attstn with none?)
@emlun points out that close spec reading is that it is not required to replace self-attstn
@agl: the behavior @sbweeden is seeing is a "special case on MacOS" because (mumble). offhand present spec lang seems correct.
@sbweeden is thinking the behavior he is seeing is a chrome bug.
@emlun: will remove the offending section in this PR and land it (modulo further reviews by others)

@equalsJeffH
Copy link
Contributor

I could be wrong, but it seems this PR has not recently had a merge-from-main. Catching it up with the changes in the main branch would be helpful for reviewing it. thanks.

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 re-reviewed. Thanks again for taking on this large polishing task, it looks good. I found only a few nits for your consideration.

We ought to wait for PRs #1668 and #1670 to resolve and land before finishing and landing this, it seems.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated
The value SHOULD be a member of {{AuthenticatorAttachment}} but [=client platforms=] MUST ignore unknown values,
treating an unknown value as if the [=map/exist|member does not exist=].

The [=[RP]=] can determine the resulting [=authenticator attachment modality|attachment=] for the created credential
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking we need to resolve and land PRs #1668 and #1670 before landing this PR, and also before landing this PR we will need to revise this paragraph based on the final form of PRs #1668 and #1670.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
- Use terms "create()/get() operation" more instead of ceremony
- Align "extensions" description between create() and get() options
- Reference #sctn-credential-id-privacy-leak in allowCredentials description
- Tweak wordings a bit
@emlun
Copy link
Member Author

emlun commented Oct 14, 2021

Alright, with #1670 done I've updated this to align with the new authenticatorAttachment property, and with that I think this is close to done. I did find a few more opportunities for further polish, which I've added as meta-PR #1674 for easier review of those changes in isolation.

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.

LGTM @emlun, thanks again for this non-trivial polishing. ( I've one minor comment below )

index.bs Outdated Show resolved Hide resolved
Copy link
Contributor

@sbweeden sbweeden left a comment

Choose a reason for hiding this comment

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

Thanks Emlun - this looks good.

@YubicoDemo YubicoDemo merged commit bc87207 into main Dec 15, 2021
@equalsJeffH equalsJeffH deleted the issue-1618-clarify-params branch December 15, 2021 20:09
github-actions bot added a commit that referenced this pull request Dec 15, 2021
SHA: bc87207
Reason: push, by @YubicoDemo

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.

None yet

6 participants