esig / dss-demonstrations

Examples of DSS integration
GNU Lesser General Public License v2.1
92 stars 69 forks source link

Add a command line demostration app #20

Open AdrianRodriguezLlave opened 3 years ago

AdrianRodriguezLlave commented 3 years ago

Adding a new command line demostration app could help developers and industry. Thank you.

bsanchezb commented 2 years ago

Hello,

Advanced digital signatures are quite complex and DSS creates them in 3 steps (see documentation). Therefore, it is not a good idea to provide a command-line interface for signatures creations, as it will be not very user-friendly. You can try to use a standalone application, if you find the webApplication not comfortable.

Best regards, Aleksandr.

AdrianRodriguezLlave commented 2 years ago

Hello @bsanchezb,

You can use the command line interface, the same way you use an API. This 3 steps can be called by another application or a script. With command line interface you don't need to deploy an API, you can use the signature app the same way you use the standalone application but without user interface. With a command line tool, another app can sign or verify signatures from pdf, xml, ... and you don't need to install Apache or other stuff to deploy a Web API.

I found it very usefull, because i was using a similar application called "clienteafirma" from spanish goverment but this tool do not have updated the signatures to new versions: https://github.com/ctt-gob-es/clienteafirma https://github.com/ctt-gob-es/clienteafirma/tree/master/afirma-simple

An usecase: Suposse you need to do a batch signature and make another thing after sign those document. With a command line tool you can make a script to do all this process. Of couse you can call to the API, but sometine deploy an API is too much for a simple operation.

Thank you for the great work.

stepel commented 2 years ago

Hello,

how I can use standalone application but without user interface? Is there any place where I can find example ?

bsanchezb commented 2 years ago

Hello @stepel ,

Perhaps, instead of standalone application or a web application, you may use the source code of the library directly: https://github.com/esig/dss. You can find some code examples in the cookbook. As well as check out the documentation: https://dss.nowina.lu/doc/dss-documentation.html

Best regards, Aleksandr.

stepel commented 2 years ago

@bsanchezb, thanks for your advice. I will check it but generally I am not java developer so I need to spend some time to know better your code.
I am preparing something in different language (Delphi) and two other libraries doesn't sign my xml in a good way. Only your standalone application does it properly :) Maybe this is a good way to try to make little simple application to sign what I need using your source code. Thanks

bsanchezb commented 2 years ago

@stepel , then you could try to use REST or SOAP API service for signature creation/validation. As a demo, they are provided within dss-demo-webapp with code examples in integration-tests. Please also have a look on Postman and SoapUI application examples.

Additional information about REST and SOAP services you can also find in the documentation, I have provided you with a link above.

Best regards, Aleksandr.

stepel commented 2 years ago

@bsanchezb

Thank you I saw it before but I have made very simple application already in Java using dss library to sign what I need. Thank you for your help :)

dagnelies commented 2 years ago

+1

A command line example would be great to: