Authentication with TrustKey device fails depending on the order of credentials in allowCredentials
Categories
(Core :: DOM: Web Authentication, defect, P2)
Tracking
()
People
(Reporter: pgadmin, Assigned: jschanck)
References
Details
Steps to reproduce:
With nightly 114 2023-05-01, I try to register a Yubikey without PIN.
Actual results:
This used to work some days ago with nightly; now NS_OK exception is thrown.
Expected results:
Registering Yubikey with PIN and a Trustkey with fingerprint still works fine, but Yubikey without PIN is broken mpw.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Security' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Could you try the latest Nightly build? If it's still not working, could you try registering on https://webauthn.io with each of the "User Verification" settings listed under "Advanced Settings", and let me know which fail.
Reporter | ||
Comment 3•2 years ago
|
||
Registering of all three keys succeeds in FF114 2023-05-04 now.
Authentication results:
- Yubikey with pin: Success with both UV settings as expected
- Yubikey without pin: Succeeds with both UV settings, I'd expect it to fail when UV=required (Chrome says "This SK cant be used on this website"), The UV flag is signaled correctly so I can handle it.
- Trustkey with FP fails in both UV settings with "DOMException: The operation failed for an unknown transient reason"
Checking the trustkey against webauthn.io, the key works fine, so I digged deeper, and I discovered that it depends on the order in which the keys were registered (i.e. the order in PublicKeyCredentialRequestOptions.allowCredentials):
- Yubikey/Yubikey+PIN/Trustkey -> Trustkey won't authenticate
- Trustkey/Yubikey/Yubikey+PIN-> All keys authenticate
Assignee | ||
Comment 4•2 years ago
|
||
Thanks! Some tokens accept a (very) limited number of credentials in the allowlist. So I suspect that's the issue here. We are working on a fix in authenticator-rs #254.
Reporter | ||
Comment 5•2 years ago
|
||
It's not a token problem: Chrome will work with the same set of allowed creds just fine.
A remark about handling of multiple tokens plugged in:
Chrome is handling this much smoother. with UV discouraged, it will take use the token I touch just fine. In case UV was required, the Yubikey with PIN will ask for the PIN, and require a second touch. Yubikey without will be rejected as not suitable for the website.
IMHO this is much more user friendly than asking for token selection.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
msirringhaus' patch (authenticator-rs #254) has landed in Nightly. Can you check whether registering two YubiKeys and then the Trustkey works now?
Reporter | ||
Comment 7•2 years ago
|
||
I checked with latest Nightly (2023-05-17), the problem is still present:
Yubikey w/o PIN, Yubikey w/pin, Trustkey freshly registered, both Yubikeys will authenticate, Trustkey won't.
Reporter | ||
Comment 8•2 years ago
|
||
I repeated the test reduced:
Registered Yubikey (with or without PIN won't matter) and then Trustkey, Yubikey will work fine, Trustkey will throw DOMException unknown transient reason (both UV required and discouraged).
So apparently biometrics is working on the first key only.
Assignee | ||
Comment 9•2 years ago
|
||
Thanks, I'll re-open the bug.
Does the Trustkey collect a fingerprint before the failure? Or does the request fail immediately?
Reporter | ||
Comment 10•2 years ago
|
||
The Trustkey blinks according to UV required or discouraged, FF will fail after the touch.
Reporter | ||
Comment 11•2 years ago
|
||
Problem is still present in FF116 2023-06-13: Trustkey works only if first in list of keys.
Assignee | ||
Comment 12•2 years ago
|
||
I'm self-assigning to keep this on my radar. We will have some better tools for debugging this in an upcoming release.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•1 years ago
|
Assignee | ||
Comment 13•1 years ago
|
||
Can you test FF119?
Reporter | ||
Comment 14•1 years ago
|
||
With 119.0a1 (2023-08-30), the problem still persists.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 15•1 year ago
|
||
There is another potential fix in Nightly 122. Can you give that a try?
Reporter | ||
Comment 16•1 year ago
|
||
Still not working correctly with 122.0a1 (2023-11-30) , but I do have new findings, because I checked with another key as well.
YK: Yubikey 5NFC without PIN
TK: Trustkey G310 with Fingerprint
NK: Nitrokey K51T without PIN
TK YK NK --> ok
TK NK YK -> ok
NK TK YK -> ok
YK TK NK -> not ok
So the problem is triggered when the Yubikey is registered before the Trustkey, the Nitrokey doesn't interfere.
If Yubikey is registered before Trustkey, UV isn't requested correctly (Trustkey blinks "no FP required", so no wonder this will fail with "DOMException: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission"). But even with UV not required, the Trustkey will fail with the same DOMException.
FWIW, Chrome 119 behaves even worse: UV is requested correctly, but Trustkey will fail ALWAYS, not matter if registered before or after the Yubikey.
All situations are resolved when the Yubikey is removed.
Reporter | ||
Comment 17•1 year ago
|
||
Just checked with FF120.0: Works exactly like FF122 Nightly.
Description
•