Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

canfar/vosui

 
 

Repository files navigation



User Storage User Interface (Build 1022) for CANFAR

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

This implementation has a side navigation bar and header specifically for CANFAR.

Building

Running:

gradle clean build

Will produce a war file in the build/libs directory that can be deployed into a Java container such as Tomcat or Jetty.

Configuration

User Storage requires a properties file be available, named org.opencadc.vosui.properties. Both the VOSpace web service implementation and the Files web service User Storage uses must be configured before running this UI.

VOSpace implementation

To configure the VOSpace implementation User Storage should use, the org.opencadc.vosui.properties file should contain the following entries:

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 cavern.

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:

gradle 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:

gradle -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 implementation (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 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, 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>"

Then 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.

Releases

No releases published

Packages

No packages published

Languages

  • Java 88.2%
  • FreeMarker 11.5%
  • Other 0.3%