A Vendor-neutral Web-application Open Platform Interface (WOPI) gateway for EFSS systems, to integrate several Office Online platforms including Microsoft Office Online and Collabora Online.
Author: Giuseppe Lo Presti (@glpatcern)
Contributions: Michael DSilva (@madsi1m), Lovisa Lugnegaard (@LovisaLugnegard), Samuel Alfageme (@SamuAlfageme), Ishank Arora (@ishank011)
Initial revision: December 2016
First production version for CERNBox: September 2017
Integration in the CS3 Organisation: April 2020
This project has been presented at the ownCloud Conference 2017. Slides available at slideshare.net.
The /test
folder contains some unit tests for the supported storage interfaces.
No tests are provided (yet) for the core WOPI server, though the test suite aims at covering all
storage access patterns used by the WOPI server.
By default, the local storage is tested. To run the tests, use the standard python unittest arguments:
- Go to the test folder
cd test
- Run all tests:
python3 test_storageiface.py [-v]
- Run only one test:
python3 test_storageiface.py [-v] TestStorage.<the test you would like to run>
- Clone reva (https://github.com/cs3org/reva)
- Run Reva according to https://reva.link/docs/tutorials/share-tutorial/ (ie up until step 4 in the instructions).
- Go to the test folder
cd test
- Run the tests:
WOPI_STORAGE=cs3 python3 test_storageiface.py
- Make sure your Eos instance is configured to accept connections from WOPI as a privileged gateway
- Go to the test folder
cd test
- Configure
wopiserver-test.conf
according to your Eos setup. The provided defaults are valid at CERN. - Run the tests:
WOPI_STORAGE=xroot python3 test_storageiface.py
- Run Reva as detailed above
- Login with
reva login
- Extract (from the logs) your
x-access-token
- Upload an ODF or .md file with the reva CLI (or copy it to Reva's storage, e.g. in
/var/tmp/reva/data/einstein
) - From the wopiserver container, execute
wopiopen.py -v READ_WRITE /<your_file.odt> <your_x-access-token>
- If the above call is successful, you are given the URL of the application provider, with appropriate parameters (including a WOPI access token) to open your file: open it in a browser to start your edit session via WOPI
For testing collaborative scenarios, repeat the above for each user participating in the collaborative session. Reusing the x-access-token
is OK, however it is generally not OK to open multiple times the same application provider URL, and different WOPI access tokens are needed instead.
- Install all requirements listed in
requirements.txt
- Add log file directory:
sudo mkdir /var/log/wopi/ && sudo chmod a+rwx /var/log/wopi
- Create the folder for the wopi config:
sudo mkdir /etc/wopi/ && sudo chmod a+rwx /etc/wopi
- Create the files
iopsecret
andwopiscret
in the folder/etc/wopi/
, create random strings for the secrets - Create a local config file
/etc/wopi/wopiserver.conf
with the needed parameters: start fromdocker/etc/wopiserver.conf
, and make sure that at least an application provider URL is configured (e.g.codeurl
for Collabora) - From the WOPI server folder run:
python3 src/wopiserver.py