-
Notifications
You must be signed in to change notification settings - Fork 172
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 to guarantee created resident key is actually received by RP in adverse networking conditions? #2038
Comments
This should be addressed by https://github.com/w3c/webauthn/wiki/Explainer:-WebAuthn-Report-API-explainer I'd also add that the RP should be using the same user handle which will prevent multiple credentials for the same account in the same authenticator. |
Oh good point about making sure the same This is what I implemented:
I guess I should fix this as an RP by:
|
Yes, that's correct |
Related to this problem -- at least Safari seems to completely ignore Edit: Issue is tracked here: https://bugs.webkit.org/show_bug.cgi?id=270553 |
How can I protect myself against a misbehaving authenticator that ignores Now the following scenario can happen which is even worse than the original issue. Namely account lockout for existing accounts:
|
Authenticators and clients are expected to be spec compliant. There is only so much that can be done at a spec level. Please ask these authenticator-specific questions via a developer/deployment channel (FIDO-DEV, Passkeys Developer, etc). |
To make a concrete proposal to The spec: The spec currently reads
Which gives the impression that implementing excludeCredentials is optional for authenticators. But I'd say it should be mandatory for client side discoverable credentials. Given that this overrides discoverable credentials that can lead to user lockout I think we should change the wording to SHALL NOT or MUST NOT. We should also make it clear that calling create without excludeCredentials can lead to lockout. Calling this an OPTIONAL list is maybe a bit too weak too? I think both the sections for RPs and for Authenticators could use a bit more guidance on this |
I've noticed that under adverse network conditions (very common on mobile phones; especially in rural areas) it can happen quite often that the
navigator.credentials.create
call succeeds but the credential never gets received by the RP and users end up with many "junk" resident keys in their Apple Keychain because of it. There seems to be no way to avoid this happening.excludeCredentials
is not an option as the RP isn't even aware that the credential is created. And the user is frustrated because they half of the time select the wrong passkey.Note this is an issue I have actually observed in the wild. (in this image only one of the two passkeys work. One was created whilst artificially throttling the network in Dev Tools, causing the credential to never be received by the RP)
How are RPs supposed to make this robust? My only solution so far is to drop the whole idea of allowing people to create resident credentials. Instead always opt for using server-side credentials.
There is also no way for the device that stores the credentials to know which credentials are valid and which not; so it can also not be fixed on that side.
Hypothetically I think perhaps a hybrid flow would be nice where a server-side credential can be "upgraded" to a resident one during the first
get()
call. Anything else seems to be prone to failure.create()
call; the credential is initially stored as a server side credential as credential idcid1
allowCredentials: [ cid1 ]
get()
call does the authenticator actually store the credential as resident key. And maybe we can signal in the response fromget()
that the key is now stored as residentget()
can be done withoutallowCredentials
Originally posted by @arianvp in #1569 (comment)
The text was updated successfully, but these errors were encountered: