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

Revision browser, file downloads broken when read-access is restricted #1965

Closed
wlach opened this issue Jun 24, 2019 · 3 comments
Closed

Revision browser, file downloads broken when read-access is restricted #1965

wlach opened this issue Jun 24, 2019 · 3 comments

Comments

@wlach
Copy link
Contributor

wlach commented Jun 24, 2019

With @jezdez's PR #1926 landed and various fixes, read access to some previously open endpoints is now locked down on Mozilla's internal instance -- in particular file fetches (for resources uploaded to the iodide server) and the revision browser no longer work.

One of those "obvious in retrospect" things. I have a PR to fix the revision browser pending, but how to handle files (which may be referenced via a fetch cell) requires some more thought.

/cc @robotblake @hamilton

wlach added a commit to wlach/iodide that referenced this issue Jun 24, 2019
iodide-project#1965)

Even read-only operations need an authentication credential on the
internal server
@wlach
Copy link
Contributor Author

wlach commented Jun 25, 2019

Revision browser is being worked on in #1966.

@jezdez, if you wanted to try working on the file endpoints that would be cool. It might be a little tricky: we normally download files via a fetch cell (example: https://alpha.iodide.io/notebooks/759/), so we'd need to find a way to automatically add the iodide credentials for resources fetched on the current domain. We may also need to update the iodide file api (https://iodide-project.github.io/docs/api/), though hopefully that will be a little easier.

wlach added a commit to wlach/iodide that referenced this issue Jun 26, 2019
iodide-project#1965)

Even read-only operations need an authentication credential on the
internal server
wlach added a commit to wlach/iodide that referenced this issue Jun 26, 2019
iodide-project#1965)

Even read-only operations need an authentication credential on the
internal server
wlach added a commit to wlach/iodide that referenced this issue Jun 26, 2019
iodide-project#1965)

Even read-only operations need an authentication credential on the
internal server
@wlach wlach closed this as completed in 532cf58 Jun 27, 2019
@wlach wlach reopened this Jun 27, 2019
@wlach
Copy link
Contributor Author

wlach commented Jul 8, 2019

So it turns out we were already passing file requests (relative ones at least) through to the main editor cell, with authentication credentials:

const fileFetcher = isRelPath

Verified that this (along with iodide.file.load) works fine on the internal server here:

https://stage.iodide.nonprod.dataops.mozgcp.net/notebooks/74/

I think we can close this out as done.

@jezdez
Copy link
Contributor

jezdez commented Jul 8, 2019

Yay @wlach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants