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

Add authentication to the API #4

Open
Waidhoferj opened this issue Apr 18, 2021 · 1 comment
Open

Add authentication to the API #4

Waidhoferj opened this issue Apr 18, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Waidhoferj
Copy link
Member

We need to limit access to the write functions to authenticated users inside CSAI for the Argo API. Add OAuth to our flask server so that any sensitive function that updates the tour graph or image library will be protected. Add a small description to this issue about how to interact with the secured API

@Waidhoferj Waidhoferj added the enhancement New feature or request label Apr 18, 2021
@Waidhoferj Waidhoferj changed the title Add authentication to the api Add authentication to the API Apr 18, 2021
@snekiam snekiam assigned snekiam, yanivsagy and bjtat and unassigned snekiam and yanivsagy Apr 18, 2021
@snekiam
Copy link
Member

snekiam commented May 10, 2021

More info about how to make this work, based on some dead ends today: We want to run the oauth client on the backend, and set a cookie in the browser with HTTP_ONLY set on it; this will protect it (mostly) from xss attacks. The front end will need to redirect to a special endpoint (something like /authorize), which will redirect the user to github, authenticate them, then redirect back to the api, which will set the cookie, and redirect back to the frontend. I think this is a reasonably secure, not too complicated way of doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants