This service is part of the ScienceMesh Interoperability Platform (IOP) and implements a vendor-neutral application gateway compatible with the Web-application Open Platform Interface (WOPI) specifications.
It enables ScienceMesh EFSS storages to integrate Office Online platforms including Microsoft Office Online and Collabora Online. In addition it implements a bridge module with dedicated extensions to support apps like CodiMD and Etherpad.
Author: Giuseppe Lo Presti (@glpatcern)
Contributors (oldest contributions first):
Initial revision: December 2016
First production version for CERNBox: September 2017 (presented at oCCon17 - slides)
Integration in the CS3 Organisation: April 2020
This WOPI server implements the required APIs to ensure full compatibility with Microsoft Office (as provided via the CSPP Terms), Collabora Online, and ONLYOFFICE.
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, and the CI runs it as well (TODO test against Reva in the CI).
To run the tests, either run pytest
if available in your system, or execute the following:
python3 test/test_storageiface.py [-v]
python3 test/test_storageiface.py [-v] TestStorage.<the test you would like to run>
test/wopiserver-test.conf
such that the wopiserver can talk to your Reva instance: use this example for a skeleton configurationWOPI_STORAGE=cs3 python3 test/test_storageiface.py
wopiserver.conf
following the example above, and make sure the iopsecret
file contains the same secret as configured in the Reva appprovidertest/wopiserver-test.conf
according to your Eos setup (the provided defaults are valid at CERN)WOPI_STORAGE=xroot python3 test/test_storageiface.py
wopiserver.conf
according to the Puppet infrastructureRefer to these notes. Microsoft also provides a graphical version of the test suite as part of their Office 365 offer, which is also supported via the Reva open-in-app workflow.
pip install -r requirements.txt
sudo mkdir /var/log/wopi/ && sudo chmod a+rwx /var/log/wopi
sudo mkdir /etc/wopi/ && sudo chmod a+rwx /etc/wopi
sudo mkdir /var/spool/wopirecovery && sudo chmod a+rwx /var/spool/wopirecovery
iopsecret
and wopisecret
in the folder /etc/wopi/
, create random strings for the secrets/etc/wopi/wopiserver.defaults.conf
/etc/wopi/wopiserver.conf
: start from docker/etc/wopiserver.conf
for a minimal configuration and add from the defaults file as neededpython3 src/wopiserver.py
Once the WOPI server runs on top of local storage, the tools/wopiopen.py
script can be used
to test the open-in-app workflow.
For that, assuming you have e.g. CodiMD deployed in your cluster:
test.md
file in your local storage folder, e.g. /var/wopi_local_storage
tools/wopiopen.py -a CodiMD -i "internal_CodiMD_URL" -u "user_visible_CodiMD_URL" -k CodiMD_API_Key test.md
app-url
. Open it in a browser to access the file. Otherwise, the tool prints the response from the WOPI server and the logs should help troubleshooting the problem.