Setting up an ownCloud Integration

The ownCloud integration is available only to our Enterprise customers.
This section is for administrators - if you are looking for help on connecting to OwnCloud as an end-user of RSpace, please see ownCloud Integration.
If your organisation is using a custom variant of ownCloud (eg. SWITCHdrive or SURFdrive), the ownCloud integration will require additional configuration work; file linking will not work without the extra setup. Please arrange a discussion between the managers of the custom system and RSpace in order to properly set up the integration.

Aim of this document

This section explains how, as an RSpace admin, you can set up RSpace to enable users to connect their OwnCloud accounts to their RSpace account.

This workflow should be followed if any of these are true:

  1. You are using your own OwnCloud server.
  2. You are an Enterprise RSpace customer and your RSpace is hosted on-premises with a non researchspace.com domain name

If your RSpace is hosted by us, it is up to you whether you want us to set up the App, or if you want to do it.

This procedure is a one-off step - it does not need to be done for every RSpace user!

Pre-requisites
  • An admin account on Owncloud
  • Access to RSpace server in order to set in the client Id and Secret you will acquire from Owncloud.
  • The RSpace server must allow 2-way HTTPS communication with Owncloud

Steps on Owncloud

Step 1 - Install the OAuth App from OwnCloud marketplace

RSpace uses OAuth 2 protocol to authenticate users to Owncloud. Install the OAuth2 App

and make sure it is enabled by clicking on the 'Apps' section of the Admin panel

Step 1a - grant access to RSpace in ownCloud configuration file

OwnCloud has a file called `config.php` for system-wide configuration settings. This might be in /path/to/owncloud/htdocs/config/config.php. You must add RSpace to the list of ''cors.allowed.domains', e.g.

cors.allowed.domains=> [
https://myrspace.somewhere.com
]

There is more information about this in ownCloud documentation

Step 2 - Register RSpace as an OAuth2 client

Still in Owncloud Admin panel, click on 'User authentication' tab and register your RSpace callback URL. This is the base URL of RSpace followed by owncloud/redirect_uri. For example, if your RSpace URL is https://myrspace.somewhere.com then the redirection URI is https://myrspace.somewhere.com/owncloud/redirect_uri. Then click 'Add'.

Once you click 'Add' a client ID and secret will be generated. Note these values.

Step 3 - Add client ID and secret to RSpace

In RSpace, open /etc/rspace/deployment.properties and add the following values, editing the values according to your actual values

owncloud.url=https://<YOUR_OWNCLOUD_URL>
owncloud.server.name=ownCloud
owncloud.auth.type=oauth
owncloud.client.id=<THE CLIENT ID FROM STEP 2>
owncloud.secret=<THE CLIENT SECRET FROM STEP 2>

Restart RSpace for the changes to take effect.

Step 4 Add RSpace to allowed CORS domains on OwnCloud side
  1. First of all, in Owncloud, go to the 'Security' tab in your settings panel and add RSpace to your CORS whitelisted domains, then click Add. For example if your RSpace is at https://myrspace.somwehere.com then add this as a whitelisted domain.
  2. Now, ensure ownCloud is enabled within the Apps section. If you can’t see this button then please ask your RSpace
Step 5 Testing

To test, you'll need a user account on OwnCloud and RSpace. Follow the instructions in the ownCloud Integration helppage.


How did we do?


Powered by HelpDocs (opens in a new tab)