SiVa is digital signature validation web service that provides JSON API to validate following file types:
Below is list of Java libraries used for validation:
These are minimum requirements to build and develop SiVa project:
Recommended way of building this project is using Maven Wrapper. Run following command:
./mvnw clean install
After that, you can optionally create an image for Docker:
./mvnw spring-boot:build-image -pl siva-parent/siva-webapp
Before continuing, the siva-demo-application docker image must be built and available on Docker as siva-demo-application:latest
.
The following command will run siva-webapp along with siva-demo-application:
docker compose up
Now SiVa itself is accessible http://siva.localhost:8080/ and siva-demo-application http://siva-demo.localhost:9000/. Logs for all running containers can be viewed at http://localhost:11080.
SiVa project compiles 2 fat executable JAR files that You can run after successfully building the project by issuing below command:
Starting the SiVa REST webservice. NB! X.X.X denotes the version you are running.
java -jar siva-parent/siva-webapp/target/siva-webapp-X.X.X-exec.jar
The SiVa webapp by default runs on port 8080.
Easiest way to test out validation is to start SiVa Demo Application without docker.
NOTE: Each SiVa service must be deployed to separate instance of Tomcat to avoid Java JAR library version conflicts.
To build the WAR file use helper script with all the correct Maven parameters.
./build-war.sh
Copy built WAR file into Tomcat webapps
directory and start the servlet container. NB! X.X.X denotes the version you are running.
cp siva-parent/siva-webapp/target/siva-webapp-X.X.X.war apache-tomcat-7.0.70/webapps
./apache-tomcat-7.0.77/bin/catalina.sh run
IMPORTANT siva-webapp on startup creates
etc
directory where it copies the TSL validation certificatessiva-keystore.jks
(ortest-siva-keystore.jks
iftest
profile is used). Default location for this directory is application root or$CATALINA_HOME
. To change this default behavior you should set environment variableDSS_DATA_FOLDER
application.properties
SiVa override properties can be set using application.properties
file. The file can locate anywhare in the host system.
To make properties file accessible for SiVa you need to create or edit setenv.sh
placed inside bin
directory.
Contents of the setenv.sh
file should look like:
export CATALINA_OPTS="-Dspring.config.location=file:/path/to/application.properties"
Unit test are integral part of the SiVa code base. The tests are automatically executed every time the application is built. The build will fail if any of the tests fail.
To execute the tests from command line after application is built use:
./mvnw verify
Integration tests can be found here, and executing them requires running SiVa Web application instance.
Before starting the docker instances, the docker-compose.yaml
file must be modified. Add the following under the siva-webapp service to run the docker image with the test profile:
environment:
- "SPRING_PROFILES_ACTIVE=test"
Load tests are available in the SiVa-perftests repository.
Full list of open source Java libraries used to build SiVa can be found in our Open Source Software used page
Read SiVa documentation