summaryrefslogtreecommitdiffstats
path: root/sanitycheck/vesclient-secured/certservice
diff options
context:
space:
mode:
authorZebek Bogumil <bogumil.zebek@nokia.com>2021-03-17 08:04:25 +0100
committerBogumil Zebek <bogumil.zebek@nokia.com>2021-03-17 12:33:56 +0000
commitba34c7c6f336575560c618b20580baa5cec3530e (patch)
tree91c19e72e96fa2e4bcb204c3dff3a9a0970c7e3c /sanitycheck/vesclient-secured/certservice
parent2fa21ae5c2245ec5a75a7677320e77d70aae443e (diff)
Add sanitycheck for ves client
Issue-ID: INT-1869 Signed-off-by: Bogumil Zebek <bogumil.zebek@nokia.com> Change-Id: Ib297493ad9386594b4451f05378e070747187428
Diffstat (limited to 'sanitycheck/vesclient-secured/certservice')
-rw-r--r--sanitycheck/vesclient-secured/certservice/Makefile59
-rw-r--r--sanitycheck/vesclient-secured/certservice/README.md85
-rw-r--r--sanitycheck/vesclient-secured/certservice/docker-compose-certservice-clients.yml39
-rw-r--r--sanitycheck/vesclient-secured/certservice/docker-compose-certservice-ejbca.yml47
-rw-r--r--sanitycheck/vesclient-secured/certservice/docker-compose-ves-dmaap.yml33
-rw-r--r--sanitycheck/vesclient-secured/certservice/docker-compose-vesclient.yml86
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certs/.gitignore3
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certs/Makefile109
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certservice-client/.gitignore3
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-httpserver.env18
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-ves.env19
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-vesclient.env18
-rw-r--r--sanitycheck/vesclient-secured/certservice/resources/certservice/cmpServers.json24
-rwxr-xr-xsanitycheck/vesclient-secured/certservice/resources/ejbca/ejbca-configuration.sh19
14 files changed, 562 insertions, 0 deletions
diff --git a/sanitycheck/vesclient-secured/certservice/Makefile b/sanitycheck/vesclient-secured/certservice/Makefile
new file mode 100644
index 0000000..0f41b0e
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/Makefile
@@ -0,0 +1,59 @@
+default:
+ @echo "There is no default target. Use: make <specific_target>"
+
+setup-env: --start-certservice-and-ejbca --run-certservice-clients --start-local-secured-ves
+
+start-ves-client:
+ docker-compose -f docker-compose-vesclient.yml up
+
+restart-ves-client: --clean-ves-client start-ves-client
+
+clean-all: --clean-ves-client --clean-env
+
+
+--start-certservice-and-ejbca: --create-certservice-internal-certs --start-certservice-ejbca-containers --configure-ejbca
+
+--start-certservice-ejbca-containers:
+ docker-compose -f docker-compose-certservice-ejbca.yml up -d
+
+--create-certservice-internal-certs:
+ make -C resources/certs all
+
+--configure-ejbca: --wait-for-ejbca --run-ejbca-script
+
+--wait-for-ejbca:
+ @echo 'Waiting for EJBCA... It may take a minute or two'
+ until docker container inspect oomcert-ejbca | grep '"Status": "healthy"'; do sleep 3; done
+
+--run-ejbca-script:
+ docker exec oomcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
+
+--run-certservice-clients: --create-client-volumes
+ docker-compose -f docker-compose-certservice-clients.yml up -d
+ @echo 'Waiting for client certifiactes...'
+ @until ls -1 ./resources/certservice-client/client-volume-for-vesclient | grep "store" 1>/dev/null; do sleep 3; done
+ @until ls -1 ./resources/certservice-client/client-volume-for-ves | grep "store" 1>/dev/null; do sleep 3; done
+ @until ls -1 ./resources/certservice-client/client-volume-for-httpserver | grep "store" 1>/dev/null; do sleep 3; done
+
+--create-client-volumes:
+ mkdir -p ./resources/certservice-client/client-volume-for-vesclient -m 777
+ mkdir -p ./resources/certservice-client/client-volume-for-ves -m 777
+ mkdir -p ./resources/certservice-client/client-volume-for-httpserver -m 777
+
+--start-local-secured-ves:
+ docker-compose -f docker-compose-ves-dmaap.yml up
+
+--clean-ves-client:
+ docker-compose -f docker-compose-vesclient.yml down
+ rm -rf ./resources/certservice-client/client-volume-for-vesclient || true
+ rm -rf ./resources/certservice-client/client-volume-for-httpserver || true
+
+
+--clean-env:
+ docker-compose -f docker-compose-ves-dmaap.yml down
+ docker-compose -f docker-compose-certservice-clients.yml down
+ rm -rf ./resources/certservice-client/client-volume-for-vesclient || true
+ rm -rf ./resources/certservice-client/client-volume-for-ves || true
+ rm -rf ./resources/certservice-client/client-volume-for-httpserver || true
+ docker-compose -f docker-compose-certservice-ejbca.yml down
+ make -C resources/certs clear
diff --git a/sanitycheck/vesclient-secured/certservice/README.md b/sanitycheck/vesclient-secured/certservice/README.md
new file mode 100644
index 0000000..27f68ef
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/README.md
@@ -0,0 +1,85 @@
+## Fetching certificates from OOM CertService (CMPv2)
+This readme describes how to run VES client with certificates fetched using OOM CertService (CMPv2)
+
+### Description
+
+Using Makefile in this directory following can be achieved:
+
+* Setup environment for VES client, i.e.:
+ * Create certificates that will be used for internal communication between CertService and CertService Clients.
+ Generated internal certificates should be present in `resources/certs` directory.
+ * Start and configure EJBCA
+ * Start and configure AAF Cert Service.
+ * Run Cert Service Clients to fetch certificates for VES and VES client. Certificates will be stored for the
+ components in `resources/certservice-client/client-volume-for-ves`
+ and `resources/certservice-client/client-volume-for-vesclient` accordingly.
+ * Start VES and DMaaP Simulator. Fetched certificates will be mounted to VES.
+
+* Start VES client. Fetched certificates will be mounted to VES client.
+* Clean up.
+
+### Prerequisites
+##### VES collector local deployment prerequisites
+
+By default, the image of VES from Nexus supports only HTTP communication. A local image with enabled HTTPS must be build
+to use local VES as VES client destination.
+
+1. Pull VES repository
+2. In `<VES_PROJECT_ROOT>/etc/collector.properties` file set field `auth.method=certBasicAuth`
+3. Build a local image: `mvn clean install docker:build` from VES project root directory.
+
+Local VES deployment uses also DMaaP simulator. Its image should be built locally as well.
+1. Go to `sanitycheck/dmaap-simulator` directory
+2. Run: `make build`
+
+### Setup environment
+To set up whole environment for VES client, i.e.:
+- deploy and configure EJBCA
+- deploy Cert Service
+- fetch certificates for VES and VES client using Cert Service clients
+- run DMaaP Simulator
+- run VES with fetched certificates
+
+execute:
+````
+make setup-env
+````
+Note that this command setups whole environment besides VES client itself.
+
+## Run VES client
+To run VES client execute:
+````
+make start-ves-client
+````
+VES client starts together with the http server.
+This command starts VES client with certificates fetched using CertService (certificates are fetched in the previous
+step)
+
+### Send event
+
+
+Configure VES client to use proper VES URL by executing this command from ``nf-simulator/sanitycheck`` directory:
+
+ TIP: edit vesAddressConfigure.json and set "vesServerUrl": "https://172.17.0.1:8443/eventListener/v7"
+
+```
+make reconfigure-ves-url
+```
+
+Send an event from VES client to VES by executing this command from ``nf-simulator/sanitycheck`` directory:
+```
+make generate-event
+```
+
+### Restart VES client
+
+To restart only VES client execute:
+```
+make restart-ves-client
+```
+
+### Clean up
+To clean all generated certificates, remove VES client, CertService, EJBCA, VES and DMaaP Simulator containers:
+```
+make clean-all
+```
diff --git a/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-clients.yml b/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-clients.yml
new file mode 100644
index 0000000..d721561
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-clients.yml
@@ -0,0 +1,39 @@
+version: "2.1"
+
+networks:
+ onap:
+ external: true
+
+services:
+ oom-cert-client-ves:
+ image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.1.1
+ container_name: oomcert-client-for-ves
+ env_file: ./resources/certservice-client/client-configuration-for-ves.env
+ networks:
+ - onap
+ volumes:
+ - ./resources/certservice-client/client-volume-for-ves:/var/certs:rw
+ - ./resources/certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+ - ./resources/certs/certServiceClient-keystore.jks:/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
+
+ oom-cert-client-vesclient:
+ image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.1.1
+ container_name: oomcert-client
+ env_file: ./resources/certservice-client/client-configuration-for-vesclient.env
+ networks:
+ - onap
+ volumes:
+ - ./resources/certservice-client/client-volume-for-vesclient:/var/certs:rw
+ - ./resources/certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+ - ./resources/certs/certServiceClient-keystore.jks:/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
+
+ oom-cert-client-httpserver:
+ image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.1.1
+ container_name: oomcert-client-for-httpserver
+ env_file: ./resources/certservice-client/client-configuration-for-httpserver.env
+ networks:
+ - onap
+ volumes:
+ - ./resources/certservice-client/client-volume-for-httpserver:/var/certs:rw
+ - ./resources/certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+ - ./resources/certs/certServiceClient-keystore.jks:/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
diff --git a/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-ejbca.yml b/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-ejbca.yml
new file mode 100644
index 0000000..a400eb9
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/docker-compose-certservice-ejbca.yml
@@ -0,0 +1,47 @@
+version: "2.1"
+
+networks:
+ onap:
+ driver: bridge
+ name: onap
+ public:
+ driver: bridge
+ name: public
+
+services:
+ ejbca:
+ image: primekey/ejbca-ce:6.15.2.5
+ hostname: cahostname
+ container_name: oomcert-ejbca
+ ports:
+ - "80:8080"
+ - "443:8443"
+ volumes:
+ - ./resources/ejbca/ejbca-configuration.sh:/opt/primekey/scripts/ejbca-configuration.sh
+ healthcheck:
+ test: [ "CMD-SHELL", "curl -kI https://localhost:8443/ejbca/publicweb/healthcheck/ejbcahealth" ]
+ interval: 10s
+ timeout: 3s
+ retries: 15
+ networks:
+ - onap
+
+ oom-cert-service:
+ image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-api:2.1.1
+ volumes:
+ - ./resources/certservice/cmpServers.json:/etc/onap/oom/certservice/cmpServers.json
+ - ./resources/certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+ - ./resources/certs/root.crt:/etc/onap/oom/certservice/certs/root.crt
+ - ./resources/certs/certServiceServer-keystore.jks:/etc/onap/oom/certservice/certs/certServiceServer-keystore.jks
+ - ./resources/certs/certServiceServer-keystore.p12:/etc/onap/oom/certservice/certs/certServiceServer-keystore.p12
+ container_name: oomcert-service
+ ports:
+ - "8443:8443"
+ healthcheck:
+ test: ["CMD-SHELL", "curl https://localhost:8443/actuator/health --cacert /etc/onap/oom/certservice/certs/root.crt --cert-type p12 --cert /etc/onap/oom/certservice/certs/certServiceServer-keystore.p12 --pass secret"]
+ interval: 10s
+ timeout: 3s
+ retries: 15
+ networks:
+ - onap
+ - public
diff --git a/sanitycheck/vesclient-secured/certservice/docker-compose-ves-dmaap.yml b/sanitycheck/vesclient-secured/certservice/docker-compose-ves-dmaap.yml
new file mode 100644
index 0000000..86f0202
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/docker-compose-ves-dmaap.yml
@@ -0,0 +1,33 @@
+version: "2.1"
+
+networks:
+ public:
+ external: true
+ onap:
+ external: true
+
+services:
+ ves:
+ container_name: ves
+ image: nexus3.onap.org:10003/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest
+ ports:
+ - "8082:8080"
+ - "8444:8443"
+ networks:
+ - onap
+ - public
+ volumes:
+ - ./resources/certservice-client/client-volume-for-ves/keystore.jks:/opt/app/VESCollector/etc/keystore
+ - ./resources/certservice-client/client-volume-for-ves/keystore.pass:/opt/app/VESCollector/etc/passwordfile
+ - ./resources/certservice-client/client-volume-for-ves/truststore.jks:/opt/app/VESCollector/etc/truststore
+ - ./resources/certservice-client/client-volume-for-ves/truststore.pass:/opt/app/VESCollector/etc/trustpasswordfile
+ depends_on:
+ - onap-dmaap
+
+ onap-dmaap:
+ container_name: dmaap
+ image: dmaap-simulator
+ ports:
+ - "3904:3904"
+ networks:
+ - onap
diff --git a/sanitycheck/vesclient-secured/certservice/docker-compose-vesclient.yml b/sanitycheck/vesclient-secured/certservice/docker-compose-vesclient.yml
new file mode 100644
index 0000000..f99330b
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/docker-compose-vesclient.yml
@@ -0,0 +1,86 @@
+version: "2.1"
+
+networks:
+ ves-client:
+ driver: bridge
+ name: ves-client
+ public:
+ external: true
+ onap:
+ external: true
+
+services:
+ mongo:
+ image: mongo
+ restart: always
+ networks:
+ - ves-client
+ environment:
+ MONGO_INITDB_ROOT_USERNAME: root
+ MONGO_INITDB_ROOT_PASSWORD: zXcVbN123!
+ MONGO_INITDB_DATABASE: pnf_simulator
+ volumes:
+ - ../../../../ves-client/db:/docker-entrypoint-initdb.d
+ ports:
+ - "27017:27017"
+
+ mongo-express:
+ image: mongo-express
+ restart: always
+ networks:
+ - ves-client
+ ports:
+ - 8081:8081
+ environment:
+ ME_CONFIG_MONGODB_ADMINUSERNAME: root
+ ME_CONFIG_MONGODB_ADMINPASSWORD: zXcVbN123!
+
+ http-server:
+ image: nexus3.onap.org:10003/onap/org.onap.integration.nfsimulator.pmhttpsserver
+ ports:
+ - "8080:8080"
+ - "32000:32000"
+ - "32080:80"
+ - "32100:32100"
+ - "32443:443"
+ networks:
+ - ves-client
+ - public
+ volumes:
+ - ~/httpservervolumes/:/usr/local/apache2/htdocs
+ - ../../../httpserver/logs:/var/log/apache2
+ - ./resources/certservice-client/client-volume-for-httpserver/:/etc/apache2/certs/
+ command: bash -c "
+ echo 'Http Server start';
+ while [[ $$(ls -1 /etc/apache2/certs/ | wc -l) != '3' ]]; do echo 'Waiting for certs...'; sleep 3; done;
+ chmod 777 /usr/local/apache2/htdocs;
+ cp /usr/local/apache2/conf/upload.php /usr/local/apache2/htdocs/upload.php;
+ touch /usr/local/apache2/htdocs/index.html;
+ /usr/sbin/apache2ctl -D FOREGROUND;
+ "
+ restart: on-failure
+
+ ves-client:
+ image: onap/org.onap.integration.nfsimulator.vesclient
+ ports:
+ - "5000:5000"
+ networks:
+ - ves-client
+ - public
+ command: bash -c "
+ while [[ $$(ls -1 /app/store | wc -l) != '4' ]]; do echo 'Waiting for certs...'; sleep 3; done
+ && cp /app/store/truststore.p12 /app/store/trust.jks
+ && cp /app/store/keystore.p12 /app/store/cert.p12
+ && cp /app/store/keystore.pass /app/store/p12.pass
+ && cp /app/store/truststore.pass /app/store/trust.pass
+ && java -Dspring.config.location=file:/app/application.properties -cp /app/libs/*:/app/vesclient.jar org.onap.integration.simulators.nfsimulator.vesclient.Main
+ "
+ volumes:
+ - ../../../../ves-client/logs:/var/log
+ - ../../../../ves-client/templates:/app/templates
+ - ../../../../ves-client/src/main/resources/application.properties:/app/application.properties
+ - ./resources/certservice-client/client-volume-for-vesclient/:/app/store/
+ restart: on-failure
+ depends_on:
+ - mongo
+ - mongo-express
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certs/.gitignore b/sanitycheck/vesclient-secured/certservice/resources/certs/.gitignore
new file mode 100644
index 0000000..385dcde
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certs/.gitignore
@@ -0,0 +1,3 @@
+*.jks
+*.p12
+*.crt
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certs/Makefile b/sanitycheck/vesclient-secured/certservice/resources/certs/Makefile
new file mode 100644
index 0000000..507a23c
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certs/Makefile
@@ -0,0 +1,109 @@
+all: clear step_1 step_2 step_3 step_4 step_5 step_6 step_7 step_8 step_9 step_10 step_11 step_12 step_13 step_14 step_15
+.PHONY: all
+#Clear certificates
+clear:
+ @echo "Clear certificates"
+ rm -f certServiceClient-keystore.jks certServiceServer-keystore.jks root.crt truststore.jks certServiceServer-keystore.p12 root-keystore.jks
+ @echo "#####done#####"
+
+#Generate root private and public keys
+step_1:
+ @echo "Generate root private and public keys"
+ keytool -genkeypair -v -alias root -keyalg RSA -keysize 4096 -validity 3650 -keystore root-keystore.jks \
+ -dname "CN=root.com, OU=Root Org, O=Root Company, L=Wroclaw, ST=Dolny Slask, C=PL" -keypass secret \
+ -storepass secret -ext BasicConstraints:critical="ca:true"
+ @echo "#####done#####"
+
+#Export public key as certificate
+step_2:
+ @echo "(Export public key as certificate)"
+ keytool -exportcert -alias root -keystore root-keystore.jks -storepass secret -file root.crt -rfc
+ @echo "#####done#####"
+
+#Self-signed root (import root certificate into truststore)
+step_3:
+ @echo "(Self-signed root (import root certificate into truststore))"
+ keytool -importcert -alias root -keystore truststore.jks -file root.crt -storepass secret -noprompt
+ @echo "#####done#####"
+
+#Generate certService's client private and public keys
+step_4:
+ @echo "Generate certService's client private and public keys"
+ keytool -genkeypair -v -alias certServiceClient -keyalg RSA -keysize 2048 -validity 730 \
+ -keystore certServiceClient-keystore.jks -storetype JKS \
+ -dname "CN=certServiceClient.com,OU=certServiceClient company,O=certServiceClient org,L=Wroclaw,ST=Dolny Slask,C=PL" \
+ -keypass secret -storepass secret
+ @echo "####done####"
+
+#Generate certificate signing request for certService's client
+step_5:
+ @echo "Generate certificate signing request for certService's client"
+ keytool -certreq -keystore certServiceClient-keystore.jks -alias certServiceClient -storepass secret -file certServiceClient.csr
+ @echo "####done####"
+
+#Sign certService's client certificate by root CA
+step_6:
+ @echo "Sign certService's client certificate by root CA"
+ keytool -gencert -v -keystore root-keystore.jks -storepass secret -alias root -infile certServiceClient.csr \
+ -outfile certServiceClientByRoot.crt -rfc -ext bc=0 -ext ExtendedkeyUsage="serverAuth,clientAuth"
+ @echo "####done####"
+
+#Import root certificate into client
+step_7:
+ @echo "Import root certificate into intermediate"
+ cat root.crt >> certServiceClientByRoot.crt
+ @echo "####done####"
+
+#Import signed certificate into certService's client
+step_8:
+ @echo "Import signed certificate into certService's client"
+ keytool -importcert -file certServiceClientByRoot.crt -destkeystore certServiceClient-keystore.jks -alias certServiceClient -storepass secret -noprompt
+ @echo "####done####"
+
+#Generate certService private and public keys
+step_9:
+ @echo "Generate certService private and public keys"
+ keytool -genkeypair -v -alias oom-cert-service -keyalg RSA -keysize 2048 -validity 730 \
+ -keystore certServiceServer-keystore.jks -storetype JKS \
+ -dname "CN=oom-cert-service,OU=certServiceServer company,O=certServiceServer org,L=Wroclaw,ST=Dolny Slask,C=PL" \
+ -keypass secret -storepass secret -ext BasicConstraints:critical="ca:false"
+ @echo "####done####"
+
+#Generate certificate signing request for certService
+step_10:
+ @echo "Generate certificate signing request for certService"
+ keytool -certreq -keystore certServiceServer-keystore.jks -alias oom-cert-service -storepass secret -file certServiceServer.csr
+ @echo "####done####"
+
+#Sign certService certificate by root CA
+step_11:
+ @echo "Sign certService certificate by root CA"
+ keytool -gencert -v -keystore root-keystore.jks -storepass secret -alias root -infile certServiceServer.csr \
+ -outfile certServiceServerByRoot.crt -rfc -ext bc=0 -ext ExtendedkeyUsage="serverAuth,clientAuth" \
+ -ext SubjectAlternativeName:="DNS:oom-cert-service,DNS:localhost"
+ @echo "####done####"
+
+#Import root certificate into server
+step_12:
+ @echo "Import root certificate into intermediate(server)"
+ cat root.crt >> certServiceServerByRoot.crt
+ @echo "####done####"
+
+#Import signed certificate into certService
+step_13:
+ @echo "Import signed certificate into certService"
+ keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias oom-cert-service \
+ -storepass secret -noprompt
+ @echo "####done####"
+
+#Convert certServiceServer-keystore(.jks) to PCKS12 format(.p12)
+step_14:
+ @echo "Convert certServiceServer-keystore(.jks) to PCKS12 format(.p12)"
+ keytool -importkeystore -srckeystore certServiceServer-keystore.jks -srcstorepass secret -destkeystore certServiceServer-keystore.p12 -deststoretype PKCS12 -deststorepass secret
+ @echo "#####done#####"
+
+#Clear unused certificates
+step_15:
+ @echo "Clear unused certificates"
+ rm certServiceClientByRoot.crt certServiceClient.csr root-keystore.jks certServiceServerByRoot.crt certServiceServer.csr
+ @echo "#####done#####"
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certservice-client/.gitignore b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/.gitignore
new file mode 100644
index 0000000..ef10692
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/.gitignore
@@ -0,0 +1,3 @@
+client-volume-for-httpserver
+client-volume-for-vesclient
+client-volume-for-ves
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-httpserver.env b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-httpserver.env
new file mode 100644
index 0000000..8e8eb34
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-httpserver.env
@@ -0,0 +1,18 @@
+#Client envs
+REQUEST_URL=https://oom-cert-service:8443/v1/certificate/
+REQUEST_TIMEOUT=10000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=PEM
+#Csr config envs
+COMMON_NAME=httpserver-onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+#Tls config envs
+KEYSTORE_PATH=/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-ves.env b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-ves.env
new file mode 100644
index 0000000..e06d147
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-ves.env
@@ -0,0 +1,19 @@
+#Client envs
+REQUEST_URL=https://oom-cert-service:8443/v1/certificate/
+REQUEST_TIMEOUT=10000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=JKS
+#Csr config envs
+COMMON_NAME=ves-onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+SANS=ves
+#Tls config envs
+KEYSTORE_PATH=/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-vesclient.env b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-vesclient.env
new file mode 100644
index 0000000..c5f33b6
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certservice-client/client-configuration-for-vesclient.env
@@ -0,0 +1,18 @@
+#Client envs
+REQUEST_URL=https://oom-cert-service:8443/v1/certificate/
+REQUEST_TIMEOUT=10000
+OUTPUT_PATH=/var/certs
+CA_NAME=RA
+OUTPUT_TYPE=P12
+#Csr config envs
+COMMON_NAME=onap.org
+ORGANIZATION=Linux-Foundation
+ORGANIZATION_UNIT=ONAP
+LOCATION=San-Francisco
+STATE=California
+COUNTRY=US
+#Tls config envs
+KEYSTORE_PATH=/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PASSWORD=secret
+TRUSTSTORE_PATH=/etc/onap/oom/certservice/certs/truststore.jks
+TRUSTSTORE_PASSWORD=secret
diff --git a/sanitycheck/vesclient-secured/certservice/resources/certservice/cmpServers.json b/sanitycheck/vesclient-secured/certservice/resources/certservice/cmpServers.json
new file mode 100644
index 0000000..7256494
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/certservice/cmpServers.json
@@ -0,0 +1,24 @@
+{
+ "cmpv2Servers": [
+ {
+ "caName": "Client",
+ "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmp",
+ "issuerDN": "CN=ManagementCA",
+ "caMode": "CLIENT",
+ "authentication": {
+ "iak": "mypassword",
+ "rv": "mypassword"
+ }
+ },
+ {
+ "caName": "RA",
+ "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmpRA",
+ "issuerDN": "CN=ManagementCA",
+ "caMode": "RA",
+ "authentication": {
+ "iak": "mypassword",
+ "rv": "mypassword"
+ }
+ }
+ ]
+}
diff --git a/sanitycheck/vesclient-secured/certservice/resources/ejbca/ejbca-configuration.sh b/sanitycheck/vesclient-secured/certservice/resources/ejbca/ejbca-configuration.sh
new file mode 100755
index 0000000..77f5c55
--- /dev/null
+++ b/sanitycheck/vesclient-secured/certservice/resources/ejbca/ejbca-configuration.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+configureEjbca() {
+ ejbca.sh config cmp addalias --alias cmpRA
+ ejbca.sh config cmp updatealias --alias cmpRA --key operationmode --value ra
+ ejbca.sh ca editca --caname ManagementCA --field cmpRaAuthSecret --value mypassword
+ ejbca.sh config cmp updatealias --alias cmpRA --key responseprotection --value pbe
+ ejbca.sh config cmp dumpalias --alias cmpRA
+ ejbca.sh config cmp addalias --alias cmp
+ ejbca.sh config cmp updatealias --alias cmp --key allowautomatickeyupdate --value true
+ ejbca.sh config cmp updatealias --alias cmp --key responseprotection --value pbe
+ ejbca.sh ra addendentity --username Node123 --dn "CN=Node123" --caname ManagementCA --password mypassword --type 1 --token USERGENERATED
+ ejbca.sh ra setclearpwd --username Node123 --password mypassword
+ ejbca.sh config cmp updatealias --alias cmp --key extractusernamecomponent --value CN
+ ejbca.sh config cmp dumpalias --alias cmp
+ ejbca.sh ca getcacert --caname ManagementCA -f /dev/stdout > cacert.pem
+}
+
+configureEjbca