Skip to content

KEYCLOAK-16134 Allow webauthn idless login flow#7564

Closed
vanrar68 wants to merge 1 commit intokeycloak:masterfrom
vanrar68:webauthn-idless
Closed

KEYCLOAK-16134 Allow webauthn idless login flow#7564
vanrar68 wants to merge 1 commit intokeycloak:masterfrom
vanrar68:webauthn-idless

Conversation

@vanrar68
Copy link
Copy Markdown
Contributor

@vanrar68 vanrar68 commented Nov 2, 2020

Minor changes required to make webauthn idless scenario work with current code:

  • Remove user prerequisite for the WebauthenticatorPasswordless authenticator
  • Force user verification in case of idless scenario

Don't know if this is the best approach. IDLess authentication flow requires resident key and user verification (realm level global configuration located in the WebauthenPasswordless Policy). Mixed scenarios (passwordless/non resident key and idless/resident key) won't be possible with the current policy configuration. Need for IDLess Policy/IDLess Credential/IDLess Authenticator ?

@vanrar68
Copy link
Copy Markdown
Contributor Author

vanrar68 commented Nov 3, 2020

Created dedicated authenticator, required action, credential type and policy for usernameless authentication flows.

@vanrar68 vanrar68 force-pushed the webauthn-idless branch 3 times, most recently from 45b8d65 to 3c787a0 Compare November 4, 2020 21:24
@abstractj abstractj added area/authentication Indicates an issue on Authentication area kind/feature Categorizes a PR related to a new feature labels Nov 18, 2020
Copy link
Copy Markdown
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@vanrar68 Thanks for the pull request and sorry for late response. I appreciate all the changes in this PR, however we don't want to introduce another tab in the admin console and another set of "implementations" . We have plan some improvements, so that it is possible to create more configuration/policies inside the realm and then you can add authenticators to the authenticationFlows and bind them to the various configurations etc.

Will it be an option to just change the method "WebAuthnAuthenticator.requiresUser()" to false (which will effectively change it also for WebAuthnPasswordlessAuthenticator) and then just throw an exception during the authentication for the case that user is not set? It seems maybe it will just work to throw the exception from this line https://github.com/keycloak/keycloak/blob/12.0.0/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticator.java#L155 in case that user is not set?

@mposolda
Copy link
Copy Markdown
Contributor

mposolda commented Mar 1, 2021

@vanrar68 I am closing the PR due the lack of feedback, but feel free to re-open once you address the comments. Thanks

@mposolda mposolda closed this Mar 1, 2021
@vanrar68
Copy link
Copy Markdown
Contributor Author

vanrar68 commented Mar 1, 2021

Sorry, I can't find the time to update this right now

@d1ken
Copy link
Copy Markdown

d1ken commented Mar 16, 2021

@vanrar68 Hello. Can you help me with this problem?

14:15:34,791 WARN [org.keycloak.events] (default task-31) type=LOGIN_ERROR,
realmId=test-realm,
clientId=account-console,
userId=null,
ipAddress=127.0.0.1,
error=user_not_found,
credential_type=webauthn-usernameless,
auth_method=openid-connect,
auth_type=code,
web_authn_authentication_error=webauthn-error-user-not-found, public_key_credential_id=ZdW8rjuz9lxvAjQjRihS0SWM6eNxwhDhKrWHGePzgrc, web_authn_authenticated_user_id=371400a2-15a9-4304-9501-7fb0561baa78,
redirect_uri=http://localhost:8080/auth/realms/test-realm/account/#/personal-info,
code_id=9adad2bf-0381-4a8c-81ac-421be3d5f070,
authSessionParentId=9adad2bf-0381-4a8c-81ac-421be3d5f070,
authSessionTabId=BjU8FZn20n4

I had reread commit and conversation again - as I understand correctly, this commit is only a part of needed idless to work?
Does any plans to make it work?
For me this is must have feature.
Thanks.

@vanrar68
Copy link
Copy Markdown
Contributor Author

@mposolda I've made the changes as per your request but am unable to reopen the PR. Should I submit a new one ?

@vanrar68
Copy link
Copy Markdown
Contributor Author

Just created PR #7860 since this one can't be reopened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/authentication Indicates an issue on Authentication area kind/feature Categorizes a PR related to a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants