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

If a user has one Passkey, don't let the user delete it. #32690

Closed
benarent opened this issue Sep 27, 2023 · 4 comments
Closed

If a user has one Passkey, don't let the user delete it. #32690

benarent opened this issue Sep 27, 2023 · 4 comments

Comments

@benarent
Copy link
Contributor

Expected behavior:
I was recently setting up a new passwordless user, I created a user with a single passkey. I was able to delete the users one passkey

Current behavior:
If a user only has one passkey, we shouldn't let them delete it, until they have a new passkey added.

Bug details:

  • Teleport version
  • Recreation steps
  • Debug logs
@zmb3
Copy link
Collaborator

zmb3 commented Sep 27, 2023

Can we lump this in with #19314?

@bl-nero bl-nero self-assigned this Dec 14, 2023
@codingllama
Copy link
Contributor

I think this might be an unintended consequence of "second_factor:optional" in the cluster settings. Still a bug, but you shouldn't be able to do this with "second_factor:on" or "second_factor:webauthn" (arguably better settings for a passwordless cluster).

@codingllama
Copy link
Contributor

A difficulty in fixing this is that we don't mark users as "passwordless", so the backend interprets this as deleting a regular MFA method, not as locking the user out. A simple solution is to just not delete the last resident credential they have, assuming there are not other MFA methods registered. It's a bit weird in some corner-cases, but should solve potential lockouts.

@bl-nero, I can this one if that's alright to you.

@codingllama codingllama self-assigned this Dec 15, 2023
@bl-nero
Copy link
Contributor

bl-nero commented Dec 15, 2023

I don't mind, as long as it's backend-only (I'm gonna rewrite a lot of stuff in the UI in upcoming days)

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

No branches or pull requests

4 participants