RESOLVED FIXED 189642
[WebAuthN] Move time out control from WebProcess to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=189642
Summary [WebAuthN] Move time out control from WebProcess to UIProcess
Jiewen Tan
Reported 2018-09-14 18:33:43 PDT
Move time out control from WebProcess to UIProcess. Otherwise, we will have a duplicate time out controller in AuthenticatorManager.
Attachments
Patch (47.71 KB, patch)
2018-10-01 13:51 PDT, Jiewen Tan
no flags
Patch (48.59 KB, patch)
2018-10-03 18:28 PDT, Jiewen Tan
no flags
Radar WebKit Bug Importer
Comment 1 2018-09-14 18:35:33 PDT
Jiewen Tan
Comment 2 2018-09-21 21:58:59 PDT
When we finished this task, we could add tests that: 1) In makeCredential, we could have a test that have exclude credentials that have the same credential id as existing one but not transport. 2) No authenticators can be discovered.
Jiewen Tan
Comment 3 2018-09-22 22:36:33 PDT
3) Also, we could then add a test configuration to the discovery process to hide local authenticators.
Jiewen Tan
Comment 4 2018-09-27 15:35:04 PDT
4) Re-enable time out tests in: public-key-credential-create-failure.https.html, public-key-credential-get-failure.https.html.
Jiewen Tan
Comment 5 2018-10-01 13:51:55 PDT
Chris Dumez
Comment 6 2018-10-03 09:08:14 PDT
Comment on attachment 351295 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351295&action=review > Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h:38 > + std::optional<uint64_t> timeout; Web IDL is using "unsigned long" so the correct C++ type is "unsigned". > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:193 > + uint64_t timeOutInMsValue = 0; unsigned timeOutInMsValue = std::min(maxTimeOutValue, timeOutInMs.value_or(maxTimeOutValue)); > Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:199 > + m_requestTimeOutTimer = std::make_unique<Timer>([context = this]() mutable { What guarantees there is always one timer needed at a time in the UIProcess? What prevents the AuthenticaticatorManager to process several requests in parallel?
Jiewen Tan
Comment 7 2018-10-03 18:20:33 PDT
Comment on attachment 351295 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351295&action=review Thanks for reviewing the patch, Chris. >> Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.h:38 >> + std::optional<uint64_t> timeout; > > Web IDL is using "unsigned long" so the correct C++ type is "unsigned". Fixed. >> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:193 >> + uint64_t timeOutInMsValue = 0; > > unsigned timeOutInMsValue = std::min(maxTimeOutValue, timeOutInMs.value_or(maxTimeOutValue)); Sure. >> Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp:199 >> + m_requestTimeOutTimer = std::make_unique<Timer>([context = this]() mutable { > > What guarantees there is always one timer needed at a time in the UIProcess? What prevents the AuthenticaticatorManager to process several requests in parallel? In both AuthenticatorManager::makeCredential and AuthenticatorManager::getAssertion which are the only entrances that take requests will immediately invoke the request callback if there is an existing one as we enforce one request at a time.
Jiewen Tan
Comment 8 2018-10-03 18:28:44 PDT
Chris Dumez
Comment 9 2018-10-04 09:03:40 PDT
Comment on attachment 351572 [details] Patch r=me
Jiewen Tan
Comment 10 2018-10-04 12:05:38 PDT
(In reply to Chris Dumez from comment #9) > Comment on attachment 351572 [details] > Patch > > r=me Thanks, Chris.
WebKit Commit Bot
Comment 11 2018-10-04 12:32:22 PDT
Comment on attachment 351572 [details] Patch Clearing flags on attachment: 351572 Committed r236842: <https://trac.webkit.org/changeset/236842>
WebKit Commit Bot
Comment 12 2018-10-04 12:32:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.