Skip to content
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

[stable30] Digitally sign documents via software certificates #4170

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

vmiklos
Copy link
Contributor

@vmiklos vmiklos commented Oct 22, 2024

Summary

This is a backport to Nextcloud 30, seeing that effectively the original PR just added 3 new settings, so hopefully no need to wait till Nextcloud 31.

Document signing needs to store keys as richdocuments settings. This
involves the signing key, certificate and the matching CA chain.

As a first step, add code to the personal settings to be able to set a
CA chain that issues the signing key / certificate.

Setting and getting the setting is possible after this; the setting is
not yet exposed in the WOPI CheckFileInfo response.

<CollaboraOnline/online#9992 (comment)>
has instructions on how to generate self-signed certificates for
document signing for development purposes. Related to nextcloud#4123

Signed-off-by: Miklos Vajna <[email protected]>
(cherry picked from commit 20ca5fd)
…FileInfo

This setting was already possible to read and write from the personal
settings UI, but was not available towards Collabora Online.

Other private user settings like the Zotero API key are exposed in the
WOPI CheckFileInfo reply.

Do the same here: if the feature is enabled in general and this is not a
public share, then include the signature CA setting in the CheckFileInfo
response.

The same still needs doing for the signature cert/key. Related to nextcloud#4123

Signed-off-by: Miklos Vajna <[email protected]>
(cherry picked from commit 6ca8071)
…, too (fixes nextcloud#4123)

The CA chain for the document signing was already a user setting & it
was exposed in the WOPI CheckFileInfo, but the actual signing
certificate & key was missing, so signing was not possible.

These are typically in a similar PEM format using just ASCII characters,
so providing a textarea where the user can paste them sounds like a good
fit.

Add the read/write of this setting and also expose it as part of the
private user info in WOPI CheckFileInfo.

With this, once all 3 are configured, it's possible to sign a document
in Nextcloud Office, using the Signature button on the Home tab of the
notebookbar.

Signed-off-by: Miklos Vajna <[email protected]>
(cherry picked from commit adfb905)
@vmiklos
Copy link
Contributor Author

vmiklos commented Oct 22, 2024

@elzody could you please review this? Thanks.

I got no conflicts while backporting, FWIW.

@elzody
Copy link
Contributor

elzody commented Oct 22, 2024

@vmiklos thanks i'll take a look today, sorry for being slow on this!

@elzody
Copy link
Contributor

elzody commented Oct 23, 2024

@vmiklos Since this is a feature, normally we would not backport features and they'd just be included in the next release. Is this something really needed from the Collabora side in NC 30 or can it wait for 31, or was Julius already expecting it to be backported as well? He's out sick so unfortunately have not been able to reach him yet about it.

@pedropintosilva
Copy link
Contributor

@elzody we would like to really have this backported if we can : )

Copy link
Contributor

@elzody elzody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also works well in stable30.

@elzody elzody merged commit 3ba31ca into nextcloud:stable30 Oct 24, 2024
71 checks passed
@vmiklos vmiklos deleted the sign-stable30 branch October 25, 2024 06:20
@vmiklos
Copy link
Contributor Author

vmiklos commented Oct 25, 2024

Thanks for the review! :-)

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants