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

How should the browser handle CredentialMediationRequirement for public key credentials? #566

Closed
leshi opened this issue Sep 14, 2017 · 4 comments
Assignees

Comments

@leshi
Copy link
Contributor

leshi commented Sep 14, 2017

CredentialRequestOptions in webauthn extends CredentialRequestOptions from CredMan. I'm reproducing it below for easy reference:

dictionary CredentialRequestOptions {
  CredentialMediationRequirement mediation = "optional";
};

enum CredentialMediationRequirement {
  "silent",
  "optional",
  "required"
};

I'm not sure how a WebAuthn implementation should handle the mediation parameter. It is not referenced at all in the WebAuthn spec. We should clarify this.

@balfanz
Copy link
Contributor

balfanz commented Sep 19, 2017

@jyasskin - can you advise here and assign back to @leshi or unassign?

@jyasskin
Copy link
Member

jyasskin commented Oct 3, 2017

Sorry it took me so long to look. I believe https://w3c.github.io/webappsec-credential-management/#algorithm-request takes complete charge of handling the mediation field. This handling uses a distinction between the [[CollectFromCredentialStore]] method (which webauthn doesn't override) and the [[DiscoverFromExternalSource]] method (which we do override).

Because we don't override [[CollectFromCredentialStore]], step 5.1 returns an empty list, so if the calling script passed "silent", step 5.4 returns null, while if they passed "optional" or "required", the algorithm proceeds to call [[DiscoverFromExternalSource]], where webauthn does all of its work.

It probably makes sense to clarify this in https://w3c.github.io/webauthn/#getAssertion, saying that navigator.credentials.get() lands here, and that by not-overriding [[CollectFromCredentialStore]] we've disabled unmediated get() calls.

@equalsJeffH
Copy link
Contributor

@jyasskin when you use the term "user" in the above, you mean the client-side webapp script?

jyasskin added a commit to jyasskin/webauthn that referenced this issue Oct 9, 2017
@jyasskin
Copy link
Member

@equalsJeffH Yep, edited to be more precise.

jyasskin added a commit to jyasskin/webauthn that referenced this issue Oct 10, 2017
jyasskin added a commit to jyasskin/webauthn that referenced this issue Oct 11, 2017
jyasskin added a commit to jyasskin/webauthn that referenced this issue Oct 11, 2017
equalsJeffH pushed a commit that referenced this issue Oct 12, 2017
…ks. (#611)

* Rewrite the "make an assertion" introduction to clarify how get() works.

Fixes #566.

* Fix equalsJeffH's comments.

* Clarify the "user may decline" sentence per equalsJeffH.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants