Signature Gateway demo application

December 18, 2024 ยท View on GitHub

Co-funded by the European Union

Signature Gateway demo application

Demo application is provided to study the flows and integration of Signature Gateway. NB! This is not meant to be used in production!

Functionality:

  • Authorization
  • Container conversion to and from HASHCODE form
  • Mobile-ID signing
  • ID card signing (with Web eID in front end)
  • Smart-ID signing
  • Signature validation
  • ASiC container upload and augmentation

How to set up

SiGa demo application is not a standalone system, it requires either the SiGa application to already be running on your machine or pointing the demo app towards sample APIs.

Preconditions:

  1. Java JDK 17 - to compile and run SiGa demo
  2. SiGa parent project - Can be found here

Option 1: Running SiGa locally with Docker

  1. Docker must be installed and running.
  2. Build SiGa demo application docker image:
./mvnw clean spring-boot:build-image
  1. Then, follow the "Running SiGa with Docker" instructions at SiGa webapp to run both apps at the same time.

If everything was successful, open up the browser at https://siga-demo.localhost:9443/.

Option 2: Running with external APIs

  1. Open up the application.properties file and change the following properties accordingly:
siga.api.uri=https://siga.localhost:8443/siga
siga.api.trust-store=file:/path/to/siga_server_truststore.p12
siga.api.trust-store-password=changeit
siga.api.trust-store-type=PKCS12
siga.client.hmac.algorithm=HmacSHA256
siga.client.hmac.service-uuid=a7fd7728-a3ea-4975-bfab-f240a67e894f
siga.client.hmac.shared-signing-key=746573745365637265744b6579303031
ParameterDescriptionExample
siga.api.uriSIGA server URL (without slash symbol in the end)https://siga.localhost:8443/siga
siga.api.trust-storeLocation of the trustore containing server's certificate or CA (path without quotes symbol)classpath:siga_server_truststore.p12 or file:/path/to/siga_server_truststore.p12
siga.api.trust-store-passwordPassword of the trustore containing server's certificate or CA.changeit
siga.api.trust-store-typeType of the trustore containing server's certificate or CA. Defaults to system default if not provided.PKCS12
siga.client.hmac.algorithmMore info can be found hereHmacSHA256
siga.client.hmac.service-uuidMore info can be found herea7fd7728-a3ea-4975-bfab-f240a67e894f
siga.client.hmac.shared-signing-keyMore info can be found here746573745365637265744b6579303031
  1. Build this project
./mvnw clean install
  1. Run compiled JAR (found in target folder)
java -jar siga-demo-application-X.X.X.jar

Now application is accessible at https://siga-demo.localhost:9443/.

SiGa demo configuration

Example application.properties file can be seen here. Common Spring Boot properties are described here.

ParameterMandatoryDescriptionExample
spring.servlet.multipart.max-file-sizeNMax file size.20MB
spring.servlet.multipart.max-request-sizeNMax request size.35MB

How to use

Before every signing the webapage needs to be reloaded and files uploaded.

With Docker setup, Signature Gateway is in TEST mode. Meaning it is possible to sign only with TEST ID-card, TEST Mobile-ID or TEST Smart-ID.

  • TEST ID-cards can be ordered here.
  • TEST Mobile-ID numbers can be found here.
  • TEST Smart-ID numbers can be found here.