seung-lab / cloud-volume

Read and write Neuroglancer datasets programmatically.
https://twitter.com/thundercloudvol
BSD 3-Clause "New" or "Revised" License
127 stars 42 forks source link

"graphene://middleauth+https://" protocol in a cloudpath does not work #610

Open ceesem opened 3 months ago

ceesem commented 3 months ago

As part of the development of graphene integration in Neuroglancer, the auth protocol is provided to neuroglancer as an additional scheme: graphene://middleauth+https:// instead of just graphene://https://. Currently, however that gives the error:

Cloud Path must conform to [FORMAT://PROTOCOL://BUCKET/PATH](format://PROTOCOL//BUCKET/PATH)

For convenience in coming to cloudvolume from neuroglancer, it would be nice if this multi-scheme URL were acceptable and treated as equivalent to graphene://https://.

william-silversmith commented 3 months ago

Not a bad idea. Are there any other + types? Should I just selectively delete middleauth+ or be more generic?

chrisj commented 3 months ago

ngauth possibly

https://github.com/google/neuroglancer/blob/145ce39e54bfaaa6fbf106d46c5f5bf613c04155/src/util/special_protocol_request.ts#L76

ceesem commented 3 months ago

I wouldn't delete the middleauth+ per se, but rather treat it as an explicit indication to use the CAVE token header. We actually have one case where we have imagery that's behind authentication, and the Neuroglancer cloudpath is precomputed://middleauth+https://. It would actually be perfect if that that indicated how to add the correct header information.

william-silversmith commented 1 month ago

Can you share that image case with me? I would like to see if I can get it to work.