cyverse-de/anon-files

Name: anon-files

Owner: CyVerse Discovery Environment

Description: null

Created: 2016-08-29 19:48:30.0

Updated: 2017-09-25 20:47:50.0

Pushed: 2017-04-12 21:35:06.0

Homepage: null

Size: 131

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

anon-files

A Discovery Environment service that serves up files that have been shared with the anonymous user in iRODS.

Build
onfigure

-files's configuration file must be in the properties file format. Here's an unconfigured anon-files properties file:

irods-host =
irods-port =
irods-user =
irods-password =
irods-zone =
irods-home =
anon-user = anonymous
port = 60000
log-file =

Dockerfile is expecting anon-files to be listening on port 60000, so it's not recommended to place something different in the config file.

 are the command-line options:

A service that serves up files shared with the iRODS anonymous user.

Usage: anon-files [options]

Options:
  -p, --port PORT                                       Port number
  -c, --config PATH      /etc/iplant/de/anon-files.edn  Path to the config file
  -v, --version                                         Print out the version number.
  -h, --help

un

docker run -P -d --name anon-files -v /path/to/config:/etc/iplant/de/anon-files.properties discoenv/anon-files

*docker ps* to see which random port anon-files is listening on.

ownloading files

-files supports downloading files either all at once or by byte ranges. The caller must already know the path to the file inside iRODS; the path in iRODS corresponds to the path in the URI.

-files does not currently support request pre-conditions or multiple byte ranges per request.

he lower bound on a request is greater than the file's size, anon-files will return a 416 status code as defined in http://tools.ietf.org/html/rfc7233.

he upper bound on a range request is greater than the file size, then the returned data will go up to the end of the file and have a status of 206.

 range request consists of a single negative value, then it is used as a negative index into the content and the range is interpreted as being from that point to the end of the content.

curl -H "Range: bytes=-10" http://localhost:8080/path/to/file

 range request consists of a single positive value, then the range header is ignored and the entire content is downloaded. A single value is not enough information to determine what is wanted from the client, but the RFC implies that it shouldn't be treated as an error (unless I'm missing something, which is likely). To download a single byte from the content, perform a request like the following:

curl -H "Range: bytes=10-10" http://localhost:8080/path/to/file

ccessful ranged request will return the requested byte range and have a 206 status code. A requested range that is unsatisfiable (for instance, the lower bound is higher than the file size) will have a status code of 416.

 range requests will have the following HTTP headers in the response:
ntent-Range (see http://tools.ietf.org/html/rfc7233 for more info)
ntent-Length (see http://tools.ietf.org/html/rfc7233 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more info)
cept-Ranges (always set to bytes)
che-Control (this will always be set to no-cache)
ag (we're using a weak ETag based on the last modified date)
pires (always set to 0)
ry (always set to *)
ntent-Location (the path to the file in iRODS)

icense

[LICENSE](LICENSE)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.