-
Notifications
You must be signed in to change notification settings - Fork 3
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
Anonymous user geneset building #46
Comments
Update: I have enabled creating anonymous public genesets. It may be beneficial to enforce XSRF cookies if we only want the approved frontend application to do this. |
Merged in: #64 |
Some other important consideration regarding anonymous genesets:
|
I'm leaving this open for reference, in case we want to implement other security features. |
Note, we also previously discussed using XSRF cookies to prevent other websites/clients from writing anonymous genesets. Implementation of XSRF cookie protections The code that I commented out here would enable XSRF cookie checks on anonymous POST requests to the user_geneset endpoint: Currently, the Tornado documentation: https://www.tornadoweb.org/en/stable/_modules/tornado/web.html#RequestHandler.check_xsrf_cookie |
Copied from biothings/mygeneset.info-website#30
Currently, the website's "Build" page allows users to build and download genesets while logged out. There is also a "Create" button that would allow the user to create an "anoymous" geneset in the database, but this feature is not implemented at the moment.
We need to decide whether we want to support these two Build/Download features, and may need to implement a few things to make this workflows smoother.
Downloading anonymous genesets - This is mostly working, and I think it's a good idea to keep.
One thing that could be improved is offloading some of the geneset creation code to the backend. The benefit would be that the data would match exactly what the database would record if the user was logged in. One way to do it is to allow unauthenticated POST requests with the --dry_run flag (This could also be useful for testing). In this case, to download a geneset we simply fetch the JSON from the response, and transform it to csv/tsv/gmx formats if needed.
Creating anonymous genesets - Not supported. Currently returns a 401 Unauthorized Error if user is not logged in.
If we don't plan to support it, we should remove the button for logged out users, and update the text under the Login page's "Use As Guest" section.
I'm open to discussion into reasons to support it, but I think we would have to address a few questions on the backend namely:
I'll duplicate this issue in the mygeneset backend repository, to track any changes it may require in the backend.
The text was updated successfully, but these errors were encountered: