Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify state for login.gov #1386

Merged
merged 8 commits into from
Nov 7, 2024
Merged

Verify state for login.gov #1386

merged 8 commits into from
Nov 7, 2024

Conversation

xlorepdarkhelm
Copy link
Contributor

@xlorepdarkhelm xlorepdarkhelm commented Nov 1, 2024

A note to PR reviewers: it may be helpful to review our code review documentation to know what to keep in mind while reviewing pull requests.

Description

the state was largely unused by our system, and was seen as a necessity for working with login.gov. Now we are checking that the state is correct on return from login.gov. It is sent as a query parameter back from login.gov, and we are now simply checking that it matches a value we have stored in redis.

This also is now generated from the admin, and then passed into the api endpoints for both creating a new invitation, and resending an expired invitation. As such, everything from login.gov is now checked for both state and nonce (the previous work I had done). This will help eliminate possible ingresses from bad actors.

https://github.com/GSA/us-notify-compliance/issues/51

This must only be merged when both this ticket and the one linked here is finished: GSA/notifications-admin#2075

Security Considerations

Checking state, like nonce, is important for the security of the login process.

@xlorepdarkhelm
Copy link
Contributor Author

FYI - I am testing that this all works as intended, I believe it will, and will update when I have it confirmed. Please do not merge until I say it all 100% works.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
@xlorepdarkhelm
Copy link
Contributor Author

FYI - I am testing that this all works as intended, I believe it will, and will update when I have it confirmed. Please do not merge until I say it all 100% works.

This all works now.

Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

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

Thank you, @xlorepdarkhelm!

Copy link
Member

@A-Shumway42 A-Shumway42 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @xlorepdarkhelm !

@ccostino ccostino merged commit 28d8469 into main Nov 7, 2024
7 checks passed
@ccostino ccostino deleted the USN-COMPLY-51-Verify_State branch November 7, 2024 19:17
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