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_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 theX-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
Checklist