-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 on Android #221
Comments
Hi @dougaxe1, If possible, could you please give me access to your site so that I can check / test? My email is volodymyr.kolesnikov at automattic dot com |
@sjinks - clearing some things and will reach out via an alternate channel. |
I've done some more testing (with both versions 1.0.8 and 1.0.9) and believe the following statements are accurate:
(non-default settings: Modality: Cross-Platform, User Verification Requirement: Discouraged) Unfortunately I've been unable trigger the debugging message made available by the |
|
I don't have a Windows box, but with your non-standard settings, when I register the key in a Linux box, I sometimes need to log in twice on Android (the first attempt sometimes fails). Also, the counter does not seem to be incremented for cross-platform attachment modality (again, there is nothing I can do here - the browser reports the counter value). |
@sjinks - thanks for your replies. I'll continue debugging and let you know what I find. |
I've tested this (Fresh site, no configuration of the plugins, just defaults), and can confirm:
Android screen locks, if setup on either Desktop or Mobile works on both though, so this appears to be specific to external-security-keys. |
Did some more digging, wasn't able to narrow it down any further than it being related to the public key algorithm used. It's offering the full kitchen-sink of public key algorithms during registration:
When registered via the Mac it's -8 EdDSA, when registered via Android NFC it's -7 ECDSA w/ SHA-256. If I forcibly disable EdDSA (-8) when registering the key with Mac, the next algorithm it selects ECDSA w/ SHA-256 (-7), and then successfully works via Android NFC. The key I've tested with is a |
Temporarily, as a workaround one can disable This will cause any newer keys registered through a desktop that supports that algorithm to not be offered it during registration, which means it won't attempt to use it during subsequent validation attempts. AFAIK there's no way for an existing key to be fixed, without Android NFC supporting it (I'm guessing that's the problem, but I'm not sure). add_action(
'wp_ajax_webauthn_preregister',
function() {
ob_start( function( $output ) {
$json = json_decode( $output );
if ( ! empty( $json->data->options->pubKeyCredParams ) ) {
$json->data->options->pubKeyCredParams = array_values(
wp_list_filter(
$json->data->options->pubKeyCredParams,
[ 'alg' => -8 ],
'NOT'
)
);
$output = wp_json_encode( $json );
}
return $output;
} );
},
1
); |
Very late follow-up, but the code provided by @dd32 resolved my issue of desktop-registered keys working on Android mobile (NFC). Since I have a fix, this issue can be closed, or if there's interest to incorporate a more proper filter of public key cred params into this plugin, that would be appreciated, too. |
I have applied a patch from https://github.com/madwizard-org/webauthn-server/pull/23/files; in theory; this should fix this issue. |
2.4.1 and 2.5.0 have this fix. |
Version 2.5.0 of the plugin without the workaround from @dd32 did not work for me when registering in Windows FF and using in Android Chrome. Restoring the workaround continues to work in the latest version of the plugin. |
Issues in both Chrome and Firefox on Android. The Android system prompt appears successfully to accept the key, however an error message is shown on both cases.
The issue persists whether the U2F compatibility hack is enabled or disabled in the plugin. Cross-platform / Discouraged are the other two non-default options set.
Tested with two security keys (Yubikey 5 NFC) registered in Windows 10 in Firefox.
Login errors:
Android Chrome: The request is not allowed.
Android Firefox: The operation failed for an unknown transient reason
When attempting to register on Android I get different error messages:
Android Chrome: An unknown error occurred while talking to the credential manager
Android Firefox: The operation failed for an unknown transient reason
Seems similar to #183 however I don't believe it's the same issue because authenticating to Github works fine using these keys with webauthn.
The text was updated successfully, but these errors were encountered: