Code Monkey home page Code Monkey logo

pdf-validator's Introduction

PDF Validator

Used for validating PDF digital signature container files. This project depends on Digital Signature Service (DSS), Github: https://github.com/esig/dss, Project: https://joinup.ec.europa.eu/asset/sd-dss/description

How to build

Using Maven Wrapper

Recommended way of building this project is using Maven Wrapper to build it. Run following command:

./mvnw clean package -Dmaven.test.skip.exec

Or even easier is just run:

./build.sh

When You have Maven installed

mvn clean install -Dmaven.test.skip.exec -DargLine="-Xmx512m"

Above command will have quite long running time and may run into complications due to DSS tests, to skip these tests run:

 mvn clean install -Dmaven.test.skip=true

Note: Make sure that you have also pulled the DSS submodule, otherwise the build will fail. To pull the DSS submodule run following commands:

git submodule init
git submodule update

Introducing new modules in addition to existing DSS modules:

PDF Validator Webapp

Used to deploy to servlet container to offer the validation service.

PDF Validator Tests

Run tests:

 cd pdf-validator-test
 mvn test

Verify that the service_url property in src/main/config/test.properties points to the correct path, where the service is running. Some of the test files are signed with test certificate (chain), so in order for all the tests to pass run the servlet container (where the validation service resides) with development profile:

 -Dspring.profiles.active=development

PDF Validator TSL Downloader

Used to load/update TSL in cache, when the server itself is behind a firewall and cannot access the TSL over the internet. Steps to manually update TSL files temp directory:

  1. java -jar pdf-validator-tsl-downloader-1.0.2.RC1.jar -> It creates tmp directory in same directory where the JAR file is.
  2. Copy tmp directory contents to Tomcat tmp directory.

Make sure there is application-override.properties file inside Tomcat's conf directory with following contents:

trustedListSource.tslRefreshPolicy=NEVER

When updating TSL the service should be shut down to avoid unwanted behaviour.

PDF Validator Monitoring

PDF Validator monitoring is a web service to check that the PDF validator service is running correctly. Run with following command:

java -jar pdf-validator-monitoring-1.0.2.RC1.jar

Default parameters for monitoring application are:

server.port=9000
monitoring.host=http://localhost:8080
monitoring.path=/pdf-validator-webapp/wservice/validationService
# Default monitoring interval is 5 min
monitoring.requestInterval=300000

You can override these properties by placing application.properties file in same directory where the pdf-validator-monitoring-1.0.2.RC1.jar is located

To get the monitoring report, just request the monitoring service on the configured port, for example:

curl -s http://localhost:9000

Documentation

You can read more detailed documentation about PDF Validator here in our GitHub Pages.

To update and edit documentation follow these steps:

NOTE Python must be installed before You continue

  1. Install MkDocs: pip install mkdocs
  2. Edit markdown files inside the docs directory
  3. Preview Your changes by issuing mkdocs serve and navigating to http://localhost:8000
  4. Commit Your changes to git
  5. Generate GitHub Pages: mkdocs gh-deploy
  6. You are done

pdf-validator's People

Contributors

pvandenbroucke avatar naramski avatar andresrosenthal avatar madis26 avatar ahoa avatar vadimpudov avatar pkoziol avatar sertkeskus avatar itoche avatar mihkels avatar pirardn avatar

Watchers

James Cloos avatar RODRIGUES DOS SANTOS Vincent avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.