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

Use correct asset download URL for external services #1692

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

waxlamp
Copy link
Member

@waxlamp waxlamp commented Oct 2, 2023

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.)

@waxlamp waxlamp force-pushed the embargoed-asset-external-link branch from 8f6c645 to d9b9283 Compare October 2, 2023 19:37
Copy link
Member

@jjnesbitt jjnesbitt left a 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

web/src/views/FileBrowserView/FileBrowser.vue Outdated Show resolved Hide resolved
web/src/views/FileBrowserView/FileBrowser.vue Show resolved Hide resolved
@waxlamp waxlamp marked this pull request as ready for review October 2, 2023 21:02
@yarikoptic
Copy link
Member

what is "correct" in the context of a URL?

Co-authored-by: Jacob Nesbitt <jjnesbitt2@gmail.com>
@waxlamp
Copy link
Member Author

waxlamp commented Oct 4, 2023

what is "correct" in the context of a URL?

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!).

@waxlamp waxlamp requested a review from jjnesbitt October 4, 2023 13:54
@magland
Copy link
Contributor

magland commented Oct 4, 2023

I noticed this PR has been approved. Do you have an estimate for when it will be deployed? Thanks

@waxlamp waxlamp added patch Increment the patch version when merged release Create a release when this pr is merged labels Oct 4, 2023
@waxlamp waxlamp merged commit 6bee502 into master Oct 4, 2023
3 checks passed
@waxlamp waxlamp deleted the embargoed-asset-external-link branch October 4, 2023 16:58
@dandibot
Copy link
Member

dandibot commented Oct 4, 2023

🚀 PR was released in v0.3.54 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Oct 4, 2023
@waxlamp
Copy link
Member Author

waxlamp commented Oct 4, 2023

I noticed this PR has been approved. Do you have an estimate for when it will be deployed? Thanks

@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.

@magland
Copy link
Contributor

magland commented Oct 4, 2023

@waxlamp it's working, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants