Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebAuthn] Disable platform authenticator for disallowed rps #3239

Conversation

pascoej
Copy link
Member

@pascoej pascoej commented Aug 11, 2022

6bd8e23

[WebAuthn] Disable platform authenticator for disallowed rps
https://bugs.webkit.org/show_bug.cgi?id=243844
<rdar://97789464>

Reviewed by Brent Fulgham.

In some circumstances it may be useful to quirk off the platform authenticator
for given rps. This patch hooks up some new internal SPI for that purpose.

* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable const):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h:
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Canonical link: https://commits.webkit.org/253497@main

@pascoej pascoej requested a review from cdumez as a code owner August 11, 2022 20:28
@pascoej pascoej self-assigned this Aug 11, 2022
@pascoej pascoej added WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). WebKit Nightly Build labels Aug 11, 2022
@pascoej pascoej force-pushed the eng/WebAuthn-Disable-platform-authenticator-for-disallowed-rps branch from d799d98 to 51f5387 Compare August 11, 2022 20:34
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 12, 2022
Copy link
Contributor

@brentfulgham brentfulgham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -32,6 +32,8 @@
#else
@interface ASCWebKitSPISupport : NSObject
@property (class, nonatomic) BOOL shouldUseAlternateCredentialStore;
+ (BOOL)arePasskeysDisallowedForRelyingParty:(nonnull NSString *)relyingParty;
+ (void)getArePasskeysDisallowedForRelyingParty:(nonnull NSString *)relyingParty withCompletionHandler:(nonnull void (^)(BOOL))completionHandler;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't seem to use the getArePasskeysDisallowedForRelyingParty method, so may not be necessary to forward-declare it.

@pascoej pascoej removed the merging-blocked Applied to prevent a change from being merged label Aug 16, 2022
@pascoej pascoej force-pushed the eng/WebAuthn-Disable-platform-authenticator-for-disallowed-rps branch from 51f5387 to 7247cd3 Compare August 16, 2022 22:39
@pascoej pascoej added the merge-queue Applied to send a pull request to merge-queue label Aug 16, 2022
https://bugs.webkit.org/show_bug.cgi?id=243844
<rdar://97789464>

Reviewed by Brent Fulgham.

In some circumstances it may be useful to quirk off the platform authenticator
for given rps. This patch hooks up some new internal SPI for that purpose.

* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable const):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h:
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Canonical link: https://commits.webkit.org/253497@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/WebAuthn-Disable-platform-authenticator-for-disallowed-rps branch from 7247cd3 to 6bd8e23 Compare August 17, 2022 01:25
@webkit-commit-queue
Copy link
Collaborator

Committed 253497@main (6bd8e23): https://commits.webkit.org/253497@main

Reviewed commits have been landed. Closing PR #3239 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 6bd8e23 into WebKit:main Aug 17, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
5 participants