-
Notifications
You must be signed in to change notification settings - Fork 29
Zarr private links #6367
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
Zarr private links #6367
Conversation
# Conflicts: # CHANGELOG.unreleased.md # app/controllers/AnnotationController.scala # app/controllers/UserTokenController.scala # app/models/annotation/AnnotationService.scala # tools/postgres/schema.sql # webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/ZarrStreamingController.scala # webknossos-datastore/conf/com.scalableminds.webknossos.datastore.routes # webknossos-tracingstore/conf/com.scalableminds.webknossos.tracingstore.routes
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.
Wow, this is quite a piece of work 💪 🙂 Thanks a lot! I added a couple of notes to the code. I’ll do testing in the next round, please ping me again after you adressed the feedback 🙂
...tastore/app/com/scalableminds/webknossos/datastore/services/DSRemoteTracingstoreClient.scala
Outdated
Show resolved
Hide resolved
webknossos-datastore/conf/com.scalableminds.webknossos.datastore.routes
Outdated
Show resolved
Hide resolved
...tore/app/com/scalableminds/webknossos/tracingstore/controllers/VolumeTracingController.scala
Outdated
Show resolved
Hide resolved
...tastore/app/com/scalableminds/webknossos/datastore/controllers/ZarrStreamingController.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Florian M <[email protected]>
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.
Nice work!
-
@philippotto I think you mentioned that you wanted to add the possibility to share layers via zarr links in
View
mode. I would also vote to allow that if it's easily possible. -
@leowe One question regarding permissions. Who is allowed to create these sharing links? Anyone who can see a layer/an annotation? I'm thinking about the use case where someone shared an annotation with me privately via link and then later revokes the link. If I created a private zarr link in between, would I still be able to access the annotation?
-
Also, the skeleton is probably never shared, right? Maybe the text in the sharing modal could be adapted to make it more clear what exactly is being shared 🤔
@leowe I think this PR only includes the forward sql migration, but the reversion is missing. Is this intended? |
The missing front-end tasks should be done now. I added the dataset zarr link to the existing sharing modal for datasets, as I think, it fits there best. |
Hmm that may also have been caused by a merge. At least leo did mark this conversation as resolved some time ago #6367 (comment) |
The permission check right now is against the annotation owner, i.e. you can only create / update / delete private links when you own the annotation. |
Yes that seemed to have gone missing somewhere... Added it again. |
I added all the changes that were requested for the backend, i.e.:
|
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.
Frontend LGTM 👍
# Conflicts: # CHANGELOG.unreleased.md # app/models/binary/DataSetService.scala # webknossos-datastore/app/com/scalableminds/webknossos/datastore/controllers/ZarrStreamingController.scala # webknossos-datastore/app/com/scalableminds/webknossos/datastore/jzarr/ZarrHeader.scala
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.
LGTM! I also did some testing again, seemed to work as intended :) Thanks for your persistence with this!
URL of deployed dev instance (used for testing):
Steps to test (frontend):
Steps to test (backend):
First step: Get access token
POST localhost:9000/api/annotations/zarr_private
with a body like:The relevant part here is the
accessToken
.Second step: Using the private link endpoints
zarr_private
that also exists for the "normal" zarr routesdatasource-properties.json
, since it directly shows whether the requests to the tracing-store and the internal request on the datastore works, it also checks all the access rights and does the lookup from the accessToken to the annotation on webknossosGET localhost:9000/data/zarr_private/<accessToken>/datasource-properties.json
GET /zarr_private/:accessToken/:dataLayerName/:mag/:cxyz
), see Zarr streaming editable mapping support #6310 for ideas on how to check thisIssues:
(Please delete unneeded items, merge only when none are left open)