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

More "@login_required" in view.py? #1346

Closed
mccalluc opened this issue Aug 18, 2016 · 9 comments
Closed

More "@login_required" in view.py? #1346

mccalluc opened this issue Aug 18, 2016 · 9 comments

Comments

@mccalluc
Copy link
Member

It seems like many of our views could expose information. Besides simply being able to login, are there other things un-logged-in users need to be able to access? Or is security handled at the API level?

@mccalluc mccalluc added this to the Next milestone Aug 18, 2016
@ngehlenborg
Copy link
Contributor

At this point much of our security is handled at the API level. Many views do not require the user to be logged in because there are public data sets that should be viewable by anyone.

@mccalluc
Copy link
Member Author

That's reasonable. @hackdna, I think you had reservations, but ok to close? For reference:

$ grep -A1 '@login_required' refinery/*/views.py | grep def
refinery/analysis_manager/views.py-def analysis_cancel(request):
refinery/core/views.py-def collaboration(request):
refinery/core/views.py-def group_invite(request, token):
refinery/core/views.py-def user(request, query):
refinery/core/views.py-def user_profile(request):
refinery/core/views.py-def user_edit(request, uuid):
refinery/core/views.py-def user_profile_edit(request):
refinery/core/views.py-def group(request, query):
refinery/core/views.py-def project_new(request):
refinery/core/views.py-def project_edit(request, uuid):
refinery/core/views.py-def workflow_edit(request, uuid):
refinery/core/views.py-def analysis(request, analysis_uuid):
refinery/workflow_manager/views.py-def import_workflows(request):

@hackdna
Copy link
Member

hackdna commented Aug 18, 2016

I think we should have an audit of all the views. It is very likely that for some of them unauthenticated access doesn't make sense and it might even open security holes.

@ngehlenborg
Copy link
Contributor

I meant to add that if there are any specific views that you believe should have a @login_required decorator, we should discuss them.

@jkmarx
Copy link
Member

jkmarx commented Dec 6, 2016

@mccalluc
Copy link
Member Author

(no longer a question, just tech debt.)

@mccalluc mccalluc removed the question label Jan 26, 2017
@scottx611x scottx611x modified the milestones: Next, Release 1.5.7 May 25, 2017
@ngehlenborg ngehlenborg added the ui label Oct 17, 2017
@ngehlenborg ngehlenborg removed this from the Next milestone Oct 17, 2017
@scottx611x scottx611x added this to Code in Technical Debt Oct 20, 2017
@gmnelson
Copy link
Contributor

Not sure if this relates specifically to view.py, but the User Files browser is currently exposing facets from all uploaded data sets (i.e. private data sets included), irrespective of data access privileges. In fact, I can see all the facets (e.g. all experimenter names) while logged out.

Although I can't see the files to which I don't have access, I shouldn't be able to see the related facets either.

@gmnelson gmnelson self-assigned this Feb 23, 2018
@hackdna
Copy link
Member

hackdna commented Feb 23, 2018

Ideally, all views should be private by default. Public views would be enabled explicitly (a whitelist).

@jkmarx jkmarx added this to the Next milestone Mar 14, 2018
@jkmarx jkmarx removed this from the Next milestone Apr 9, 2018
@jkmarx
Copy link
Member

jkmarx commented Jul 19, 2018

Checked rendered views, so we are set here. Some views are utilizing the login_require in the URL, which is why they didn't show up in the search (import view for ex)

@jkmarx jkmarx closed this as completed Jul 19, 2018
Technical Debt automation moved this from Code to Done Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

6 participants