RESOLVED FIXED Bug 182893
[WebAuthn] Require user gestures for LocalAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=182893
Summary [WebAuthn] Require user gestures for LocalAuthenticator
Jiewen Tan
Reported 2018-02-16 15:27:30 PST
Malicious sites could employ WebAuthN to bother users for requests to use biometrics infinitely. It would be nice to require user gestures to prevent such attacks.
Attachments
Patch (40.21 KB, patch)
2020-04-29 15:12 PDT, Jiewen Tan
no flags
Patch (38.39 KB, patch)
2020-04-29 15:30 PDT, Jiewen Tan
no flags
Patch (31.80 KB, patch)
2020-04-29 18:32 PDT, Jiewen Tan
no flags
Patch (31.80 KB, patch)
2020-04-29 18:33 PDT, Jiewen Tan
bfulgham: review+
ews-feeder: commit-queue-
Patch for landing (31.78 KB, patch)
2020-04-30 21:15 PDT, Jiewen Tan
no flags
Radar WebKit Bug Importer
Comment 1 2018-08-15 17:07:32 PDT
Yuriy Ackermann
Comment 2 2018-08-29 17:15:30 PDT
Authenticators must do TUP/UV before every operation. The only check you must do is when attestation returned and its set DIRECT, then you must obtain consent from the user to return it to the server. Biometrics authenticators block fingerprint after 5 tries per security requirements
Yuriy Ackermann
Comment 3 2018-08-29 17:17:00 PDT
Jiewen Tan
Comment 4 2018-08-31 13:56:28 PDT
(In reply to Yuriy Ackermann (FIDO Alliance) from comment #2) > Authenticators must do TUP/UV before every operation. The only check you > must do is when attestation returned and its set DIRECT, then you must > obtain consent from the user to return it to the server. > > Biometrics authenticators block fingerprint after 5 tries per security > requirements Thanks for your comment. I didn't see that user consent is needed for "DIRECT" attestation in the https://www.w3.org/TR/webauthn/ as of Aug 7th 2018. I know FireFox does this.
Jiewen Tan
Comment 5 2018-08-31 13:58:38 PDT
Besides user gesture, we might want to consider: 2) focus, if the requesting page has focus, 3) or even background tab.
Yuriy Ackermann
Comment 6 2018-09-01 04:37:25 PDT
As far as I know Chrome/Firefox are blocking secure API's if page is out of focus: > https://w3c.github.io/webauthn/#abortoperation > The visibility and focus state of the Window object determines whether the [[Create]](origin, options, sameOriginWithAncestors) and [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) operations should continue. When the Window object associated with the [Document loses focus, [[Create]](origin, options, sameOriginWithAncestors) and [[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors) operations SHOULD be aborted. Again, this has issues for softAuthenticatos, like SoftU2F, which obviously changes a focus and so causes API to fail. So need careful consideration
Jiewen Tan
Comment 7 2018-09-13 01:12:57 PDT
Another attach scenario could also be solved by requiring user gesture: https://www.w3.org/TR/webauthn/#sec-make-credential-privacy.
Jiewen Tan
Comment 8 2019-05-02 18:48:29 PDT
UserGesture is hard to be required for cross-platform authenticators as RPs nowadays like Google would not expect that. Instead, it should be required for our platform authenticators only. Will have a separate bug to add the check whether the document has focus. This though can be required for all, which also aligns with Chromium.
Jiewen Tan
Comment 9 2020-04-29 15:12:55 PDT
Jiewen Tan
Comment 10 2020-04-29 15:30:49 PDT
Jiewen Tan
Comment 11 2020-04-29 18:32:13 PDT
Jiewen Tan
Comment 12 2020-04-29 18:33:15 PDT
Brent Fulgham
Comment 13 2020-04-30 13:11:34 PDT
Comment on attachment 398016 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398016&action=review Looks good. r=me > Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:-1194 > - [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationLocalAuthenticatorExperimentalFeature()]; I assume these preferences are no longer needed, and this is just cleanup?
Jiewen Tan
Comment 14 2020-04-30 15:24:04 PDT
Comment on attachment 398016 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398016&action=review Thanks Brent for the r+. >> Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:-1194 >> - [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationLocalAuthenticatorExperimentalFeature()]; > > I assume these preferences are no longer needed, and this is just cleanup? No, I change the mock testing implementation such that it will have the feature enabled by default. In real environment, it is still a default off experimental feature.
EWS
Comment 15 2020-04-30 15:28:03 PDT
Tools/Scripts/svn-apply failed to apply attachment 398016 [details] to trunk. Please resolve the conflicts and upload a new patch.
Jiewen Tan
Comment 16 2020-04-30 21:15:00 PDT
Created attachment 398157 [details] Patch for landing
EWS
Comment 17 2020-04-30 21:43:33 PDT
Committed r260983: <https://trac.webkit.org/changeset/260983> All reviewed patches have been landed. Closing bug and clearing flags on attachment 398157 [details].
Note You need to log in before you can comment on or make changes to this bug.