feat(wopi): WOPI proof - #4902
Merged
Merged
Conversation
elzody
marked this pull request as ready for review
July 29, 2025 22:27
blizzz
approved these changes
Aug 14, 2025
blizzz
left a comment
Member
There was a problem hiding this comment.
One comment to double check, otherwise looking good 👍
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
elzody
force-pushed
the
feat/wopi-proof
branch
from
August 14, 2025 15:06
f3a8c41 to
91ddbf2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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_keyIf you are using Docker you need to mount the key pair into the container as a volume.
Once generated, you need to restart
coolwsdfor 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 theX-WOPI-Proofheader. 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
Checklist