Skip to content

LG-14552: Ensure users can't reach the IPP verify info controller without a threatmetrix session id#11858

Merged
eileen-nava merged 10 commits intomainfrom
em/14552-ipp-verify-info
Feb 12, 2025
Merged

LG-14552: Ensure users can't reach the IPP verify info controller without a threatmetrix session id#11858
eileen-nava merged 10 commits intomainfrom
em/14552-ipp-verify-info

Conversation

@eileen-nava
Copy link
Contributor

@eileen-nava eileen-nava commented Feb 7, 2025

🎫 Ticket

LG-14552: Prevent navigating to IPP VerifyInfoController without a threatmetrix_session_id

🛠 Summary of changes

  • Tweak IPP controllers and specs to follow the Identity Verification FlowPolicy.
  • Prevent users from navigating to the IPP verify info controller without a threatmetrix session id.
  • Add specs.

For historical context, here was a related Ada ticket, https://cm-jira.usa.gov/browse/LG-14393, and PR #11254.

📜 Testing Plan

Run automated tests.

include IdvStepConcern

before_action :confirm_step_allowed
before_action :confirm_in_person_address_step_needed, only: :show
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed confirm_in_person_address_step_needed in order to conform with the flow policy documentation.

user_session.fetch('idv/in_person', {})
end

def confirm_repeat_ssn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone could offer more insight or historical context about this method's purpose, I'd appreciate it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was in place to support going back to the SSN entry screen from the verify info step back when the back button was not allowed. FlowPolicy obviates the need for (IMO) janky stuff like checking the request.referer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthinz I removed confirm_repeat_ssn in 406cd00. Let me know what you think.

expect(response).to render_template :show
end

context 'when address1 present' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the flow policy stipulates that we should rely on the before_action confirm_step_allowed and not use other before_actions, I removed the before_action confirm_in_person_address_step_needed . As a result, this test is no longer relevant.

@jennyverdeyen I'd be curious to hear any thoughts you have on this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense! Since we know this was a duplicate check for the redirect behavior that was already being handled in the state id controller, I went to see if there were tests for this in the state id controller specs. I think there maybe aren't... Is this something we should add there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jennyverdeyen Good point! I added a new test to the address_controller_spec in 2b4aa47. Let me know if that provides enough coverage or if you want me to add another test.

@eileen-nava eileen-nava requested review from a team, jennyverdeyen and matthinz February 7, 2025 22:15
@eileen-nava eileen-nava marked this pull request as ready for review February 7, 2025 22:15
@eileen-nava eileen-nava changed the title Em/14552 ipp verify info LG-14552: Ensure users can't reach the IPP verify info controller without a threatmetrix session id Feb 7, 2025
Copy link
Contributor

@jennyverdeyen jennyverdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I responded to a comment you left and made a suggestion but I'll leave it up to you if it needs to be addressed in this PR. Otherwise I approve, looks great!

expect(response).to render_template :show
end

context 'when address1 present' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense! Since we know this was a duplicate check for the redirect behavior that was already being handled in the state id controller, I went to see if there were tests for this in the state id controller specs. I think there maybe aren't... Is this something we should add there?

@eileen-nava eileen-nava merged commit a6fa6fd into main Feb 12, 2025
2 checks passed
@eileen-nava eileen-nava deleted the em/14552-ipp-verify-info branch February 12, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants