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 · 29 comments
Open

Electronic signature support #10630

vmiklos opened this issue Nov 29, 2024 · 29 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 <[email protected]>
@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 <[email protected]>
@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 <[email protected]>
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 <[email protected]>
@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

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 3, 2025

https://gerrit.libreoffice.org/c/core/+/179701 continues on visual signing (digital signature as a start): now the visual signature shape is inserted, but the actual crypto signature is not yet attempted.

To test it, sample test.pdf.wopi.json:

{
    "UserPrivateInfo": {
        "SignatureCert": "-----BEGIN CERTIFICATE-----\nMIIFGDCCAwCgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwaTELMAkGA1UEBhMCVUsx\nEDAOBgNVBAgMB0VuZ2xhbmQxHTAbBgNVBAoMFFhtbHNlY3VyaXR5IFJTQSBUZXN0\nMSkwJwYDVQQDDCBYbWxzZWN1cml0eSBJbnRlcm1lZGlhdGUgUm9vdCBDQTAgFw0y\nNDExMDQxMzU5MzZaGA8yMTI0MTAxMTEzNTkzNlowazELMAkGA1UEBhMCVUsxEDAO\nBgNVBAgMB0VuZ2xhbmQxHTAbBgNVBAoMFFhtbHNlY3VyaXR5IFJTQSBUZXN0MSsw\nKQYDVQQDDCJYbWxzZWN1cml0eSBSU0EgVGVzdCBleGFtcGxlIEFsaWNlMIIBIjAN\nBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqlpd+/zpqLjZi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\nVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIB\nAJEn8mM8YJMGUJLl/uVfF40L9irUSdL9R/aX7FCDvJ1FMZzBROKn7tRpar3d82+S\nOQn98o/xRUirD8gCQW40+Fe/qQyUjuhbXukv+DPnnGQ5jIsv79iPwWiKcXX/1M54\n/PmXSf+/3WM1YytCsZ/aXSEN+uCvkfQFBuP+Gn56InFAH+/RfEqLtKiEWT5AV/Mf\ni6zwr09GOd7MKM5L8H2BbdLZ9fHMXwbQMJd2qpi11fqYBqcXb9X++M2vSvYIiBga\npH9wBqabaCqQJGDLmBhNZIqI4/sseorpMCFLWqziz57lTxg+kjYkLlXXRKwXx3VR\nps+cnf7mIP3SLpiyslp1Q8NfPa+NpewJ4+2l49J+BQWhv9YMjUp9w8kUaBuKxCJ3\nWqwSXjG7WTLYV4xGkWV7Q5zN1CyzQ9VlRYhbILHYOL3kcj/hoHBoSKQHOpiPUhxq\nSZpj4lnO/kdUVuhId0KJjS9wNXMoMWAdXW04DhiqYjRapMXcdgFPkWYcbytYjtyG\nVQToeLzfsQBW0r5eF9KYSmnpDwWH82fhcU1heZMJEXs4Ttu2AWp2ycD7keFUR9G8\nd2h/o1l1dFcw+QrYNkhcEVdAZIPBG64dPlTHeeGJlKw9W+/mxeB3/JBTIvSbV+BC\nc6agWn8unRRnVW3O7Tw7EUpwPOe2wmDevGzfOYNICjwS\n-----END CERTIFICATE-----\n"
    }
}

COOL side WIP patch: patch.txt

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 6, 2025

https://gerrit.libreoffice.org/c/core/+/179821 finishes the core side of visual signing.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 7, 2025

#10862 adds initial support for visual signing on the COOL side (digital signing only, no move/resize yet).

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 8, 2025

https://gerrit.libreoffice.org/c/core/+/179938 allows setting the position of the visual signature while digital-signing. COOL side WIP patch for manual testing:

diff --git a/browser/src/control/Permission.js b/browser/src/control/Permission.js
index 7e18cda38b..2495101190 100644
--- a/browser/src/control/Permission.js
+++ b/browser/src/control/Permission.js
@@ -243,6 +243,7 @@ L.Map.include({
 
 	// Is user currently in editing mode
 	isEditMode: function() {
-		return this._permission === 'edit';
+		//return this._permission === 'edit';
+		return true;
 	}
 });

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 9, 2025

https://gerrit.libreoffice.org/c/core/+/179994 allows setting the size of the signature line, completing the core side of the "visual signature + digital signatures + LOK" part.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 10, 2025

#10891 handles the COOL side of visual signing for digital signing. Next will be the same for electronic signing.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 13, 2025

https://gerrit.libreoffice.org/c/core/+/180167 starts fixing visual signing for esign, first to allow inserting the visual signature on the core side.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 14, 2025

#10927 is the COOL side to use the "external" mode of inserting signature lines.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 15, 2025

https://gerrit.libreoffice.org/c/core/+/180264 fixes the graphic selection in the esign + visual sign case.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 16, 2025

https://gerrit.libreoffice.org/c/core/+/180332 is a cleanup: have less code in the model (instead of the view) to track visual signatures of a user.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 17, 2025

#10955 simplifies the UI: now there is a single "insert" menu item and the signing is then finished with a snackbar.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 20, 2025

https://gerrit.libreoffice.org/c/core/+/180496 fixes the problem that the signature line shape was still possible to modify after esign finished.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 21, 2025

#10973 adds 4 fixes on the COOL JS side for this, and with this the feature seems to be in a reasonable state.

Edit:

To repeat the latest info here: to test this on your own NC instance, you need to:

  1. Install a richdocuments against NC 31 beta
  2. Configure the test eID Easy endpoint, as documented in https://github.com/nextcloud/richdocuments/blob/main/docs/app_settings.md#electronic-signature
  3. Set the eID Easy client id and secret tokens, you can use the test data from https://docs.eideasy.com/guide/test-environment.html#sandbox-test-environments-credentials, i.e. secret can be 56RkLgZREDi1H0HZAvzOSAVlxu1Flx41 and client ID can be 2IaeiZXbcKzlP1KvjZH9ghty2IJKM8Lg -- you can set these at NC's /settings/admin/richdocuments page
  4. When selecting a country and provider, easiest is to select Estonia and the smart-id provider, that will accept a test personal number 30303039914 when you are asked about one in the popup.
  5. If you want to get a green sign after signing, you need to test the test CA of the provider. CA to be trusted for the test smart-id instance is estonia.txt, you can set this as trusted for your user at /settings/user/richdocuments in the CA chain textarea.

(You can also use Germany and d-trust as a provider, which results in a signature actually authored by your name, the CA chain to trust for that is germany.txt.)

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 22, 2025

https://gerrit.libreoffice.org/c/core/+/180569 tries to simplify the signature line interaction, so you typically just need to move the widget to the right place and not resize it.

Also, repeating here on what test.pdf.wopi.json to place next to a test.pdf file test esign in a 'make run' session (Estonia / smart-id case will pass test cert validation with this):

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

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 23, 2025

#10992 fixes the graphic selection handles on non-first PDF pages.

@vmiklos
Copy link
Contributor Author

vmiklos commented Jan 27, 2025

#11019 provides 4 more fixes for the non-first PDF page signing case.

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