Skip to content

Conversation

@TotalDwarf03
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

What

  • API now collects which groups the authenticated user is apart of after decoding the Cognito token
  • This will determine what privileges the user has when editing projects.

This fixes our current workaround of using shared credentials.

Testing

Have any new tests been added as part of this issue? If not, try to explain why test coverage is not needed here.

  • Yes
  • No
    Please write a brief description of why test coverage is not necessary here.
  • Not as part of this ticket. (Could be done at a later point)

Documentation

Has any new documentation been written as part of this issue? We should try to keep documentation up to date
as new code is added, rather than leaving it for the future.

  • Yes
  • No
    Please write a brief description of why documentation is not necessary here.
  • Not as part of this ticket. (Could be done at a later point)

Related issues

KEH-609 (Jira)

How to review

This is currently deployed to sdp-dev.

See the instructions in the UI PR.

ONS-Innovation/keh-tech-audit-tool#54

- This will make the API Gateway redeploy itself if main.tf changes
- Previously, we were only getting the email from this but now we need the groups.
- Update /project/<proj> put method to check if user has admin group
- If the user has admin group (cognito) or is listed within the user list, allow edit
- This also fixes the COGNITO_TOKEN_URL which is incorrect
@TotalDwarf03 TotalDwarf03 requested a review from a team October 28, 2025 17:29
@TotalDwarf03 TotalDwarf03 self-assigned this Oct 28, 2025
- Removes multiple functions doing a similar thing
- This does have a drawback where everything is collected even if it's not needed but that's fine
@TotalDwarf03 TotalDwarf03 requested a review from mwirikia October 29, 2025 14:04
@TotalDwarf03 TotalDwarf03 merged commit 7ccf648 into main Oct 29, 2025
4 checks passed
@TotalDwarf03 TotalDwarf03 deleted the KEH-609-admin-access branch October 29, 2025 17:06
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