Move csits form aaf to oom
create csit folder under oom
move csits from aaf to oom
reconfigure csits: remove aaf word, use new image
Issue-ID: OOM-2526
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: I7b1f010fe46420cb734c67133f038bdadffd5ecc
diff --git a/plans/aaf/certservice/docker-compose.yml b/plans/aaf/certservice/docker-compose.yml
deleted file mode 100644
index dcac7df..0000000
--- a/plans/aaf/certservice/docker-compose.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-version: "2.1"
-
-services:
- ejbca:
- image: primekey/ejbca-ce:6.15.2.5
- hostname: cahostname
- container_name: aafcert-ejbca
- ports:
- - "80:8080"
- - "443:8443"
- volumes:
- - $SCRIPTS_PATH:/opt/primekey/scripts
- healthcheck:
- test: ["CMD-SHELL", "curl -kI https://localhost:8443/ejbca/publicweb/healthcheck/ejbcahealth"]
- interval: 20s
- timeout: 3s
- retries: 9
- networks:
- - certservice
-
- aaf-cert-service:
- image: nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-api:latest
- volumes:
- - $CONFIGURATION_PATH:/etc/onap/aaf/certservice/cmpServers.json
- - ./certs/truststore.jks:/etc/onap/aaf/certservice/certs/truststore.jks
- - ./certs/root.crt:/etc/onap/aaf/certservice/certs/root.crt
- - ./certs/certServiceServer-keystore.jks:/etc/onap/aaf/certservice/certs/certServiceServer-keystore.jks
- - ./certs/certServiceServer-keystore.p12:/etc/onap/aaf/certservice/certs/certServiceServer-keystore.p12
- container_name: aafcert-service
- ports:
- - "8443:8443"
- depends_on:
- ejbca:
- condition: service_healthy
- healthcheck:
- test: ["CMD-SHELL", "curl https://localhost:8443/actuator/health --cacert /etc/onap/aaf/certservice/certs/root.crt --cert-type p12 --cert /etc/onap/aaf/certservice/certs/certServiceServer-keystore.p12 --pass secret"]
- interval: 10s
- timeout: 3s
- retries: 15
- networks:
- - certservice
-
-
-networks:
- certservice:
- driver: bridge
-
diff --git a/plans/aaf/certservice/certs/Makefile b/plans/oom-platform-cert-service/certservice/certs/Makefile
similarity index 93%
rename from plans/aaf/certservice/certs/Makefile
rename to plans/oom-platform-cert-service/certservice/certs/Makefile
index 126e053..ea90c5c 100644
--- a/plans/aaf/certservice/certs/Makefile
+++ b/plans/oom-platform-cert-service/certservice/certs/Makefile
@@ -63,16 +63,16 @@
#Generate certService private and public keys
step_9:
@echo "Generate certService private and public keys"
- keytool -genkeypair -v -alias aaf-cert-service -keyalg RSA -keysize 2048 -validity 730 \
+ keytool -genkeypair -v -alias oom-cert-service -keyalg RSA -keysize 2048 -validity 730 \
-keystore certServiceServer-keystore.jks -storetype JKS \
- -dname "CN=aaf-cert-service,OU=certServiceServer company,O=certServiceServer org,L=Wroclaw,ST=Dolny Slask,C=PL" \
+ -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 aaf-cert-service -storepass secret -file certServiceServer.csr
+ keytool -certreq -keystore certServiceServer-keystore.jks -alias oom-cert-service -storepass secret -file certServiceServer.csr
@echo "####done####"
#Sign certService certificate by root CA
@@ -80,7 +80,7 @@
@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:aaf-cert-service,DNS:localhost"
+ -ext SubjectAlternativeName:="DNS:oom-cert-service,DNS:localhost"
@echo "####done####"
#Import root certificate into server
@@ -92,7 +92,7 @@
#Import signed certificate into certService
step_13:
@echo "Import signed certificate into certService"
- keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias aaf-cert-service \
+ keytool -importcert -file certServiceServerByRoot.crt -destkeystore certServiceServer-keystore.jks -alias oom-cert-service \
-storepass secret -noprompt
@echo "####done####"
diff --git a/plans/aaf/certservice/cmpServers.json b/plans/oom-platform-cert-service/certservice/cmpServers.json
similarity index 75%
rename from plans/aaf/certservice/cmpServers.json
rename to plans/oom-platform-cert-service/certservice/cmpServers.json
index d6557c5..7256494 100644
--- a/plans/aaf/certservice/cmpServers.json
+++ b/plans/oom-platform-cert-service/certservice/cmpServers.json
@@ -2,7 +2,7 @@
"cmpv2Servers": [
{
"caName": "Client",
- "url": "http://aafcert-ejbca:8080/ejbca/publicweb/cmp/cmp",
+ "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmp",
"issuerDN": "CN=ManagementCA",
"caMode": "CLIENT",
"authentication": {
@@ -12,7 +12,7 @@
},
{
"caName": "RA",
- "url": "http://aafcert-ejbca:8080/ejbca/publicweb/cmp/cmpRA",
+ "url": "http://oomcert-ejbca:8080/ejbca/publicweb/cmp/cmpRA",
"issuerDN": "CN=ManagementCA",
"caMode": "RA",
"authentication": {
diff --git a/plans/oom-platform-cert-service/certservice/docker-compose.yml b/plans/oom-platform-cert-service/certservice/docker-compose.yml
new file mode 100644
index 0000000..b281101
--- /dev/null
+++ b/plans/oom-platform-cert-service/certservice/docker-compose.yml
@@ -0,0 +1,47 @@
+version: "2.1"
+
+services:
+ ejbca:
+ image: primekey/ejbca-ce:6.15.2.5
+ hostname: cahostname
+ container_name: oomcert-ejbca
+ ports:
+ - "80:8080"
+ - "443:8443"
+ volumes:
+ - $SCRIPTS_PATH:/opt/primekey/scripts
+ healthcheck:
+ test: ["CMD-SHELL", "curl -kI https://localhost:8443/ejbca/publicweb/healthcheck/ejbcahealth"]
+ interval: 20s
+ timeout: 3s
+ retries: 9
+ networks:
+ - certservice
+
+ oom-cert-service:
+ image: nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-api:latest
+ volumes:
+ - $CONFIGURATION_PATH:/etc/onap/oom/certservice/cmpServers.json
+ - ./certs/truststore.jks:/etc/onap/oom/certservice/certs/truststore.jks
+ - ./certs/root.crt:/etc/onap/oom/certservice/certs/root.crt
+ - ./certs/certServiceServer-keystore.jks:/etc/onap/oom/certservice/certs/certServiceServer-keystore.jks
+ - ./certs/certServiceServer-keystore.p12:/etc/onap/oom/certservice/certs/certServiceServer-keystore.p12
+ container_name: oomcert-service
+ ports:
+ - "8443:8443"
+ depends_on:
+ ejbca:
+ condition: service_healthy
+ 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:
+ - certservice
+
+
+networks:
+ certservice:
+ driver: bridge
+
diff --git a/plans/aaf/certservice/scripts/ejbca-configuration.sh b/plans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh
similarity index 100%
rename from plans/aaf/certservice/scripts/ejbca-configuration.sh
rename to plans/oom-platform-cert-service/certservice/scripts/ejbca-configuration.sh
diff --git a/plans/aaf/certservice/setup.sh b/plans/oom-platform-cert-service/certservice/setup.sh
similarity index 69%
rename from plans/aaf/certservice/setup.sh
rename to plans/oom-platform-cert-service/certservice/setup.sh
index 1200e96..bee54cd 100644
--- a/plans/aaf/certservice/setup.sh
+++ b/plans/oom-platform-cert-service/certservice/setup.sh
@@ -20,7 +20,7 @@
SCRIPT=`realpath $0`
CURRENT_WORKDIR_PATH=`dirname $SCRIPT`
-PROJECT_DIRECTORY="plans/aaf/certservice"
+PROJECT_DIRECTORY="plans/oom-platform-cert-service/certservice"
SCRIPTS_DIRECTORY="scripts"
@@ -75,35 +75,35 @@
export SCRIPTS_PATH=${SCRIPTS_PATH}
#Generate keystores, truststores, certificates and keys
-mkdir -p ${WORKSPACE}/tests/aaf/certservice/assets/certs/
+mkdir -p ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/
make all -C ./certs/
-cp ${WORKSPACE}/plans/aaf/certservice/certs/root.crt ${WORKSPACE}/tests/aaf/certservice/assets/certs/root.crt
+cp ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/root.crt ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/root.crt
echo "Generated keystores"
-openssl pkcs12 -in ${WORKSPACE}/plans/aaf/certservice/certs/certServiceServer-keystore.p12 -clcerts -nokeys -password pass:secret | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.crt
+openssl pkcs12 -in ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/certServiceServer-keystore.p12 -clcerts -nokeys -password pass:secret | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.crt
echo "Generated server certificate"
-openssl pkcs12 -in ${WORKSPACE}/plans/aaf/certservice/certs/certServiceServer-keystore.p12 -nocerts -nodes -password pass:secret| sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > ${WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.key
+openssl pkcs12 -in ${WORKSPACE}/plans/oom-platform-cert-service/certservice/certs/certServiceServer-keystore.p12 -nocerts -nodes -password pass:secret| sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.key
echo "Generated server key"
docker-compose up -d
-AAFCERT_IP='none'
+OOMCERT_IP='none'
# Wait container ready
for i in {1..9}
do
- AAFCERT_IP=`get-instance-ip.sh aafcert-service`
+ OOMCERT_IP=`get-instance-ip.sh oomcert-service`
RESP_CODE=$(curl -s https://localhost:8443/actuator/health --cacert ./certs/root.crt --cert-type p12 --cert ./certs/certServiceServer-keystore.p12 --pass secret | \
python2 -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]')
if [[ "$RESP_CODE" == "UP" ]]; then
- echo 'AAF Cert Service is ready'
- export AAFCERT_IP=${AAFCERT_IP}
- docker exec aafcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
+ echo 'OOM Cert Service is ready'
+ export OOMCERT_IP=${OOMCERT_IP}
+ docker exec oomcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
break
fi
- echo 'Waiting for AAF Cert Service to start up...'
+ echo 'Waiting for OOM Cert Service to start up...'
sleep 30s
done
-if [ "$AAFCERT_IP" == 'none' -o "$AAFCERT_IP" == '' ]; then
- echo "AAF Cert Service is not ready!"
+if [ "$OOMCERT_IP" == 'none' -o "$OOMCERT_IP" == '' ]; then
+ echo "OOM Cert Service is not ready!"
exit 1 # Return error code
fi
diff --git a/plans/aaf/certservice/teardown.sh b/plans/oom-platform-cert-service/certservice/teardown.sh
similarity index 90%
rename from plans/aaf/certservice/teardown.sh
rename to plans/oom-platform-cert-service/certservice/teardown.sh
index 71e20b7..f531180 100644
--- a/plans/aaf/certservice/teardown.sh
+++ b/plans/oom-platform-cert-service/certservice/teardown.sh
@@ -19,7 +19,7 @@
make clear -C ./certs/
echo "Removed old keystores"
-rm -rf ${WORKSPACE}/tests/aaf/certservice/assets/certs
+rm -rf ${WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs
echo "Removed old certificates"
kill-instance.sh ${ClientContainerName}
\ No newline at end of file
diff --git a/plans/aaf/certservice/testplan.txt b/plans/oom-platform-cert-service/certservice/testplan.txt
similarity index 72%
rename from plans/aaf/certservice/testplan.txt
rename to plans/oom-platform-cert-service/certservice/testplan.txt
index 270fc6d..ed9ee12 100755
--- a/plans/aaf/certservice/testplan.txt
+++ b/plans/oom-platform-cert-service/certservice/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-aaf/certservice
+oom-platform-cert-service/certservice
diff --git a/tests/aaf/certservice/resources/cert-service-properties.robot b/tests/aaf/certservice/resources/cert-service-properties.robot
deleted file mode 100644
index 54ddec1..0000000
--- a/tests/aaf/certservice/resources/cert-service-properties.robot
+++ /dev/null
@@ -1,31 +0,0 @@
-*** Variables ***
-
-${CERT_SERVICE_CONTAINER_NAME} aaf-cert-service
-${CERT_SERVICE_PORT} 8443
-${AAFCERT_URL} https://localhost:${cert_service_port}
-${CLIENT_CA_NAME} Client
-${RA_CA_NAME} RA
-${CERT_SERVICE_ENDPOINT} /v1/certificate/
-${ROOTCA} %{WORKSPACE}/tests/aaf/certservice/assets/certs/root.crt
-${CERTSERVICE_SERVER_CRT} %{WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.crt
-${CERTSERVICE_SERVER_KEY} %{WORKSPACE}/tests/aaf/certservice/assets/certs/certServiceServer.key
-${VALID_CLIENT_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.csr
-${VALID_CLIENT_PK_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client.pk
-${VALID_RA_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_ra.csr
-${VALID_RA_PK_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_ra.pk
-${INVALID_CSR_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid.csr
-${INVALID_PK_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid.key
-
-
-${CERT_SERVICE_ADDRESS} https://${CERT_SERVICE_CONTAINER_NAME}:${CERT_SERVICE_PORT}
-${VALID_ENV_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker.env
-${VALID_ENV_FILE_JKS} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_jks.env
-${VALID_ENV_FILE_P12} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_p12.env
-${VALID_ENV_FILE_PEM} %{WORKSPACE}/tests/aaf/certservice/assets/valid_client_docker_pem.env
-${INVALID_ENV_FILE_OUTPUT_TYPE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid_client_docker_output_type.env
-${INVALID_ENV_FILE} %{WORKSPACE}/tests/aaf/certservice/assets/invalid_client_docker.env
-${DOCKER_CLIENT_IMAGE} nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-client:latest
-${CLIENT_CONTAINER_NAME} %{ClientContainerName}
-${CERT_SERVICE_NETWORK} certservice_certservice
-${MOUNT_PATH} %{WORKSPACE}/tests/aaf/certservice/tmp
-${TRUSTSTORE_PATH} %{WORKSPACE}/plans/aaf/certservice/certs
diff --git a/tests/aaf/certservice/assets/invalid.csr b/tests/oom-platform-cert-service/certservice/assets/invalid.csr
similarity index 100%
rename from tests/aaf/certservice/assets/invalid.csr
rename to tests/oom-platform-cert-service/certservice/assets/invalid.csr
diff --git a/tests/aaf/certservice/assets/invalid.key b/tests/oom-platform-cert-service/certservice/assets/invalid.key
similarity index 100%
rename from tests/aaf/certservice/assets/invalid.key
rename to tests/oom-platform-cert-service/certservice/assets/invalid.key
diff --git a/tests/aaf/certservice/assets/invalid_client_docker.env b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
similarity index 61%
rename from tests/aaf/certservice/assets/invalid_client_docker.env
rename to tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
index e96237c..4f19a9e 100644
--- a/tests/aaf/certservice/assets/invalid_client_docker.env
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
@@ -2,9 +2,9 @@
REQUEST_TIMEOUT=5000
OUTPUT_PATH=/var/certs
CA_NAME=Invalid
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/invalid_client_docker_output_type.env b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
similarity index 62%
rename from tests/aaf/certservice/assets/invalid_client_docker_output_type.env
rename to tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
index cff4664..4cdcd9e 100644
--- a/tests/aaf/certservice/assets/invalid_client_docker_output_type.env
+++ b/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
@@ -3,9 +3,9 @@
OUTPUT_PATH=/var/certs
CA_NAME=RA
OUTPUT_TYPE=INV
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/valid_client.csr b/tests/oom-platform-cert-service/certservice/assets/valid_client.csr
similarity index 100%
rename from tests/aaf/certservice/assets/valid_client.csr
rename to tests/oom-platform-cert-service/certservice/assets/valid_client.csr
diff --git a/tests/aaf/certservice/assets/valid_client.pk b/tests/oom-platform-cert-service/certservice/assets/valid_client.pk
similarity index 100%
rename from tests/aaf/certservice/assets/valid_client.pk
rename to tests/oom-platform-cert-service/certservice/assets/valid_client.pk
diff --git a/tests/aaf/certservice/assets/valid_client_docker.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
similarity index 61%
rename from tests/aaf/certservice/assets/valid_client_docker.env
rename to tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
index 55fefa3..6fad6d2 100644
--- a/tests/aaf/certservice/assets/valid_client_docker.env
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
@@ -2,9 +2,9 @@
REQUEST_TIMEOUT=30000
OUTPUT_PATH=/var/certs
CA_NAME=RA
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/valid_client_docker_jks.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
similarity index 62%
rename from tests/aaf/certservice/assets/valid_client_docker_jks.env
rename to tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
index 19de075..0e2d836 100644
--- a/tests/aaf/certservice/assets/valid_client_docker_jks.env
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
@@ -3,9 +3,9 @@
OUTPUT_PATH=/var/certs
CA_NAME=RA
OUTPUT_TYPE=JKS
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/valid_client_docker_p12.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
similarity index 62%
rename from tests/aaf/certservice/assets/valid_client_docker_p12.env
rename to tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
index 0f1cfc2..c3ed729 100644
--- a/tests/aaf/certservice/assets/valid_client_docker_p12.env
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
@@ -3,9 +3,9 @@
OUTPUT_PATH=/var/certs
CA_NAME=RA
OUTPUT_TYPE=P12
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/valid_client_docker_pem.env b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
similarity index 62%
rename from tests/aaf/certservice/assets/valid_client_docker_pem.env
rename to tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
index f704f21..aca2a54 100644
--- a/tests/aaf/certservice/assets/valid_client_docker_pem.env
+++ b/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
@@ -3,9 +3,9 @@
OUTPUT_PATH=/var/certs
CA_NAME=RA
OUTPUT_TYPE=PEM
-KEYSTORE_PATH=/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks
+KEYSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/certServiceClient-keystore.jks
KEYSTORE_PASSWORD=secret
-TRUSTSTORE_PATH=/etc/onap/aaf/certservice/certs/truststore.jks
+TRUSTSTORE_PATH=/etc/onap/oom-platform-cert-service/certservice/certs/truststore.jks
TRUSTSTORE_PASSWORD=secret
#Csr config envs
COMMON_NAME=onap.org
diff --git a/tests/aaf/certservice/assets/valid_ra.csr b/tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
similarity index 100%
rename from tests/aaf/certservice/assets/valid_ra.csr
rename to tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
diff --git a/tests/aaf/certservice/assets/valid_ra.pk b/tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
similarity index 100%
rename from tests/aaf/certservice/assets/valid_ra.pk
rename to tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
diff --git a/tests/aaf/certservice/cert-service-test.robot b/tests/oom-platform-cert-service/certservice/cert-service-test.robot
similarity index 87%
rename from tests/aaf/certservice/cert-service-test.robot
rename to tests/oom-platform-cert-service/certservice/cert-service-test.robot
index ddf7a17..58e8a7e 100644
--- a/tests/aaf/certservice/cert-service-test.robot
+++ b/tests/oom-platform-cert-service/certservice/cert-service-test.robot
@@ -1,6 +1,6 @@
*** Settings ***
-Documentation AAF Cert Service API test case scenarios
+Documentation OOM Cert Service API test case scenarios
Library RequestsLibrary
Resource ./resources/cert-service-keywords.robot
@@ -9,82 +9,82 @@
*** Test Cases ***
Health Check
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Service is up and running
Run health check
Reload Configuration
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Configuration was changed
Send Get Request And Validate Response /reload 200
Check if application is ready
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request to /ready endpoint and expect 200
Send Get Request And Validate Response /ready 200
Generate Certificate In RA Mode For CA Name
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME} endpoint and expect 200
Send Get Request with Header And Expect Success ${CERT_SERVICE_ENDPOINT}${RA_CA_NAME} ${VALID_RA_CSR_FILE} ${VALID_RA_PK_FILE}
Report Not Found Error When Path To Service Is Not Valid
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request to ${CERT_SERVICE_ENDPOINT} endpoint and expect 404
Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT} ${VALID_CLIENT_CSR_FILE} ${VALID_CLIENT_PK_FILE} 404
Report Bad Request Error When Header Is Missing In Request
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request without header to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
Send Get Request And Validate Response ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} 400
Report Bad Request Error When CSR Is Not Valid
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} ${INVALID_CSR_FILE} ${VALID_CLIENT_PK_FILE} 400
Report Bad Request Error When PK Is Not Valid
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Send request to ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} endpoint and expect 400
Send Get Request with Header And Expect Error ${CERT_SERVICE_ENDPOINT}${CLIENT_CA_NAME} ${VALID_CLIENT_CSR_FILE} ${INVALID_PK_FILE} 400
Cert Service Client successfully creates keystore.p12 and truststore.p12
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and expected exit code 0
Run Cert Service Client And Validate PKCS12 File Creation And Client Exit Code ${VALID_ENV_FILE} 0
Cert Service Client successfully creates keystore.jks and truststore.jks
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and expected exit code 0
Run Cert Service Client And Validate JKS File Creation And Client Exit Code ${VALID_ENV_FILE_JKS} 0
Cert Service Client successfully creates keystore and truststore with expected data with no OUTPUT_TYPE
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and PKCS12 files created with correct data
Run Cert Service Client And Validate PKCS12 Files Contain Expected Data ${VALID_ENV_FILE} 0
Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=JKS
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and JKS files created with correct data
Run Cert Service Client And Validate JKS Files Contain Expected Data ${VALID_ENV_FILE_JKS} 0
Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=P12
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and PKCS12 files created with correct data
Run Cert Service Client And Validate PKCS12 Files Contain Expected Data ${VALID_ENV_FILE_P12} 0
Cert Service Client successfully creates keystore and truststore with expected data with OUTPUT_TYPE=PEM
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with correct env and PEM files created with correct data
Run Cert Service Client And Validate PEM Files Contain Expected Data ${VALID_ENV_FILE_PEM} 0
Cert Service Client reports error when OUTPUT_TYPE is invalid
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with invalid OUTPUT_TYPE env and expected exit code 1
Run Cert Service Client And Validate Client Exit Code ${INVALID_ENV_FILE_OUTPUT_TYPE} 1
Run Cert Service Client Container And Validate Exit Code And API Response
- [Tags] AAF-CERT-SERVICE
+ [Tags] OOM-CERT-SERVICE
[Documentation] Run with invalid CaName env and expected exit code 5
Run Cert Service Client And Validate Http Response Code And Client Exit Code ${INVALID_ENV_FILE} 404 5
diff --git a/tests/aaf/certservice/libraries/ArtifactParser.py b/tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py
similarity index 100%
rename from tests/aaf/certservice/libraries/ArtifactParser.py
rename to tests/oom-platform-cert-service/certservice/libraries/ArtifactParser.py
diff --git a/tests/aaf/certservice/libraries/CertClientManager.py b/tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py
similarity index 94%
rename from tests/aaf/certservice/libraries/CertClientManager.py
rename to tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py
index a4a0df2..46d69bb 100644
--- a/tests/aaf/certservice/libraries/CertClientManager.py
+++ b/tests/oom-platform-cert-service/certservice/libraries/CertClientManager.py
@@ -29,7 +29,7 @@
network=network,
user='root', # Run container as root to avoid permission issues with volume mount access
mounts=[Mount(target='/var/certs', source=self.mount_path, type='bind'),
- Mount(target='/etc/onap/aaf/certservice/certs/', source=self.truststore_path, type='bind')],
+ Mount(target='/etc/onap/oom-platform-cert-service/certservice/certs/', source=self.truststore_path, type='bind')],
detach=True
)
exitcode = container.wait()
diff --git a/tests/aaf/certservice/libraries/EnvsReader.py b/tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py
similarity index 100%
rename from tests/aaf/certservice/libraries/EnvsReader.py
rename to tests/oom-platform-cert-service/certservice/libraries/EnvsReader.py
diff --git a/tests/aaf/certservice/libraries/JksArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py
similarity index 100%
rename from tests/aaf/certservice/libraries/JksArtifactsValidator.py
rename to tests/oom-platform-cert-service/certservice/libraries/JksArtifactsValidator.py
diff --git a/tests/aaf/certservice/libraries/P12ArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py
similarity index 100%
rename from tests/aaf/certservice/libraries/P12ArtifactsValidator.py
rename to tests/oom-platform-cert-service/certservice/libraries/P12ArtifactsValidator.py
diff --git a/tests/aaf/certservice/libraries/PemArtifactsValidator.py b/tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py
similarity index 100%
rename from tests/aaf/certservice/libraries/PemArtifactsValidator.py
rename to tests/oom-platform-cert-service/certservice/libraries/PemArtifactsValidator.py
diff --git a/tests/aaf/certservice/resources/cert-service-keywords.robot b/tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot
similarity index 98%
rename from tests/aaf/certservice/resources/cert-service-keywords.robot
rename to tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot
index 39c26a6..fea210b 100644
--- a/tests/aaf/certservice/resources/cert-service-keywords.robot
+++ b/tests/oom-platform-cert-service/certservice/resources/cert-service-keywords.robot
@@ -15,7 +15,7 @@
Create sessions
[Documentation] Create all required sessions
${certs}= Create List ${CERTSERVICE_SERVER_CRT} ${CERTSERVICE_SERVER_KEY}
- Create Client Cert Session alias ${AAFCERT_URL} client_certs=${certs} verify=${ROOTCA}
+ Create Client Cert Session alias ${OOMCERT_URL} client_certs=${certs} verify=${ROOTCA}
Set Suite Variable ${https_valid_cert_session} alias
Run Healthcheck
diff --git a/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot b/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot
new file mode 100644
index 0000000..ff0500a
--- /dev/null
+++ b/tests/oom-platform-cert-service/certservice/resources/cert-service-properties.robot
@@ -0,0 +1,31 @@
+*** Variables ***
+
+${CERT_SERVICE_CONTAINER_NAME} oom-cert-service
+${CERT_SERVICE_PORT} 8443
+${OOMCERT_URL} https://localhost:${cert_service_port}
+${CLIENT_CA_NAME} Client
+${RA_CA_NAME} RA
+${CERT_SERVICE_ENDPOINT} /v1/certificate/
+${ROOTCA} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/root.crt
+${CERTSERVICE_SERVER_CRT} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.crt
+${CERTSERVICE_SERVER_KEY} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/certs/certServiceServer.key
+${VALID_CLIENT_CSR_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client.csr
+${VALID_CLIENT_PK_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client.pk
+${VALID_RA_CSR_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_ra.csr
+${VALID_RA_PK_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_ra.pk
+${INVALID_CSR_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid.csr
+${INVALID_PK_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid.key
+
+
+${CERT_SERVICE_ADDRESS} https://${CERT_SERVICE_CONTAINER_NAME}:${CERT_SERVICE_PORT}
+${VALID_ENV_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker.env
+${VALID_ENV_FILE_JKS} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_jks.env
+${VALID_ENV_FILE_P12} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_p12.env
+${VALID_ENV_FILE_PEM} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/valid_client_docker_pem.env
+${INVALID_ENV_FILE_OUTPUT_TYPE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker_output_type.env
+${INVALID_ENV_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/assets/invalid_client_docker.env
+${DOCKER_CLIENT_IMAGE} nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:latest
+${CLIENT_CONTAINER_NAME} %{ClientContainerName}
+${CERT_SERVICE_NETWORK} certservice_certservice
+${MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/certservice/tmp
+${TRUSTSTORE_PATH} %{WORKSPACE}/plans/oom-platform-cert-service/certservice/certs