Summary: | [WebAuthN] Move time out control from WebProcess to UIProcess | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jiewen Tan <jiewen_tan> | ||||||
Component: | WebCore Misc. | Assignee: | Jiewen Tan <jiewen_tan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | alex.gaynor, bfulgham, cdumez, commit-queue, jiewen_tan, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=181947 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 181943 | ||||||||
Attachments: |
|
Description
Jiewen Tan
2018-09-14 18:33:43 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. 3) Also, we could then add a test configuration to the discovery process to hide local authenticators. 4) Re-enable time out tests in: public-key-credential-create-failure.https.html, public-key-credential-get-failure.https.html. Created attachment 351295 [details]
Patch
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? 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. Created attachment 351572 [details]
Patch
Comment on attachment 351572 [details]
Patch
r=me
(In reply to Chris Dumez from comment #9) > Comment on attachment 351572 [details] > Patch > > r=me Thanks, Chris. Comment on attachment 351572 [details] Patch Clearing flags on attachment: 351572 Committed r236842: <https://trac.webkit.org/changeset/236842> All reviewed patches have been landed. Closing bug. |