-
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: Prevent passkey downgrades #40284
Conversation
web1ID := []byte{1, 1, 2} // WebAuthn / MFA | ||
rk1ID := []byte{1, 1, 3} // WebAuthn / passwordless | ||
dev1 := &types.MFADevice{ | ||
u2fID := []byte{1, 1, 1} // U2F |
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.
Renamed for clarity, nomenclature was still a bit "in flux" when I originally wrote this.
// registration. | ||
// Letting users have both allows them to "swap" between key types in the | ||
// same device. | ||
if webDev := dev.GetWebauthn(); webDev != nil && webDev.ResidentKey != passwordless { |
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 behavior used to be fine during the "Yubikey era", desirable even, as MFA keys don't require PINs. Yubis are still fine with this, but the recently evolved passkey behavior clearly isn't. :/
Friendly ping @gabrielcorado @zmb3 ? |
52e4122
to
29346e2
Compare
@codingllama See the table below for backport results.
|
Prevent authenticators from "downgrading" passkeys to "MFA" keys by always adding passkeys to the registration credential exclude list.
Modern authenticators, like Touch ID on Chrome, will always create passkeys regardless of our registration parameters. This can lead to the following situation:
This PR stops 2) from happening: the browser will error with a message in the lines of "You already registered this device".
Related to #39521.
Changelog: Prevent accidental passkey "downgrades" to MFA