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

Update to new authZ model #262

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Update to new authZ model #262

wants to merge 3 commits into from

Conversation

justin-ys
Copy link
Contributor

@justin-ys justin-ys commented Jun 2, 2023

  • Do not merge, will not work until new AuthX model is implemented in Candig
  • Switches htsget to new authX library functions

@daisieh
Copy link
Member

daisieh commented Jun 5, 2023

This branch is based on an old version of HTSget. Can you pull latest from stable and rebase?

@justin-ys
Copy link
Contributor Author

Should be updated now.

@@ -15,15 +15,16 @@ def is_authed(id_, request):
print("WARNING: TEST MODE, AUTHORIZATION IS DISABLED")
app.logger.warning("WARNING: TEST MODE, AUTHORIZATION IS DISABLED")
return 200 # no auth
if is_site_admin(request):
return 200
if "Authorization" in request.headers:
authed_datasets = get_authorized_datasets(request)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to get the list of authed_datasets here. I think we can simply use the id to get the dataset name and pass that with the other request info to is_permissible.

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