8 ### Install the package into the local repository
13 ### Building Docker image and install the package into the local repository
15 mvn clean install -P docker
18 ### Nexus container image
20 nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-truststore-merger:latest
23 ### Running application as standalone docker container
25 Exemplary config.env file with necessary envs
27 TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem
28 TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass:
29 KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore.jks:/var/certs/external/keystore.pass
30 KEYSTORE_DESTINATION_PATHS=/var/certs/cert.jks:/var/certs/jks.pass
32 TRUSTSTORES_PATHS env indicates paths (separated by ":") where truststores files are located.
34 TRUSTSTORES_PASSWORDS_PATHS env indicates paths (separated by ":") where files with passwords to truststores are located.
35 PEM is not protected by password so its value should be empty
37 KEYSTORE_SOURCE_PATHS env (optional) indicates paths (separated by ":") where files to copy are located.
39 KEYSTORE_DESTINATION_PATHS env (optional) indicates paths (separated by ":") to files which should be replaced. Before keystore files override, destination files will be copied with addition of .bak extension.
41 Execute below command in order to run app as docker container
44 --name oom-truststore-merger \
45 --env-file ./config.env \
46 --mount type=bind,src=<src_path>,dst=/var/certs \
47 onap/org.onap.oom.platform.cert-service.oom-truststore-merger:latest
49 Before run replace <src_path> with absolute path where you located truststores to merge (eg. /certs/resources/)
51 Output from merger (when pointed more than one truststore to merge in TRUSTSTORES_PATHS env and provided optional envs) success execution should be:
52 1. Created backup file (with .bak ext) of first truststore pointed in TRUSTSTORES_PATHS env
53 2. Keystores files listed in KEYSTORE_SOURCE_PATHS env overrides corresponding to them files defined in KEYSTORE_DESTINATION_PATHS env.
54 3. Keystores listed in KEYSTORE_SOURCE_PATHS env are in locations taken from KEYSTORE_DESTINATION_PATHS env. Files listed in KEYSTORE_DESTINATION_PATHS env before application run, still exist with appended .bak extension.
56 Remove docker container:
58 docker rm oom-truststore-merger
65 var/log/onap/oom/truststore-merger/truststore-merger.log
67 ### Logs in Docker container
69 docker logs oom-merger
74 1 Invalid paths in environment variables
75 2 Invalid merger configuration
76 3 Invalid truststore file-password pair
77 4 Cannot read password from file
78 5 Cannot create backup file
79 6 Cannot initialize keystore instance
80 7 Cannot load truststore file
81 8 Cannot operate on truststore data
82 9 Missing truststore certificates in provided file
83 10 Alias conflict detected
84 11 Cannot save truststore file
85 12 Cannot copy keystore file
86 13 Keystore file does not exist
87 99 Application exited abnormally