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

Pass user token when self-streaming from Webknossos #8255

Open
valentin-pinkau opened this issue Dec 2, 2024 · 1 comment
Open

Pass user token when self-streaming from Webknossos #8255

valentin-pinkau opened this issue Dec 2, 2024 · 1 comment

Comments

@valentin-pinkau
Copy link
Member

valentin-pinkau commented Dec 2, 2024

Detailed Description

I have a wk dataset that has a layer with mags that have a path set, which is itself a zarr link to the same webknossos-datastore.
The layer is not public and wk fails to fetch the data. Could it analyze the zarr link and understand that it points to the data store itself (self-streaming) and in this case use the user token it received to also request the zarr data from itself? This way, self-streaming could succeed without explicit credentials in the json.

Here is a link to the problematic dataset:
https://scm.slack.com/archives/C5AKLAV0B/p1733150028983289

@fm3 fm3 changed the title Pass user token when streaming from Webknossos Pass user token when self-streaming from Webknossos Dec 2, 2024
@fm3 fm3 added the backend label Dec 2, 2024
@fm3
Copy link
Member

fm3 commented Dec 3, 2024

I think this should not be implemented using another Credential attached to the DataVault / VaultPath. Instead, every request should get passed the token context, and the HttpsDataVault reads should use this token if the requested uri is the datastore’s own. Not entirely sure in which abstraction layer this decision should happen (DataVaults don’t have the datastore config).

This way, the credentials don’t get cached across users.

I’d consider this blocked by #7839 since the TokenContext refactoring from there would change many lines here.

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

3 participants