-
Notifications
You must be signed in to change notification settings - Fork 10
Register a user without their password in passwordless authentication use case #22
Comments
Hello, I'm very interested in this feature. Just to confirm, does this means that a FIDO2 security key protected by PIN code (e.g. Yubikey 5) does not work yet with this plugin? |
Hello, it does not means that. This issue means that the user registers their account onto keycloak in the first place, keycloak prompts the user to input username and password, but in passwordless scenario, keycloak should not prompt the user to input password. As for FIDO2 security key protected by PIN code, this prototype might work well using this security key. |
Sorry, in passwordless scenario, I'm afraid that FIDO2 security key protected by PIN code can not be used. In passwordless scenario, the end user's authenticator need to have capability of Resident Key. I'm not sure whether your authenticator has this capability or not. |
For passwordless authentication uses cases, security keys must support two features.
Some security keys support user verification by PIN code (Yubikey5), and some by embedded sensor (Feitian BioPass2). |
Thanks for the prompt reply :-) In the meantime, I managed to have my Yubikey 5 to work with the Webauthn Authenticator and with a PIN (only on latest Windows 10 with latest Firefox), but only if I have the username/password form first, which I'd like to skip. Indeed, if I have Webauthn Authenticator in the Authentication flow and I remove the Username Password Form, then when I try to authenticate, Keycloak returns the "Invalid user/password" error right away. It seems to ignore the Webauthn Authenticator in this case. Tested on Keycloak v6.0.1. So is it a known issue related to what you are trying to fix here, i.e. passwordless authentication use case? Or is the Webauthn Authenticator supposed to work on Keycloak even if there is no Username/Password form (or any other username/authentication mechanism) in the authentication flow? Just checking whether I need to create a different issue in order to address this. My answers to your comments below, in case that helps.
Yes, that's what I'm looking for as well, because in my case, the PIN code should replace the password as second factor; and therefore I'd rather get rid of the username/password form in the authentication flow, and jump to the FIDO/Webauthn authentication right away (using PIN) on Keycloak.
Yes, my authenticators do. I am indeed using the Yubikey 5 series which support PIN code and resident keys. The Yubico developer guide on Resident keys is quite explicit: |
@cdanger One point I would like to ask you, did you conduct the following procedures?
|
Yes, I did:
My environment:
A few other interesting tests:
I guess in the latter case, Keycloak already knows the username somehow from the previous username/password authentication; whereas in the other case Keycloak is trying to get the username from the authenticator, in vain. But that's a wild guess on my part. |
@cdanger thank you for information. I will investigate codes. |
@cdanger From your information, I guess that your Microsoft Edge v44 judged that your Yubikey 5C Nano can not treat ResidentKey and User Verification option and returned such the error. I'm still not sure why this happens. If it is possible, could you use other browsers (chrome, firefox)? Aside from that, In Step 2, you've successfully registered.
I guess that when you first logged in by default browser flow, your browser got SSO Cookie from keycloak, and next you tried OIDC authentication request without siging out, keycloak found the user from SSO Cookie, found their public key credential ID, set it as allowedCredential option of navigator.credentials.get() and its call by the browser succeeded. |
Yes, I tried with Firefox 67 as well, and I got the same behavior (same error message) with Keycloak webauthn plugin. I want to emphasize the fact that both Edge and Firefox browsers work for me on the Yubico's password-less login demo website (with same PC, OS and authenticator). (Chrome is not officially supported there on the contrary to Edge/Firefox, so I am ignoring Chrome for now.) |
@cdanger I've found why this problem occurs and how to resolve this problem. After resolving this problem, in Authentication with Resident Key supported Authenticator Scenario, I've confirmed that I was able to register my YubiKey and authenticate using it in Edge. I'll newly create the issue and comment on it in detail. |
refer to #26 |
Great news! Thanks for the fix. Now looking forward to the next release 👍 (I'll test with the latest commit anyway in the meantime.) |
@cdanger thank you for comment, the latest release is the following resolving the case you've reported: If you try this on your environment and work well, could I add on Environment section of README that this program works well in Authentication with Resident Key supported Authenticator Scenario under your environment? Whether WebAuthn works well depends on several factors, especially, OS (and version), browser (and version), authenticator. Therefore, I'm collecting information on under which environment this program works well. |
Yes, I confirm 0.3.RELEASE works for me 👍 in the following environment: Windows 10 (v1903) / Firefox (v68) / Yubikey 5C Nano / keycloak 6.0.1 on localhost. |
I've added your reported environment where this project works to README.md and I've merged your pull request. Thank you for the contribution! |
@tnorimat We tried to replicate following scenario.
But when We try to access We get invalid user name and password error. Why we are getting this ? can you please help us setup?
|
@hypermine-bc Hello, could you please confirm that you have used the Resident Key supported browser and authenticator? For example, the combination of Microsoft Edge (ver 44 or later) and Yubico Security Key will work well. |
In passwordless authentication senario, it is not needed for a user to set and use their password.
The text was updated successfully, but these errors were encountered: