Read-only mirror of https://github.com/SwisscomTrustServices/foldersigner-ais — Swisscom. Issues & pull requests at the source.
  • Shell 80.5%
  • Dockerfile 19.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-05-09 15:33:28 +02:00
config.sh Initial version 2016-05-12 19:50:45 +02:00
Dockerfile :s/ais-foldersigner/foldersigner-ais 2016-05-25 14:53:35 +02:00
LICENSE Create LICENSE 2018-05-09 15:33:20 +02:00
README.md Add instructions for running foldersigner behind a corporate proxy. 2017-01-31 11:40:56 +01:00
sign.sh Initial version 2016-05-12 19:50:45 +02:00
watch.sh Initial version 2016-05-12 19:50:45 +02:00

foldersigner-ais

This is the source repository for the docker image at https://hub.docker.com/r/swisscomtds/foldersigner-ais/

Digitally sign or timestamp PDF's in a specific folder over Swisscom All-in Signing Service.

It will monitor a folder for new PDF's older than one 1 minute to ensure proper upload/copying. The digitally signed PDF will be put in an output folder with the same name as well as a <.result.txt containting the result of the operation. On success the original file will be removed from the monitored folder.

The source and destination folder can be specified with the Docker Volume parameter -v:

  • Source: /opt/work/in
  • Destination: /opt/work/in

Run

To start:

 $ docker run --name foldersigner-ais -it -d \
   -e CUSTOMER_ID="My_Customer_Name" \
   -e CUSTOMER_KEY="My_Key_Identity" \
   -v "/home/user/mycert.crt":/opt/work/mycert.crt \
   -v "/home/user/mycert.key":/opt/work/mycert.key \
   -v "/home/user/_in_":/opt/work/in \
   -v "home/user/_out_":/opt/work/out \
   swisscomtds/foldersigner-ais:latest

optional environment settings:

   -e DIGEST_METHOD=SHA256 \
   -e SIGNATURE_TYPE=sign \
   -e TZ=Europe/Paris \
   -e _JAVA_OPTIONS="-Dhttps.proxyHost=myproxy.mycompany.com -Dhttps.proxyPort=8080"

Infos about the -e settings:

  • CUSTOMER_ID: Customer identification towards All-in Signing service (provided by Swisscom)
  • CUSTOMER_KEY: Customer signing key (provided by Swisscom)
  • DIGEST_METHOD: Digest Method [SHA256 (default), SHA384, SHA512]
  • SIGNATURE_TYPE: Signature Type [sign (default), timestamp]
  • TZ: Timezone of the docker image [Europe/Paris, ...]
  • _JAVA_OPTIONS: Necessary if running behind a corporate proxy.

Docker How To (Windows)

  1. Install Docker Toolbox - https://www.docker.com/products/docker-toolbox
  2. Launch the Docker Quickstart Terminal
  3. In the Docker Terminal, following commands are useful:

Pull the image:

$ docker pull swisscomtds/foldersigner-ais

Read the actual path (in Windows it is like /c/Users/alice):

$ pwd

Start the Docker Image:

$ docker run --name foldersigner-ais -it -d \
   -e CUSTOMER_ID="My_Customer_Name" \
   -e CUSTOMER_KEY="My_Key_Identity" \
   -v "/c/Users/alice/mycert.crt":/opt/work/mycert.crt \
   -v "/c/Users/alice/mycert.key":/opt/work/mycert.key \
   -v "/c/Users/alice/in":/opt/work/in \
   -v "/c/Users/alice/out":/opt/work/out \
   swisscomtds/foldersigner-ais:latest

Other:

$ docker images
$ docker ps -a
$ docker stop <container>
$ docker kill <container>
$ docker rm <container>
$ docker logs foldersigner-ais