-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: Forbid SSO users from logging in using passwordless #41062
Conversation
d.Key.AllowResidentKey = true | ||
d.Key.SetUV = true | ||
d.Key.SetPasswordless() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here was missing a flag, plus at some point I added SetPasswordless() but probably missed this line.
Thanks for the quick reviews! I'm trying to land a few #41023 backports before I merge this one, to save myself some trouble. I should be able to proceed here soon. |
@codingllama See the table below for backport results.
|
* Save the WebAuthn UserHandle in the mock Key * Simplify passwordless tests * fix: Forbid SSO users from logging in using passwordless * Rename tests to TestPasswordlessProhibitedForSSO
* Save the WebAuthn UserHandle in the mock Key * Simplify passwordless tests * fix: Forbid SSO users from logging in using passwordless * Rename tests to TestPasswordlessProhibitedForSSO
How is an SSO user supposed to auth in tsh with MFA with these change now? This has broken our authentication/DB access in production. |
Hey @gregnetau, this change targets only passwordless logins, other kinds of MFA are unaffected. This includes MFA checks with a resident credential. If you are having problems, please raise an issue or a support ticket with details of your problem and repro steps and we'll take a look at it. |
It is possible for an SSO user to register a passkey and skip SSO authentication by doing a local/passwordless login. This PR fixes that by checking the user "type" on passwordless logins.
Note that, for passwordless, the user is only confirmed after the challenge is solved, so the error has to happen in the "finish" step of the ceremony. Similarly the Web UI can't do much to identify the user or forbid passwordless before that.
Changelog: Fix user SSO bypass by performing a local passwordless login