[[ux_s3]]
   
S3 storages support
-------------------

Since version 7.2.0, UNICORE/X can use an S3 storage as backend.

[NOTE]
=========================
S3 support requires the +uas-jclouds+ module, check that your "lib" directory 
includes the uas-jclouds, aws-s3, s3, etc jars
=========================


Basic configuration
~~~~~~~~~~~~~~~~~~~

To configure S3, we recommend configuring it as a storage backend for the StorageFactory
service, see xref:ux_storage_factory[].

In the following example we configure S3 in addition to the "DEFAULT" storage type.

--------------------------------
#
# Available storage types
#
coreServices.sms.factory.storagetypes=DEFAULT S3

#
# NOTE
#
# the configuration for the "DEFAULT" storage type
# is OMITTED in this example!
#

#
# S3 storage configuration
#
coreServices.sms.factory.S3.description=S3 example endpoint
coreServices.sms.factory.S3.class=de.fzj.unicore.uas.jclouds.s3.S3StorageImpl
coreServices.sms.factory.S3.type=CUSTOM
coreServices.sms.factory.S3.infoProviderClass=de.fzj.unicore.uas.jclouds.s3.S3InfoProvider
coreServices.sms.factory.S3.path=/
coreServices.sms.factory.S3.cleanup=false
coreServices.sms.factory.S3.protocols=BFT

#
# the next four settings depend on your S3 backend
#

# provider is "s3" or "aws-s3"
coreServices.sms.factory.S3.settings.provider=s3
# endpoint of the S3 
coreServices.sms.factory.S3.settings.endpoint=...
# OPTIONAL access key and secret key
coreServices.sms.factory.S3.settings.accessKey=...
coreServices.sms.factory.S3.settings.secretKey=...

# optional: may user overwrite endpoint and provider?
# this defaults to 'false'!
coreServices.sms.factory.S3.settings.allowUserdefinedEndpoint=true
-------------------------------------


Authentication keys
~~~~~~~~~~~~~~~~~~~

There are several ways to configure the required authentication keys.
Two of them are done server-side (i.e. by the UNICORE administrator) and
the third uses the keys provided by the user.

UNICORE/X looks for these keys in the following order

  * per-user keys provided by the user
  * per-user keys provided via UNICORE's attribute sources
  * fixed keys provided in the config


If second option (using attribute sources) allows to configure per-user
keys, but managing everything server-side, so the user has a nice single-sign-on 
experience when using UNICORE.

If you use the map file attribute source, an example entry looks like this:

-----------------
  <entry key="CN=Demo User,O=UNICORE,C=EU">

     <!-- standard UNICORE attributes -->

     <attribute name="role">
        <value>user</value>
     </attribute>
     <attribute name="xlogin">
        <value>somebody</value>
     </attribute>
     <attribute name="group">
        <value>users</value>
     </attribute>
     
      <!-- S3 specific attributes -->

      <attribute name="s3.accessKey">
         <value> ... access key data omitted ... </value>
      </attribute>
      <attribute name="s3.secretKey">
         <value> ... secret key data omitted ... </value>
      </attribute>     
     
   </entry>

-----------------

