UNICORE and S3 configuration

From Lsdf
Revision as of 18:03, 26 February 2015 by Diana.gudu (talk | contribs) (Adding S3 as storage backend)

UNICORE installation

For serving S3 requests through UNICORE, only a small installation of UNICORE is necessary, comprising the UNICORE Gateway and the UNICORE/X components. The setup described here, for integrating the WOS S3 storage with the Human Brain Project's UNICORE infrastructure, is depicted in the picture below. Authentication is done via Unity or OIDC. The UNICORE installation will only accept users authenticated via the HBP Unified Portal. The services should also be available via the UNICORE REST API.


The two UNICORE components can be installed from the core server bundle at [1] or the rpm/deb packages found at [2]. On Debian, for example, download the latest packages and install them:

wget http://unicore-dev.zam.kfa-juelich.de/release-candidates/core/7.2.0-packages/deb/unicore-gateway_7.2.0-2_all.deb
wget http://unicore-dev.zam.kfa-juelich.de/release-candidates/core/7.2.0-packages/deb/unicore-unicorex_7.2.0-2_all.deb
dpkg -i unicore-gateway_7.2.0-2_all.deb
dpkg -i unicore-unicorex_7.2.0-2_all.deb

The components need grid server certificates. Our host unicore.data.kit.edu has a server certificate signed by the gridka CA [3].

UNICORE Gateway setup

The following settings are needed:

  • enabling certificate-less user access, in file /etc/unicore/gateway/gateway.properties:
  • setting the gateway credential and truststore locations, in file /etc/unicore/gateway/security.properties:
#Set the trust store here
# and the gateway credential
  • configuring the sites in file /etc/unicore/gateway/connections.properties:
DEFAULT-SITE = https://unicore.data.kit.edu:7777

Starting and stopping the service can be done by running the scripts:


The gateway needs to be accessible from the internet.


The following two files need to be edited for setting up the UNICORE/X server:

/etc/unicore/unicorex/uas.config - for general settings, storages
/etc/unicore/unicorex/wsrflite.xml - for services to be deployed, SSL settings

First, set the gateway URL and identity, as well as the UNICORE/X hostname, in file wsrflite.xml:

<property name="container.baseurl" value="https://unicore.data.kit.edu:8080/DEFAULT-SITE/services"/> 
<property name="container.security.gateway.certificate" value="/etc/unicore/certs/unicore.data.kit.edu.pem"/>
<property name="container.host" value="unicore.data.kit.edu"/>
<property name="container.port" value="7777"/>

Then, set the server identity and truststore, in wsrflite.xml:

<property name="container.security.credential.path" value="/etc/unicore/certs/unicore.data.kit.edu.pem"/>
<property name="container.security.truststore.directoryLocations.1" value="/etc/unicore/unicorex/truststore/*.pem"/>
<property name="container.security.truststore.crlLocations.1" value="/etc/unicore/unicorex/truststore/*.crl"/>

Let's move now to the authentication via Unity. Configure UNICORE to trust the Unity server by pointing to it's public key (unity.pem) in PEM format (also in wsrflite.xml):

 <property name="container.security.trustedAssertionIssuers.type" value="directory" />
 <property name="container.security.trustedAssertionIssuers.directoryLocations.1" value="/etc/unicore/unicorex/unity/unity.pem" />

To enable the UNICORE REST API, edit wsrflite.xml:

<service name="core" type="rest" enabled="true">
  <interface class=""/>
  <implementation class="de.fzj.unicore.uas.rest.CoreServices"/>

To configure access control for the REST services, make sure that the file "02restServices.xml" in the "unicorex/conf/xacml2Policies" directory is present (or copy it from the core server bundle). Next, we will configure the authentication for the REST services by editing the uas.config file:

# Configured authenticators and their order
# Unity with OIDC

Adding S3 as storage backend

An existing S3 storage can be added as backend for the StorageFactory service in UNICORE. In our set-up, this is the only type of storage supported by the StorageFactoryService. You need to provide the endpoint, a description and optionally allow users to overwrite the endpoint when they create a new storage through the StorageFactory service.


# Available storage types

# S3 storage configuration
coreServices.sms.factory.S3.description=S3 at KIT

# the next four settings depend on your S3 backend
# provider is "s3" or "aws-s3"
# endpoint of the S3
# may user overwrite endpoint and provier? OPTIONAL, false by default

UNICORE offers several ways to configure the S3 authentication keys. We chose the one that offers the best single-sign-on experience for the user by managing everything server-side. This is done via UNICORE's map file attribute sources.

First make sure that the following lines are present in your uas.config file:


Then edit the simpleuudb file and add an entry for each user that looks like this:

   <entry key="...user's DN...">
      <attribute name="role">
      <attribute name="xlogin">
          <value>...local uid...</value>
      <attribute name="s3.accessKey">
         <value>...access key...</value>
      <attribute name="s3.secretKey">
          <value>...secret key...</value>

The DNs for the UNITY/OIDC users currently look like this:

CN=Name Surname 123456, O=HBP

Useful links