-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feat/create presigned url passports #984
Conversation
…eate_presigned_url_passports
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
…eate_presigned_url_passports
Pull Request Test Coverage Report for Build 12041
💛 - Coveralls |
fence/blueprints/data/indexd.py
Outdated
@@ -1434,21 +1460,28 @@ def delete(self, container, blob): # pylint: disable=R0201 | |||
return ("Failed to delete data file.", status_code) | |||
|
|||
|
|||
def _get_user_info(sub_type=str): | |||
def _get_user_info(sub_type=str, user=None): | |||
""" | |||
Attempt to parse the request for token to authenticate the user. fallback to | |||
populated information about an anonymous user. | |||
By default, cast `sub` to str. Use `sub_type` to override this behavior. | |||
""" | |||
# TODO Update to support POSTed passport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can take this TODO comment out, right?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this, I left a few comments but we can address (if needed) in a new PR
raise Unauthorized( | ||
f"Either you weren't logged in or you don't have " | ||
f"{action_to_permission[action]} permission " | ||
f"on authz resource: {self.index_document['authz']}" | ||
) | ||
authorized_user_id = ( | ||
authorized_user_id if isinstance(authorized_user_id, str) else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this necessary? I assume it's b/c the function below expects None
and not something False-y? Is it even possible for the above function to return ""
?
google_proxy_group, | ||
primary_google_service_account, | ||
cloud_manager, | ||
google_signed_url, | ||
monkeypatch, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a new PR can we get some quick, small docstrings about what these tests are actually testing for in more detail? Don't worry about doing it in this PR since the tests are already passing
New Features
POST /ga4gh/drs/v1/objects/<guid>/access/<access method>
endpoint with passportsPOST /ga4gh/drs/v1/objects/<guid>/access/<access method>
endpoint with passportsImprovements
Dependency updates
Deployment changes