Skip to content

Task/cdd 3145 validate cognito jwt#3092

Merged
mattjreynolds merged 16 commits intomainfrom
task/CDD-3145-validate-cognito-jwt
Mar 27, 2026
Merged

Task/cdd 3145 validate cognito jwt#3092
mattjreynolds merged 16 commits intomainfrom
task/CDD-3145-validate-cognito-jwt

Conversation

@mattjreynolds
Copy link
Copy Markdown
Contributor

@mattjreynolds mattjreynolds commented Mar 23, 2026

Description

  • Add validation and authentication of cognito JWT for requests that have an X-UHD-AUTH header sent from the frontend (see frontend PR)
  • Requires environment variables to be set for AWS_REGION and AWS_USER_POOL (see infra PR)
  • Note for testing: currently the frontend does not send the token even for non-public requests, because it doesn't distinguish between public and non-public requests when calling the API. So API testing would need to be done manually with a valid (and current - they expire after 1 hour) JWT token e.g via postman, with a custom header like 'X-UHD-AUTH': 'Bearer: eyJraWQiOi.....'

Fixes #CDD-3145
Addresses part of #CDD-3146 (returns a user, but without permission sets)


Type of change

Please select the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Tech debt item (this is focused solely on addressing any relevant technical debt)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests at the right levels to prove my change is effective
  • I have added screenshots or screen grabs where appropriate
  • I have added docstrings in the correct style (google)

@mattjreynolds mattjreynolds force-pushed the task/CDD-3145-validate-cognito-jwt branch from 73b370f to 4e9e497 Compare March 24, 2026 09:27
@mattjreynolds mattjreynolds force-pushed the task/CDD-3145-validate-cognito-jwt branch from 1870b52 to a0ef05a Compare March 26, 2026 11:48
@mattjreynolds mattjreynolds force-pushed the task/CDD-3145-validate-cognito-jwt branch from a0ef05a to 12c16d3 Compare March 26, 2026 12:13
@sonarqubecloud
Copy link
Copy Markdown

@mattjreynolds mattjreynolds merged commit 728239d into main Mar 27, 2026
17 checks passed
@mattjreynolds mattjreynolds deleted the task/CDD-3145-validate-cognito-jwt branch March 27, 2026 12:49
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.

4 participants