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

WebAuthn: allow empty username for login #38348

Open
FroMage opened this issue Jan 23, 2024 · 2 comments
Open

WebAuthn: allow empty username for login #38348

FroMage opened this issue Jan 23, 2024 · 2 comments

Comments

@FroMage
Copy link
Member

FroMage commented Jan 23, 2024

Description

Vert.x supports this, but the Quarkus equivalent classes WebAuthnSecurity and WebAuthnController, which have a copy of some code from WebAuthnHandlerImpl and WebAuthnImpl do not (this was added after we copied the logic).

Implementation ideas

We can support it, but that means setting an empty username cookie, or just not setting it, and figuring out how to turn this into a valid QuarkusPrincipal in WebAuthnIdentityProvider, which is a bit harder, since that relies on having a username.

I suppose we might fetch the username from the WebAuthnUserProvider since it's required for registration?

Also this would need tests, and requires setting the requireResidentKey option, which I'm not sure what it does.

@quarkus-bot
Copy link

quarkus-bot bot commented Jan 23, 2024

/cc @pedroigor (bearer-token), @sberyozkin (bearer-token,jwt,security)

@FroMage
Copy link
Member Author

FroMage commented Jan 26, 2024

Some thoughts:

  • The spec mandates a username is required when creating credentials (register) on the client side JS API
  • We have two lookup methods to find credentials from the DB : using username, or using credID. The credID one is only used ATM on login if resident-key is set to true
  • Technically, during the login challenge, we need to pass a set of allowed credentials to the client-side JS API, so it can find a suitable authenticator. This means we need to find them from the DB, which means we need a way to find them. ATM we pretty much need a username to find them, since at this point, we don't have a credentialID yet.

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

2 participants