Skip to content

feat(wopi): WOPI proof #4902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat(wopi): WOPI proof #4902

wants to merge 2 commits into from

Conversation

elzody
Copy link
Contributor

@elzody elzody commented Jul 22, 2025

  • Target version: main

Summary

WOPI proof validation ensures that WOPI requests are genuine. It also helps in cases that prevent download, as without it anyone with an access token and the WOPI source URL can still get the file contents.

You can generate a key pair by running:

sudo coolconfig generate-proof-key

or if you are using a configuration directory other than /etc, you can manually invoke ssh-keygen:

ssh-keygen -t rsa -N "" -m PEM -f /some/path/proof_key

If you are using Docker you need to mount the key pair into the container as a volume.

Once generated, you need to restart coolwsd for the server to start using it. Nextcloud will automatically detect that a proof is being sent with the request and begin verifying each request from there on out. If you remove the key pair, the Collabora server will still continue to use them until it is restarted. Again, Nextcloud would detect this and stop verifying requests. It does this by detecting discrepancies between the cached discovery information from the Collabora server and whether or not the server is sending a proof in the X-WOPI-Proof header. If necessary, the discovery information will be re-fetched and cached in order to obtain the proof key as well as the RSA modulus and exponent so that it can verify the signature of the proof sent in the request header.

TODO

  • Unit tests

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

@elzody elzody self-assigned this Jul 22, 2025
@elzody elzody added the enhancement New feature or request label Jul 22, 2025
@elzody elzody added 2. developing Work in progress php Pull requests that update Php code tests feature: wopi host labels Jul 22, 2025
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Jul 22, 2025
@elzody elzody moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Office team Jul 22, 2025
@elzody elzody force-pushed the feat/wopi-proof branch from bb07c82 to 9cc09a3 Compare July 29, 2025 21:45
@elzody elzody marked this pull request as ready for review July 29, 2025 22:27
@elzody elzody requested a review from juliusknorr as a code owner July 29, 2025 22:27
@elzody elzody moved this from 🏗️ In progress to 👀 In review in 📝 Office team Jul 29, 2025
@elzody elzody requested a review from blizzz July 29, 2025 22:29
@elzody elzody force-pushed the feat/wopi-proof branch from fab2eba to cbc0cb4 Compare July 30, 2025 16:38
@elzody elzody requested a review from a team July 30, 2025 19:22
elzody added 2 commits August 5, 2025 12:57
Signed-off-by: Elizabeth Danzberger <[email protected]>
Signed-off-by: Elizabeth Danzberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request feature: wopi host php Pull requests that update Php code tests
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant