How to implement digital signature with my existing web project
Asked Answered
H

3

8

I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application.

I installed alfresco community edition on Linux server (https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition) and followed the instruction as below GitHub link.

https://github.com/zylklab/alfresco-sinadura

I've implemented successfully with above instructions. But Alfresco is the big project and given several other features too. But I don't need that and I just need to implement digital signature part into my own web application similar to alfresco

How to implement the digital signature part in my existing project? Can anyone please give a suggestion

Haeckel answered 2/5, 2018 at 15:24 Comment(5)
Hi All, Is there any way to develop this without alfresco or with alfresco but only for signing document i.e I want to open a document In iframe in my another web project with the 'sign' button. the program should open the document from particular location & start the signature process and store into the same/different location when user clicks sign buttonHaeckel
I don't want whole alfresco UI except sign with sinadura button action to my another web project( ie. built on a top of GWT).Haeckel
I would suggest that you start by explaining what type/format and level of digital signature you need. There are many ways of "digitally signing" a document: is it a PDF file, requiring a PAdES signature? Or do you want to generate a detached signature (XML, or CMS)? Also, how should your users actually sign? Using a smart card? You can have a look at the SD-DSS library, which could probably help you in some ways (github.com/esig/dss - disclaimer: I've worked on that project)Uncommunicative
@veebee: Users sign digitally using a smart card. I will look at SD-DSS library.Haeckel
Please check if this answer https://mcmap.net/q/671268/-sign-pdf-with-plain-javascript may be of some use...Sclerosis
I
12

The security restrictions of browsers do not allow javascript access to the system certificate keystore or smart cards. Formerly java applets could be used, but with the latest browser updates it is no longer possible.

Current solutions for digital signature in browsers require the installation of a desktop software on the user's computer. The operating process is as follows:

Installation: The user installs the desktop software on his computer. The software installs a self-signed certificate and includes an embedded browser that listens on a computer port and runs it as a service

  1. The web application requests a signature to the local software using a secure web connection. For example https://localhost:1234/sign?doc=xxxx. The browser waits for the result

  2. The local application receives the document, asks the user to select the certificate or enter the card and make the signature. As it is a local application, there are no security restrictions

  3. The web application receives the result. It can query the local application through a REST service or open a websocket.

The concept is simple (a web application that requests the signature to a local application), but the construction of an application of this type is quite complex because you have to take into account many other factors:

  • Software installation and distribution

  • Security and Encryption

  • Digital signature formats: XAdES, CAdES, PAdES etc. They can be implemented in the application or use a signature service in 3 phases, where the documents are on the server and a single hash is signed locally

So I recommend using an existing solution:

  • @firma + Autofirma: Open-source solution promoted and used by the public administration in Spain

  • SD-DSS + nexU(lowina): Open-source solution promoted by the European Commision. Check the demo here

  • chrome token signing: Chrome and Firefox extension for signing with your eID on the web developed for the Estonian government

Sinadura is also an open-source initiative, and from what I've seen it works in a similar way, but I do not know if it has important references and I have not found the API

Invalidate answered 7/5, 2018 at 6:52 Comment(5)
Hi Pedrofb, I just checked SD-DSS Demo web app and signed a document with nexU. But the signature is not visible on a document after opening in adobe reader too. How to make the signature to be visible? is this something we should change in source code?Haeckel
I just looked the Restful services, But not understanding that how to send a document from my another web app to SD-DSS app installed in my server?Haeckel
The visualization of an image with signature verification has been deprecated for some time. Sd-dss supports it through pdf-box library. It needs the positioning parameters of the image and I do not think that in the demo they can be provided. I'm not sure if the REST / SOAP interface has these parameters or you have to use SDDSS as a libraryInvalidate
Your web app needs to communicate with nexU app in the users' computer, not with SD-DSS directly. The local app wil use sd-dss to build the signed document. So you need to use the nexU API. I think you will find it in the web page or github repository. I will take a look tooInvalidate
I suggest you also take a look at the solution @firma. I do not know if it is translated correctly, but I can assure you that it works perfectly. In the case of nexU or Sinadura apps I do not know any real references of useInvalidate
O
1

There is some configuration in Alfresco to create a custom action.

You can create a custom action in alfresco,

And you can execute your java class code to create the digital signature on file.

You can take the reference from this java class

Ogburn answered 7/5, 2018 at 17:10 Comment(0)
S
1

It is hard to tell what is going to meet your requirements from the high-level you've provided. "Digital signature" is a very broad and generic requirement. Legal digital signatures can be as simple as a text field with specific instructions to users on how to type their conformed signature. And, of course, you can go all the way to signing documents with encrypted certificates.

It sounds like you tried Alfresco and one of the many digital signature add-ons available for it, but you do not want to implement an entire enterprise content management platform just to meet this requirement.

One idea would be to look at a SaaS offering like Docusign or RightSignature.

Another idea would be to develop your own simple service. If the documents you need to sign are PDF, for example, or could be easily converted to PDF, you could use something like the iText PDF API to create digital signatures on PDF documents on the server side.

Stratovision answered 11/5, 2018 at 21:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.