ViSUS Server

From
Revision as of 15:57, 24 August 2017 by Admin (talk | contribs)
Jump to: navigation, search

Manual installation

Supported Requests

All requests to the server must specify action= with one of the following commands followed by the corresponding arguments. Note that the user agent is used by some requests to determine the default return type (e.g., for listing datasets).

list

Lists datasets hosted by this server. curl -A visus "http://yourserver.org/mod_visus?action=list"

add_dataset (synonymous with AddDataset)

Adds a dataset to an already-running server.

curl -A visus "http://yourserver.org/mod_visus?action=add_dataset --data-urlencode "xml=<dataset name=\"flame\" permissions=\"public\" url=\"file:///path/to/data/flame/my_flame.idx\"></dataset>"

or alternatively:

curl -A visus "http://yourserver.org/mod_visus?action=add_dataset&name=flame&url=file:///usr/sci/cedmav/data/comp_mat/cracked/idx/cracked.idx"

readdataset (synonymous with read_dataset)

Retrieves the metadata for a given dataset.

curl -A visus "http://atlanta.sci.utah.edu/mod_visus?action=readdataset&dataset=2kbit1"

configure_datasets

Forces the server to reload its internal configuration, ensuring all known datasets are available for retrieval.

curl -A visus "http://atlanta.sci.utah.edu/mod_visus?action=configure_datasets"

Security: Apache authentication

In case you want these requests to be made only by authenticated users or users from a specific network source you can use Apache authentication.

Furthermore some of these commands, such as add_dataset and configure_datasets, might be harmful for your server due to malicious anonymous requests.

On Apache you can configure a set of users that can perform specific requests to the server creating first an AuthUserFile as following:

htpasswd -c /var/lib/wwwrun/visus/.htpasswd your_username htpasswd /var/lib/wwwrun/visus/.htpasswd another_username

These commands will also ask you to set a password for each user. This will create a file .htpasswd that contains the list of the authorized users and the encrypted passwords.

This file can be used to tell Apache which user can do specific requests. In the following example we added to the httpd.conf of Apache (version 2.4) some conditions that will require authenticated users only to perform add_dataset and configure_datasets. All the other request (e.g. listing) will be granted to all.

<LocationMatch "/mod_visus">
  <If "%{QUERY_STRING} =~ /.*action=AddDataset.*/ || %{QUERY_STRING} =~ /.*action=configure_datasets.*/" >
    AuthType Basic
    AuthName "Authentication Required"
    AuthUserFile "/var/lib/wwwrun/visus/.htpasswd"
    Require valid-user
  </If>

  <Else>
    Require all granted
  </Else>

  SetHandler visus
</LocationMatch>

Docker Deployment

A ViSUS server deployed using the ViSUS Docker Deployment is ready to use.

The ViSUS configuration file enables the server to locate datasets and make them accessible to the users (via the ViSUS Viewer).