Skip to content

WOPI integration#1495

Open
brandon-doornbos wants to merge 14 commits into
9001:hovudstraumfrom
brandon-doornbos:cool
Open

WOPI integration#1495
brandon-doornbos wants to merge 14 commits into
9001:hovudstraumfrom
brandon-doornbos:cool

Conversation

@brandon-doornbos

@brandon-doornbos brandon-doornbos commented May 23, 2026

Copy link
Copy Markdown

This PR adds WOPI integration to Copyparty, mainly from a Collabora Online perspective (hit me up if you tested other impls that didn't work). See below how it should work.

Screencast_20260523_230350.webm

Adds an option to enable WOPI and to specify the WOPI client (e.g. self-hosted Collabora Online). The client is by default set to the EU demo server of Collabora themselves, which you can use if you access your Copyparty through a publicly accessible URL (so Collabora can actually get your file).

WOPI expects a file-id and access-token for each session, we implement this through the default file-key generation and salt for file-id and through a (os) random salt (re-generated on every document open) on the username for access-token. These then get stored in a dictionary in the http server to re-authenticate only that specific combination of file-key and access-token.

(Future) TODOs:

This PR complies with the DCO; https://developercertificate.org/

@icxes

icxes commented May 23, 2026

Copy link
Copy Markdown
Contributor

related issue #423

Now using file_keys so anyone can't just steal the files just by path.

We're also getting en setting the URL properly now.
Use randomly salted hash of username as access_token and authenticate
with it.
@brandon-doornbos brandon-doornbos marked this pull request as ready for review June 4, 2026 02:49
@brandon-doornbos

brandon-doornbos commented Jun 4, 2026

Copy link
Copy Markdown
Author

Since this adds another way of authenticating, if someone else could check my logic would be nice :). Let me know if I need to change things or if this isn't appropriate for the project.

If it's close I'll start on documentation in the readme.

Demo WOPI client btw: https://demo.eu.collaboraonline.com

@i0nicle

i0nicle commented Jun 6, 2026

Copy link
Copy Markdown

would b awesome if this got merged B) would replace my seafile + collabora setup

@9001

9001 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

haven't had a chance to look at this yet and will probably be a while still, but wanted to mention something right away --

copyparty does not and will never have support for locking files or folders, will never any sort of file locking at all -- this is an intentinoal choice because the complications and safety implications of having to ensure that such locks behave correctly is not something I want to maintain or guarantee

so if that could be a problem then maybe this is a bad idea , I just recall someone saying wopi would expect correct locking behavior

@brandon-doornbos

brandon-doornbos commented Jun 16, 2026

Copy link
Copy Markdown
Author

Thanks for the heads-up, I'll put it in the documentation for other implementations. For Collabora anyway, this actually has handling on their side, although I'll look at properly handling it from our side. (edit, should be done, see 8304388)

@brandon-doornbos brandon-doornbos changed the title Prototype WOPI integration WOPI integration Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants