fix: Prevent passkey downgrades#40284
Merged
Merged
Conversation
codingllama
commented
Apr 5, 2024
| web1ID := []byte{1, 1, 2} // WebAuthn / MFA | ||
| rk1ID := []byte{1, 1, 3} // WebAuthn / passwordless | ||
| dev1 := &types.MFADevice{ | ||
| u2fID := []byte{1, 1, 1} // U2F |
Contributor
Author
There was a problem hiding this comment.
Renamed for clarity, nomenclature was still a bit "in flux" when I originally wrote this.
codingllama
commented
Apr 5, 2024
| // 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 { |
Contributor
Author
There was a problem hiding this comment.
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. :/
Contributor
Author
|
Friendly ping @gabrielcorado @zmb3 ? |
gabrielcorado
approved these changes
Apr 9, 2024
tigrato
approved these changes
Apr 10, 2024
52e4122 to
29346e2
Compare
|
@codingllama See the table below for backport results.
|
This was referenced Apr 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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