Skip to content

at88mph/cadc-vosui

 
 

Repository files navigation

User Storage User Interface

1.2.4

A fully functional UI is deployed on CANFAR: https://www.canfar.net/storage/list/

Building

Installing:

./gradlew -i clean build install

OR

./gradlew -i clean build publishToMavenLocal

Note: The publishToMavenLocal support was added in preparation for Gradle 7. If you use Gradle 7, remove the id 'maven' plugin first.

Running:

./gradlew -i clean build

Will produce a jar file in the build/libs directory that can be used to run a local Java container using the gradlew -i run command.

Configuration

Both the VOSpace implementation and the Files web service User Storage uses must be configured before running this UI. Multiple VOSpace implementations are supported. A default must be defined.

VOSpace implementation

To configure VOSpace implementations User Storage should use, the org.opencadc.vosui.properties file should contain one set the following entries for each service:

org.opencadc.vosui.service.name = <service_name>

# The resource id of the VOSpace web service to use org.opencadc.vosui.<service_name>.service.resourceid = <URI that identifies the VOSPace web service>

# Base URI to use as node identifier org.opencadc.vosui.<service_name>.node.resourceid = <URI that is the base of node identifiers>

# Base home directory for authenticated users org.opencadc.vosui.<service_name>.user.home = <relative path, starting with '/'>

Note: replace <service_name> with the name of the VOSpace implementation in all cases, ie vault or arc.

The default VOSpace service must be explicitly named in the config file as well:

org.opencadc.vosui.service.default = <default service_name>

File service implementation

To configure the File service org.opencadc.vosui.properties should contain the following entry:

# Files service for returning content org.opencadc.vospace.files_meta_service_id = <URI resource ID of Files service>

Running

Environment

In order for Authorization and Authentication to work properly, the User Storage UI uses Domain Cookies to pass from the browser to the application. The browser will always send a valid cookie to the server whose domain matches the cookie's, but the application will then make another request to the VOSpace Web Service using the cookie. The VOSpace Web Service can run on a different domain, however, which presents a problem for cookie passing.

To get around this, please supply a property called SSO_SERVERS containing a space delimited list of trusted servers one of two ways:

  • As a System property (e.g. -DSSO_SERVERS="<host 1> <host 2>" etc.)
  • In a file located at ${user.home}/config/AccessControl.properties (e.g. cat SSO_SERVERS=<host 1> <host 2> > $HOME/config/AccessControl.properties)

The hostnames included in this property are all of the servers involved in your setup (i.e. the web server, and the VOSpace Web Service host).

For an embedded Jetty container, you can just run:

gradlew -i run

To produce a running embedded Jetty container running on port 8080, with a debug port on 5555.

Pass your own Registry settings into the JAVA_OPTS environment variable to use your own VOSpace service:

gradlew -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -Djava.security.egd=file:/dev/./urandom -Djsse.enableSNIExtension=false -Dca.nrc.cadc.reg.client.RegistryClient.host=<your host for IVOA Registry host> run

To specify the Service ID (often called Resource ID) of your services. The User Storage Interface relies on two services:

  • A VOSpace web service (e.g. vault or cavern)
  • Group Management Service (Access Control)

See the 'Configuration' section for how to set up access to a VOSpace implementation.

To specify the Service ID for Group Management, add the appropriate System property, e.g.:

... -Dorg.opencadc.gms.service_id=ivo://<your domain>/<gms service name> ...

Or, from the examples directory, deploy the war file in build/libs into a Java container such as Tomcat.

Then, in your browser, look at http://localhost:8080/storage/list.

Running with Docker

See the Docker repo here:

https://hub.docker.com/r/opencadc/storage/

It uses the lightweight Tomcat 8.5 java container that was built using Alpine Linux found here:

https://hub.docker.com/_/tomcat/

To run it as-is and use the CANFAR VOSpace Service, use:

docker run --name storage -d -p 8080:8080 -p 5555:5555 opencadc/storage

Then, in your browser, look at http://localhost:8080/storage/list.

Running with Docker for your environment

To run in your environment, switch to the examples directory and create your own Dockerfile:

# This is the Docker hub location for the User Storage User Interface (Project Beacon)
FROM opencadc/storage

# The JAVA_OPTS variable to pass to Tomcat.  Note the -Dca.nrc.cadc.reg.client.RegistryClient.host property.
ENV JAVA_OPTS "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -Djava.security.egd=file:/dev/./urandom -Djsse.enableSNIExtension=false -Dca.nrc.cadc.reg.client.RegistryClient.host=<your host for IVOA Registry lookup>"

Also in the examples directory, run:

docker build -t user_storage_ui .

Then run it:

docker run --name storage -d -p 8080:8080 -p 5555:5555 user_storage_ui

Or mount your own built war:

docker run --name storage -d -p 8080:8080 -p 5555:5555 -v $(pwd)/build/libs:/usr/local/tomcat/webapps user_storage_ui

Then, in your browser, look at http://localhost:8080/storage/list.

About

Portable VOSpace browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 48.3%
  • Java 26.8%
  • HTML 14.3%
  • CSS 4.4%
  • CoffeeScript 4.3%
  • FreeMarker 0.8%
  • Other 1.1%