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

Electronic signature support #10630

Open
vmiklos opened this issue Nov 29, 2024 · 13 comments
Open

Electronic signature support #10630

vmiklos opened this issue Nov 29, 2024 · 13 comments
Assignees
Labels
24.04 enhancement New feature or request

Comments

@vmiklos
Copy link
Contributor

vmiklos commented Nov 29, 2024

Is your feature request related to a problem?

This is a follow-up to #9992, that one focused on digital signing with PEM files (similar to libreoffice signing on the desktop), this focuses on electronic signing using eIDEasy.

Describe the solution you'd like

Something that doesn't send the entire PDF file to an external server (only the hash of the document) and produces a qualified electronic signature, so it can be considered as a digital equivalent to handwritten signatures.

Describe alternatives you've considered

Just expose digital signing from libreoffice desktop, and declare that obtaining trusted certificates is somebody else's problem.

Additional context

The above GH issue already has a single working scenario for electronic signing, this one tracks the various still to be fixed details after something works end-to-end.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 2, 2024

#10637 adds UI to select which eideasy provider to use, though anything redirect-based (e.g. D-Trust sign-me) is supposed to be not working, I'm working on a test env there to reproduce this.

Sample test.pdf.user-private-info.json, to be used with the smart-id-signature test provider:

{
    "ESignatureBaseUrl": "https://test.eideasy.com",
    "ESignatureSecret": "56RkLgZREDi1H0HZAvzOSAVlxu1Flx41",
    "ESignatureClientId": "2IaeiZXbcKzlP1KvjZH9ghty2IJKM8Lg",
    "SignatureCa": "-----BEGIN CERTIFICATE-----\nMIIG+DCCBeCgAwIBAgIQUkCP5k8r59RXxWzfbx+GsjANBgkqhkiG9w0BAQwFADB9\nMQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1\nczEwMC4GA1UEAwwnVEVTVCBvZiBFRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBSb290\nIENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwIB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ruIAPC3FxW7zebKc\nA2B66j4tW7uyF2kPx4WWA3xgR5QZnn4ePEAYjJdu1eWd9KbeAbxPCfFOST43t0fm\n20HfV2Wp2PMEq4b2\n-----END CERTIFICATE-----\n"
}

The personal identity code is the public 30303039914 test number. It should result in a signature by "TESTNUMBER,OK" (a fake first+last name).

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 3, 2024

#10647 improves error handling when the client-id is bad; found while starting on the redirect method.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 4, 2024

#10654 adds a new /cool/signature endpoint, to be used with the redirect method.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 5, 2024

#10661 finishes support for redirect-based providers.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 6, 2024

#10672 starts moving eideasy calls that require a secret to the servers.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 9, 2024

#10688 finishes moving eideasy calls that require a secret to the server.

vmiklos added a commit to nextcloud/richdocuments that referenced this issue Dec 10, 2024
Electronic signing needs to store settings as richdocuments settings.
This involves the API URL, a client ID visible to the browser and a
secret, which is only used during server-side requests.

The WOPI CheckFileInfo reply sends this information to the COOL server,
similar to how it's done for digital signing (via PEM files).

Add the settings as admin settings, otherwise normal users would be able
to use eIDEasy services outside richdocuments.

<CollaboraOnline/online#10630 (comment)>
has instructions on what test data to use to try out the service in a
test environment. Additionally, if the test CA is configured to be
trusted as a user setting, then the green stamp icon will show up in the
status bar.
vmiklos added a commit to nextcloud/richdocuments that referenced this issue Dec 10, 2024
Electronic signing needs to store settings as richdocuments settings.
This involves the API URL, a client ID visible to the browser and a
secret, which is only used during server-side requests.

The WOPI CheckFileInfo reply sends this information to the COOL server,
similar to how it's done for digital signing (via PEM files).

Add the settings as admin settings, otherwise normal users would be able
to use eIDEasy services outside richdocuments.

<CollaboraOnline/online#10630 (comment)>
has instructions on what test data to use to try out the service in a
test environment. Additionally, if the test CA is configured to be
trusted as a user setting, then the green stamp icon will show up in the
status bar.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 10, 2024

nextcloud/richdocuments#4328 adds Nextcloud UI for for the new eideasy settings.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 11, 2024

#10706 fixes the l10n of the popup window, which was English-only previously.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 12, 2024

#10719 starts adding a country selector to the esign dialog.

vmiklos added a commit to nextcloud/richdocuments that referenced this issue Dec 12, 2024
Electronic signing needs to store settings as richdocuments settings.
This involves the API URL, a client ID visible to the browser and a
secret, which is only used during server-side requests.

The WOPI CheckFileInfo reply sends this information to the COOL server,
similar to how it's done for digital signing (via PEM files).

Add the settings as admin settings, otherwise normal users would be able
to use eIDEasy services outside richdocuments.

<CollaboraOnline/online#10630 (comment)>
has instructions on what test data to use to try out the service in a
test environment. Additionally, if the test CA is configured to be
trusted as a user setting, then the green stamp icon will show up in the
status bar.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 16, 2024

#10734 changes the WOPI key names for esign settings, based on feedback from Nextcloud.

vmiklos added a commit to nextcloud/richdocuments that referenced this issue Dec 16, 2024
Electronic signing needs to store settings as richdocuments settings.
This involves the API URL, a client ID visible to the browser and a
secret, which is only used during server-side requests.

The WOPI CheckFileInfo reply sends this information to the COOL server,
similar to how it's done for digital signing (via PEM files).

Add the settings as admin settings, otherwise normal users would be able
to use eIDEasy services outside richdocuments.

<CollaboraOnline/online#10630 (comment)>
has instructions on what test data to use to try out the service in a
test environment. Additionally, if the test CA is configured to be
trusted as a user setting, then the green stamp icon will show up in the
status bar.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
vmiklos added a commit to nextcloud/richdocuments that referenced this issue Dec 16, 2024
Electronic signing needs to store settings as richdocuments settings.
This involves the API URL, a client ID visible to the browser and a
secret, which is only used during server-side requests.

The WOPI CheckFileInfo reply sends this information to the COOL server,
similar to how it's done for digital signing (via PEM files).

Add the settings as admin settings, otherwise normal users would be able
to use eIDEasy services outside richdocuments.

<CollaboraOnline/online#10630 (comment)>
has instructions on what test data to use to try out the service in a
test environment. Additionally, if the test CA is configured to be
trusted as a user setting, then the green stamp icon will show up in the
status bar.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 17, 2024

#10743 adds filtering for the providers, so the ones relevant for a country will be shown, the others will be hidden.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 18, 2024

#10755 sorts the esign dialog dropdowns; which is now possible after tracking the input IDs/codes for these widgets.

@vmiklos
Copy link
Contributor Author

vmiklos commented Dec 19, 2024

https://gerrit.libreoffice.org/c/core/+/178784 starts on visual signing: first just make sure a single signature gets inserted on the Draw / PDF .uno:InsertSignatureLine case. COOL side patch to trigger the UNO command:
patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
24.04 enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant