Repository navigation
[PM-40673] Two Factor Remember Token Updates (Part 3) #8429
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
Open
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
faecd60
[PM-40673 Part 3] update 2FA remember token revoke call sites
rr-bw 787eeb1
[PM-40673 Part 3] update README and test comment for removed 2FA-enabβ¦
rr-bw 013fa61
[PM-40673 Part 3] run policy enforcement before remember-token revokeβ¦
rr-bw 85b9ac3
[PM-40673 Part 3] clean up test comments (remove plan-style prefixes,β¦
rr-bw 86a21db
[PM-40673 Part 3] run dotnet format on test imports
rr-bw 217338d
[PM-40673 Part 3] skip remember token issuance for recovery-code logins
rr-bw 4a53121
[PM-40673 Part 3] update comments on token revocation
rr-bw c77b85f
[PM-40673 Part 3] use a valid encrypted key in the password-only recoβ¦
rr-bw 40204ac
[PM-40673 Part 3] correct test comments on password-only recovery andβ¦
rr-bw 2776a6c
[PM-40673 Part 3] to avoid confusion, use 'remembered' for remember-tβ¦
rr-bw 4ec06a3
[PM-40673 Part 3] remove unnecessary comments, and revoke remember toβ¦
rr-bw d11a83b
[PM-40673 Part 3] use real emailed 2FA code in recovery-code rememberβ¦
rr-bw 3267140
[PM-40673 Part 3] refactor remember-token provider exclusions to use β¦
rr-bw fb18563
[PM-40673 Part 3] rename "remembered device" wording to "2FA rememberβ¦
rr-bw 87057b8
[PM-40673 Part 3] add unit test for 2FA remember token exclusion on Rβ¦
rr-bw e363a0c
[PM-40673 Part 3] add integration tests for remember-token revoke wheβ¦
rr-bw c3aaad9
[PM-40673 Part 3] add integration test for 2FA remember-token revoke β¦
rr-bw 162bc16
[PM-40673 Part 3] add integration test that a wrong recovery code doeβ¦
rr-bw f719c39
[PM-40673 Part 3] add integration test for admin recovery resetting bβ¦
rr-bw 2e7a9eb
[PM-40673 Part 3] add integration tests for 2FA remember-token revokeβ¦
rr-bw 7f46e34
[PM-40673 Part 3] fix using ordering in two-factor integration test fβ¦
rr-bw 3d809bc
[PM-40673 Part 3] update clock comments in ValidateTwoFactorRememberTβ¦
rr-bw 558a332
[PM-40673 Part 3] re-word doc comment on RotateStampsByUserIdAsync
rr-bw 6ce9ded
[PM-40673 Part 3] grant premium in Duo and YubiKey revoke tests so 2Fβ¦
rr-bw 61890b5
[PM-40673 Part 3] revoke 2FA remember tokens when emergency access taβ¦
rr-bw b13474f
[PM-40673 Part 3] assert that a rejected emergency access takeover doβ¦
rr-bw 5b3c6e1
[PM-40673 Part 3] add integration test for 2FA remember token revoke β¦
rr-bw 37b4443
[PM-40673 Part 3] use the fake clock for token expiry in ValidateTwoFβ¦
rr-bw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
|
JaredSnider-Bitwarden marked this conversation as resolved.
Resolved
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Emergency access takeover is also a 2FA teardown:
FinishRecoveryTakeoverAsyncand the obsoletePasswordAsyncinEmergencyAccessServiceboth clear the grantor's 2FA providers. Neither callsRevokeAllForUserAsync. Today the grantor's 2FA remember tokens stop working only because takeover rotatesUser.SecurityStamp, which this TODO proposes to remove from the token.Could we:
RevokeAllForUserAsync(grantor.Id)in both takeover paths, beforeReplaceAsync, to match the other revoke call sites. Also add emergency access takeover to the revocation table in the readme.EmergencyAccessServiceTests(revoke runs, and a revoke failure leaves 2FA intact), and an integration test inEmergencyAccessControllerTest. The integration test seeds aTwoFactorRememberTokenrow and asserts that itsStamprotated afterPOST /emergency-access/{id}/password.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.
7d02c68