Skip to content

PYIC-8798: Return 400 to the user on expired IPV Session in spinner pages.#2426

Merged
thebauSoftwire merged 5 commits into
mainfrom
pyic-8798
Dec 1, 2025
Merged

PYIC-8798: Return 400 to the user on expired IPV Session in spinner pages.#2426
thebauSoftwire merged 5 commits into
mainfrom
pyic-8798

Conversation

@undermad
Copy link
Copy Markdown
Contributor

@undermad undermad commented Nov 28, 2025

Proposed changes

What changed

  • Added logic that return 400 to the client when IPV session expire during polling calls.

Why did it change

  • Even if lambda returns 400, core-front translate it to 500 which is inaccurate and perhaps may trigger alarms.

Background:
Trust & Reuse have reported seeing a daily number of EVCS ‘get VCs’ requests using an expired access token which they reject with a 401 response (apparently it also triggers some alarms on their side). We believe the vast majority if not all of these requests are coming from the check-mobile-app-vc-receipt lambda which the frontend v2 app polling calls to check if an app VC has been received yet or not. It seems, perhaps from users abandoning the journey at the app polling pages, that calls are being made beyond the 1 hour expiry of the EVCS access token (which Orch sends us at the start of a journey).

Currently the only place we explicitly check our (IPV) session expiry (also 1 hour) is in the journey engine when transitioning between states. The actual session item in DynamoDB has a longer TTL of 24 hours.

We should add a check in the check-mobile-app-vc-receipt lambda to reject requests (with a 400 error) where the user's IPV session has expired. In turn this should drastically reduce, hopefully diminish calls to EVCS being made with an expired access token.

Issue tracking

Checklists

  • READMEs and documentation up-to-date
  • Browser/ unit/ Selenium tests have been written/ updated
  • No risk of exposure: PII, credentials, etc through logs/ code
  • Ensure added/updated routes have CSRF protection if required

@undermad undermad requested review from a team as code owners November 28, 2025 14:22
@sonarqubecloud
Copy link
Copy Markdown

@thebauSoftwire thebauSoftwire merged commit 1303104 into main Dec 1, 2025
6 checks passed
@thebauSoftwire thebauSoftwire deleted the pyic-8798 branch December 1, 2025 10:36
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.

2 participants