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

cool#9992 doc sign: local file wopi provider: allow setting the sign cert/key/ca #10172

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

vmiklos
Copy link
Contributor

@vmiklos vmiklos commented Oct 4, 2024

Debugging the entire file storage -> COOL -> LO core chain in one step
can be complex, issues are easier to investigate if a COOL 'make run'
setup can also reproduce the problem. Not to mention that testing with
cypress is easier if the test case doesn't require an integration.

Signing certificates are meant to be handled similar to previous secrets
like the Zotero API key, but that only works with a file storage
integration.

Solve the problem by looking for files next to the loaded document for
the 'local file' WOPI provider (in debug mode). So for example test.odt
looks for files named test.odt.cert.pem, test.odt.key.pem and
test.odt.ca.pem: if those exist, then you can sign the document without
an integration.

The kit process in Document::load() doesn't make use of this sign data
yet, though.

Signed-off-by: Miklos Vajna vmiklos@collabora.com
Change-Id: Ib382d7e843b5f6ff5cd101291ce897628e312af8

@vmiklos vmiklos mentioned this pull request Oct 4, 2024
@vmiklos vmiklos requested a review from caolanm October 4, 2024 07:09
@vmiklos
Copy link
Contributor Author

vmiklos commented Oct 4, 2024

@caolanm could you please review this? Thanks.

This is the local file wopi provider, available in --enable-debug builds. I'm still working on the shared wopi code part (that'll be relevant for both the 'make run' and the "nextcloud" case).

return {};
}

std::string content;
Copy link
Contributor

Choose a reason for hiding this comment

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

this line looks like dead code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah indeed, first I thought I can read into an std::string directly, then later it turned out I need a string stream instead. Let me fix.

Copy link
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

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

fine by me

…cert/key/ca

Debugging the entire file storage -> COOL -> LO core chain in one step
can be complex, issues are easier to investigate if a COOL 'make run'
setup can also reproduce the problem. Not to mention that testing with
cypress is easier if the test case doesn't require an integration.

Signing certificates are meant to be handled similar to previous secrets
like the Zotero API key, but that only works with a file storage
integration.

Solve the problem by looking for files next to the loaded document for
the 'local file' WOPI provider (in debug mode). So for example test.odt
looks for files named test.odt.cert.pem, test.odt.key.pem and
test.odt.ca.pem: if those exist, then you can sign the document without
an integration.

The kit process in Document::load() doesn't make use of this sign data
yet, though.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib382d7e843b5f6ff5cd101291ce897628e312af8
@vmiklos vmiklos force-pushed the private/vmiklos/sign branch from effd6c1 to 3015582 Compare October 4, 2024 07:56
@vmiklos vmiklos merged commit 497981c into master Oct 4, 2024
14 checks passed
@vmiklos vmiklos deleted the private/vmiklos/sign branch October 4, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants