-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use correct asset download URL for external services #1692
Conversation
8f6c645
to
d9b9283
Compare
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.
A couple questions/suggestions but otherwise looks good
what is "correct" in the context of a URL? |
Co-authored-by: Jacob Nesbitt <jjnesbitt2@gmail.com>
I updated the description to answer this question in better detail (I should have done that upon marking this PR as ready for review--sorry!). |
I noticed this PR has been approved. Do you have an estimate for when it will be deployed? Thanks |
🚀 PR was released in |
@magland, I just merged this PR and it is deploying as we speak! Please check in a little while to see if the new feature is working as intended, and follow up here if there are any lingering problems. |
@waxlamp it's working, thanks so much! |
When an external service is called from the file browser, the asset URL used is always the S3 URL, even in the case of an owner browsing an embargoed Dandiset. In the latter case, the S3 URL, which is not presigned, does not allow general access to the asset, causing the external service to fail when it tries to retrieve the data.
This PR modifies the generation of that asset URL to emit the S3 URL for open Dandiset assets, and the internal DANDI API asset URL (which redirects to the correct presigned S3 URL) for embargoed Dandiset assets. (Note that the target external service must still authenticate to the DANDI server in order for this redirection to succeed; that in turn requires a design that supports using DANDI API keys, etc.)