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

[auth] Add logic for sending state through login flow #1872

Closed
humphd opened this issue Mar 5, 2021 · 1 comment
Closed

[auth] Add logic for sending state through login flow #1872

humphd opened this issue Mar 5, 2021 · 1 comment
Assignees
Labels
type: enhancement New feature or request type: security Security concerns
Milestone

Comments

@humphd
Copy link
Contributor

humphd commented Mar 5, 2021

Our frontend and auth service both need to be taught how to send a random piece of text (i.e., state) through with a login flow, so that redirects back to the front-end can be trusted (i.e., we know we initiated them). The idea is that the browser generates a random string (e.g., using nanoid or something) and stores it in localStorage, then begins the login redirect flow, passing ?state=... on the query string. This value needs to get picked up by our auth service (should work already), and then passed along with the SAML request (we don't do this, but passport-saml supports it), and then we can get it back via our auth's login/callback, and send it back with the token to the browser. The browser would compare it to what it has in storage and either accept that it's what we expect, or reject it (e.g., we didn't initiate this flow, so stop it).

This will require a bit of tinkering in our front-end and back-end, and depends on #1796 and #1843.

@humphd humphd added type: enhancement New feature or request type: security Security concerns labels Mar 5, 2021
@humphd
Copy link
Contributor Author

humphd commented Mar 5, 2021

Our e2e tests for auth would need to include this (e.g., new test cases).

@humphd humphd assigned humphd and unassigned izhuravlev Mar 19, 2021
@humphd humphd added this to the 1.9 Release milestone Mar 19, 2021
humphd added a commit to humphd/telescope that referenced this issue Mar 19, 2021
@humphd humphd closed this as completed in aef750f Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request type: security Security concerns
Projects
None yet
Development

No branches or pull requests

2 participants