Merged
Conversation
aduth
reviewed
May 17, 2023
app/controllers/two_factor_authentication/webauthn_verification_controller.rb
Outdated
Show resolved
Hide resolved
7c81390 to
9573110
Compare
9573110 to
7c3f1fe
Compare
aduth
approved these changes
May 25, 2023
app/controllers/two_factor_authentication/totp_verification_controller.rb
Outdated
Show resolved
Hide resolved
app/controllers/two_factor_authentication/webauthn_verification_controller.rb
Outdated
Show resolved
Hide resolved
added 7 commits
May 25, 2023 09:06
changelog: Internal, Two-Factor Authentication, Consolidate two factor verification and confirmation behavior
7c3f1fe to
ae3a556
Compare
7001a03 to
b235380
Compare
b235380 to
f7f3512
Compare
This was referenced May 26, 2023
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.
🛠 Summary of changes
Following up in what is hopefully the last series of changes for this (see #8347, #8316, #8315, #8037, #8031). Currently, the session "confirmation context" is only used by phone OTP verification, so this PR splits that specific functionality out of the shared concern and into the controller. With that, we can call
handle_valid_verification_for_confirmation_context/handle_valid_verification_for_authentication_contextexplicitly within the 2FA controller depending on whether it is a setup controller or verification controller.Some of the existing 2FA controllers also implemented their own version of
mark_user_as_fully_authenticatedto set values in the session, and this PR consolidates the behavior into the shared concern and has all of the controllers use that viahandle_valid_.handle_remember_deviceis not used in every authentication as we do not always present that option, so that part is left to each controller for now.handle_valid_otpalso had some logic for redirecting that was only used in one controller, so the redirect behavior was also moved back into each controller individually and called explicitly.With these changes, we should be able to make consistent assumptions about which 2FA method was used for authentication. It will hopefully create the space to do things like keep track of verifications vs. confirmations and individual timestamps for each in the future. That will allow us to be a bit more fine-grained in terms of when we request a user to authenticate with a PIV/CAC or phishing-resistant method when an SP requests it.