LG-13477: Fix reprompt for adding PIV on sign-in after reauthentication#10918
Merged
LG-13477: Fix reprompt for adding PIV on sign-in after reauthentication#10918
Conversation
zachmargolis
reviewed
Jul 5, 2024
97d3496 to
52d6724
Compare
This was referenced Jul 15, 2024
52d6724 to
003eb4e
Compare
zachmargolis
approved these changes
Jul 22, 2024
mdiarra3
approved these changes
Jul 22, 2024
Contributor
Author
|
For posterity, surfacing an explainer of the fix from the extended commit description of 003eb4e:
|
changelog: Bug Fixes, PIV Enrollment, Fix reprompt when reauthenticating to add PIV after sign-in
Because we were considering the PIV session value first, we weren't clearing stored_location from the session, and therefore the user would be confusingly redirected back to PIV setup screen after they'd already seen it
003eb4e to
9448c5d
Compare
mitchellhenke
pushed a commit
that referenced
this pull request
Jul 31, 2024
…on (#10918) * LG-13477: Fix reprompt for PIV after reauthentication changelog: Bug Fixes, PIV Enrollment, Fix reprompt when reauthenticating to add PIV after sign-in * Delete stored_location when redirecting for PIV setup after sign-in Because we were considering the PIV session value first, we weren't clearing stored_location from the session, and therefore the user would be confusingly redirected back to PIV setup screen after they'd already seen it
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.
🎫 Ticket
LG-13477
🛠 Summary of changes
Fixes an issue where a user would be returned to the PIV prompt screen when prompted to add a PIV card to their account after signing in when having previously failed logging in with PIV due to the card not being associated with a user.
Part of the changes here improve spec helpers relating to PIV/CAC, which currently do not reflect real-world usage, since the PIV/CAC-after-sign-in prompt does not return a user to
'login/add_piv_cac/success'in live code. Instead, the prompt page submits to the'/present_piv_cac'route (Users::PivCacAuthenticationSetupController#submit_new_piv_cac), and is therefore redirected back to'/piv_cac'after being returned from the PKI service. The stub abstractions wrongly assumes that the PKI service will always redirect back to the URL that the user submitted the form at.📜 Testing Plan
reauthn_windowto a short number inconfig/application.ymlto streamline testingBefore: The page appears to reload, with a success banner "A PIV/CAC card was added to your account"
After: You're brought to the account page, with a success banner "A PIV/CAC card was added to your account"
👀 Screenshots