Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[WebAuthn] Handle security keys with a full key store
https://bugs.webkit.org/show_bug.cgi?id=247339 rdar://100241655 Reviewed by Brent Fulgham. * LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt: * LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: * LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https.html: * LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt: * LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: * LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: * LayoutTests/http/wpt/webauthn/resources/util.js: * Source/WebCore/Modules/webauthn/fido/AuthenticatorGetInfoResponse.cpp: (fido::encodeAsCBOR): * Source/WebCore/Modules/webauthn/fido/AuthenticatorGetInfoResponse.h: * Source/WebCore/Modules/webauthn/fido/DeviceResponseConverter.cpp: (fido::readCTAPGetInfoResponse): * Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::updatePresenter): * Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: (WebKit::wkWebAuthenticationPanelUpdate): * Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationFlags.h: * Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived): * Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Whenever security keys are unable to create a credential due to their internal key storage being full they return the kCtap2ErrKeyStoreFull error code. In this case we should either retry the registeration without a discoverable credential if the preference was set to preferred, otherwise surface an error to the user notifying them they need to use a different key or clear space on the current key. This patch fixes this by handling the kCtap2ErrKeyStoreFull error case. For security keys supporting the CTAP 2.1 standard, this patch also adds support for reading the "remainingDiscoverableCredentials" value from getInfo to detect if the key store is full without having to first attempt a create. Added layout tests for new functionality. Canonical link: https://commits.webkit.org/257989@main
- Loading branch information
Showing
15 changed files
with
125 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters