Feature #4728

[SDKs] 'arv-get' should be able to do anonymous collection downloads using scoped token from "share" link

Added by Abram Connelly over 5 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
SDKs
Target version:
-
Start date:
12/05/2014
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

When trying to access the following collection:

https://workbench.qr1hi.arvadosapi.com/collections/download/qr1hi-4zz18-nqd6xzjpoj95nyc/4jjrkxvangx4ta6otcudr6ehkzf5swph2fdgbgd70fl4r4ll1g/

through 'arv-get', the following error is generated:

$ collection='qr1hi-4zz18-nqd6xzjpoj95nyc'
$ token='4jjrkxvangx4ta6otcudr6ehkzf5swph2fdgbgd70fl4r4ll1g'
$ host='qr1hi.arvadosapi.com'

$ HISTIGNORE=$HISTIGNORE:'export ARVADOS_API_TOKEN=*'
$ export ARVADOS_API_TOKEN=$token
$ export ARVADOS_API_HOST=$host
$ unset ARVADOS_API_HOST_INSECURE

$ arv-get $collection/testing.txt .
Traceback (most recent call last):
  File "/usr/local/bin/arv-get", line 198, in <module>
    for data in f.readall():
  File "/usr/local/lib/python2.7/dist-packages/arvados/stream.py", line 184, in readall
    data = self.read(size, num_retries=num_retries)
  File "/usr/local/lib/python2.7/dist-packages/arvados/arvfile.py", line 15, in wrapper
    return orig_func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/arvados/retry.py", line 157, in num_retries_setter
    return orig_func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/arvados/stream.py", line 162, in read
    num_retries=num_retries)
  File "/usr/local/lib/python2.7/dist-packages/arvados/retry.py", line 157, in num_retries_setter
    return orig_func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/arvados/stream.py", line 319, in readfrom
    data.append(self._keep.get(locator, num_retries=num_retries)[segmentoffset:segmentoffset+segmentsize])
  File "/usr/local/lib/python2.7/dist-packages/arvados/retry.py", line 157, in num_retries_setter
    return orig_func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/arvados/keep.py", line 654, in get
    raise arvados.errors.NotFoundError(loc_s)
arvados.errors.NotFoundError: eb1a3227cdc3fedbaec2fe38bf6c044a+8+A8bcdd16fdcf7ef88abb79d91cd7ac5804fcc6059@5494561d

Downloading the file through the shared link works. This is only an issue with using 'arv-get' when trying to download the collection or files within the anonymous collection.


Related issues

Related to Arvados - Story #2659: [Workbench] Anonymous user can access publicly shared data using Workbench and curlResolved02/02/2015

History

#1 Updated by Brett Smith over 5 years ago

  • Subject changed from 'arv-get' does not work for anonymous collection downloads to [SDKs] 'arv-get' does not work for anonymous collection downloads
  • Category set to SDKs
  • Target version set to Bug Triage

Moving to Bug Triage for further discussion on whether this is a bug or feature. Like I told Abram on IRC, it ought to work, and it's pretty clear why it would be handy, but we've never officially supported it either.

Maybe the token is scoped such that you can't go through a Keep proxy?

#2 Updated by Tom Clegg over 5 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from [SDKs] 'arv-get' does not work for anonymous collection downloads to [SDKs] 'arv-get' should be able to do anonymous collection downloads using scoped token from "share" link

#3 Updated by Tom Clegg over 5 years ago

  • Target version deleted (Bug Triage)

#4 Updated by Peter Amstutz 5 months ago

  • Status changed from New to Closed

Also available in: Atom PDF