SiVa demo is digital signature validation web interface that uses SiVa APIs to validate following file types:
- Estonian DDOC containers
- Estonian BDOC containers with TimeMark and TimeStamp signatures
- Estonian ASiC-S containers with time stamp tokens
- ETSI standard based ASiC-E and ASiC-S containers
- ETSI standard based XAdES, CAdES and PAdES signatures
- ETSI standard based XAdES signatures with datafiles in hashcode form
These are minimum requirements to build and develop SiVa demo project:
- git - to easily download and update code. You can download git here
- Java JDK 17 - to compile and run SiVa demo
- IDE - to develop SiVa. We recommend to use JetBrains IntelliJ
- Optionally You can also install Maven but it is not needed because SiVa project uses Maven wrapper to install maven
- SiVa parent project - Can be found here
Recommended way of building this project is using Maven Wrapper. Run the following command:
./mvnw clean install
Alternatively, run the following command to build Docker image:
./mvnw clean spring-boot:build-image
TODO:
On Windows machine there may be a situation where a test fails due to how XML files are parsed in. Workaround is to disable givenValidRequestWillReturnSOAPValidationReport() test using @Disabled tag.
Follow the Docker instructions for SiVa webapp to run both apps at the same time.
SiVa project by default compiles an executable JAR file that can be run after successfully building the project by issuing below command:
java -jar target/siva-demo-application-X.X.X.jar
Another option is to run it directly with:
./mvnw spring-boot:run
After the demo application is built and running You can point Your browser to URL: http://localhost:9000.
- SiVa Demo Application UI allows to upload 1 file at a time and with maximum file size 11 MiB.
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.
./war-build.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 target/siva-demo-application-X.X.X.war apache-tomcat-7.0.70/webapps
./apache-tomcat-7.0.77/bin/catalina.sh run
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
Full list of open source Java libraries used to build SiVa can be found in our Open Source Software used page
Read SiVa documentation
TODO:
On Windows machine there may be a situation where a test fails due mismatch of line separators (LF vs CRLF). Workaround is to disable a test in SivaSOAPValidationServiceClientTest class located in siva package.
@Test
@Disabled
void givenValidRequestWillReturnSOAPValidationReport(@TempDir File testingFolder)