aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/simulator-group
diff options
context:
space:
mode:
authorKrzysztof Gajewski <krzysztof.gajewski@nokia.com>2021-02-01 17:46:51 +0100
committerKrzysztof Gajewski <krzysztof.gajewski@nokia.com>2021-02-11 18:12:27 +0100
commitc746882a07952a0cd460e6fa8bcac246289db6b9 (patch)
treef1398e07e0916d19860f52e48191597d0ff5e9b0 /test/mocks/datafilecollector-testharness/simulator-group
parentae43fa6fee1bb5b8cb68e21f50b477c084ef21eb (diff)
Add HTTPS to DFC tests
- testing environment preparation for DFC with HTTPS client (expand existing http server) - add suitable TCs for CSIT tests Issue-ID: DCAEGEN2-2528 Signed-off-by: Krzysztof Gajewski <krzysztof.gajewski@nokia.com> Change-Id: Ifa8abb827e269d76144fc74c65031dd387fe5fe7
Diffstat (limited to 'test/mocks/datafilecollector-testharness/simulator-group')
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/README.md6
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_HTTPS.json36
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json8
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json8
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/docker-compose-setup.sh11
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml52
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/prepare-images.sh11
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/simulators-kill.sh21
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh75
20 files changed, 223 insertions, 93 deletions
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/README.md b/test/mocks/datafilecollector-testharness/simulator-group/README.md
index 75abec9f1..98b26bc86 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/README.md
+++ b/test/mocks/datafilecollector-testharness/simulator-group/README.md
@@ -95,15 +95,15 @@ FILE_SIZE="1MB" #File size for FTP file (1KB, 1MB, 5MB, 50MB or AL
FTP_TYPE="SFTP" #Type of FTP files to generate (SFTP, FTPES or ALL)
If `FTP_TYPE` is set to `ALL`, both ftp servers will be populated with the same files. If set to `SFTP` or `FTPES` then only the server serving that protocol will be populated with files.
-`HTTP_TYPE` for now is only prepared for `HTTP` protocol. `HTTPS` protocol will be served in the future
+`HTTP_TYPE` is prepared for `HTTP` and `HTTPS` protocol. Note, thanks to configuration of http server, single action populates files for all HTTP/HTTPS server type.
Run the script `docker-compose-setup.sh`to create a docker-compose with the desired settings. The desired setting
in the script need to be manually adapted to for each specific simulator behavior according to the above. Check each simulator for available
parameters.
All simulators will be started with the generated docker-compose.yml file
-To generate ftp/http url with IP different from localhost, set SFTP_SIM_IP and/or FTPES_SIM_IP and/or HTTP_SIM_IP env variables to the addreses of the ftp servers before starting.
-So farm, this only works when the simulator python script is started from the command line.
+To generate an ftp/http/https url with an IP different from localhost, set the SFTP_SIM_IP and/or FTPES_SIM_IP and/or HTTP_SIM_IP and/or HTTPS_SIM_IP and/or HTTPS_SIM_NO_AUTH_IP env variables to the address(es) of the ftp/http/https servers before starting.
+So far, this only works when the simulator python script is started from the command line.
Kill all the containers with `simulators-kill.se`
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
index f839e79be..76d6822a2 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
index 89a49070e..ddf0bbb36 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
index dbd41652b..43dc6a9c5 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
index fee8a0f79..bc9c9b1f6 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
index 5a297d279..c5a5f843f 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_HTTPS.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_HTTPS.json
new file mode 100644
index 000000000..960764ad8
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_HTTPS.json
@@ -0,0 +1,36 @@
+{
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.p12",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/p12.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.security.enableDmaapCertAuth": "false",
+ "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+ "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+ "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
+ "sftp.security.strictHostKeyChecking": "true",
+ "streams_publishes": {
+ "PM_MEAS_FILES": {
+ "type": "data_router",
+ "dmaap_info": {
+ "username": "user",
+ "log_url": "https://drsim:3907/feedlog/2",
+ "publish_url": "https://drsim:3907/publish/2",
+ "location": "loc00",
+ "password": "password",
+ "publisher_id": "972.360gm"
+ }
+ }
+ },
+ "streams_subscribes": {
+ "dmaap_subscriber": {
+ "dmaap_info": {
+ "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
+ },
+ "type": "message_router"
+ }
+ }
+}
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
index 5a297d279..c5a5f843f 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
index 8ab143879..9f370391b 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
index 5a297d279..c5a5f843f 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
index 4e6b1fd25..bf65e85a8 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
index 599ad74e6..486d5ee44 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
index 8e96210bb..6509bcfdf 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
index 4b538987e..620d172e6 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
index f0fc2cba9..dfbecaa1e 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json
@@ -1,8 +1,8 @@
{
- "dmaap.ftpesConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
- "dmaap.ftpesConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
- "dmaap.ftpesConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
- "dmaap.ftpesConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
+ "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks",
+ "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
+ "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks",
+ "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks",
"dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass",
"dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-setup.sh b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-setup.sh
index ad45559eb..d5b36ec58 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-setup.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-setup.sh
@@ -1,4 +1,13 @@
#/bin/bash
+#
+# Modifications copyright (C) 2021 Nokia. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Script for manually starting all simulators with test setting below
# Matching json config is needed in CBS/Consul as well. Use consul_config.sh to add config to consul
@@ -31,6 +40,8 @@ export BASIC_AUTH_PASSWORD=demo123456!
export SFTP_SIMS="localhost:21,localhost:22,localhost:23,localhost:24,localhost:25" # Comma separated list for SFTP servers host:port
export FTPES_SIMS="localhost:1022,localhost:1023,localhost:1024,localhost:1026,localhost:1026" # Comma separated list for FTPES servers host:port
export HTTP_SIMS="localhost:81,localhost:82,localhost:83,localhost:84,localhost:85" # Comma separated list for HTTP servers host:port
+export HTTPS_SIMS="localhost:444,localhost:445,localhost:446,localhost:447,localhost:448" # Comma separated list for HTTPS (enabling client certificate authorization and basic authorization) servers host:port
+export HTTPS_SIMS_NO_AUTH="localhost:8081,localhost:8082,localhost:8083,localhost:8084,localhost:8085" # Comma separated list for HTTPS (with no authorization) servers host:port
export DR_REDIR_SIM="localhost" # Hostname of DR redirect server
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
index c4ed2fec3..537012afb 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
+++ b/test/mocks/datafilecollector-testharness/simulator-group/docker-compose-template.yml
@@ -78,6 +78,8 @@ services:
SFTP_SIMS: ${SFTP_SIMS}
FTPES_SIMS: ${FTPES_SIMS}
HTTP_SIMS: ${HTTP_SIMS}
+ HTTPS_SIMS: ${HTTPS_SIMS}
+ HTTPS_SIMS_NO_AUTH: ${HTTPS_SIMS_NO_AUTH}
NUM_FTP_SERVERS: ${NUM_FTP_SERVERS}
NUM_HTTP_SERVERS: ${NUM_HTTP_SERVERS}
MR_GROUPS: ${MR_GROUPS}
@@ -228,47 +230,67 @@ services:
depends_on:
- tls-init-container
- http-server0:
+ http-https-server0:
networks:
- dfcnet
- container_name: dfc_http-server0
- image: http_httpd:latest
+ container_name: dfc_http-https-server0
+ image: http_https_httpd:latest
ports:
- "81:80"
+ - "444:443"
+ - "8081:8080"
restart: on-failure
+ volumes:
+ - ./../certservice/generated-certs/apache-pem:/usr/local/apache2/certs/:rw
- http-server1:
+ http-https-server1:
networks:
- dfcnet
- container_name: dfc_http-server1
- image: http_httpd:latest
+ container_name: dfc_http-https-server1
+ image: http_https_httpd:latest
ports:
- "82:80"
+ - "445:443"
+ - "8082:8080"
restart: on-failure
+ volumes:
+ - ./../certservice/generated-certs/apache-pem:/usr/local/apache2/certs/:rw
- http-server2:
+ http-https-server2:
networks:
- dfcnet
- container_name: dfc_http-server2
- image: http_httpd:latest
+ container_name: dfc_http-https-server2
+ image: http_https_httpd:latest
ports:
- "83:80"
+ - "446:443"
+ - "8083:8080"
restart: on-failure
+ volumes:
+ - ./../certservice/generated-certs/apache-pem:/usr/local/apache2/certs/:rw
- http-server3:
+ http-https-server3:
networks:
- dfcnet
- container_name: dfc_http-server3
- image: http_httpd:latest
+ container_name: dfc_http-https-server3
+ image: http_https_httpd:latest
ports:
- "84:80"
+ - "447:443"
+ - "8084:8080"
restart: on-failure
+ volumes:
+ - ./../certservice/generated-certs/apache-pem:/usr/local/apache2/certs/:rw
- http-server4:
+ http-https-server4:
networks:
- dfcnet
- container_name: dfc_http-server4
- image: http_httpd:latest
+ container_name: dfc_http-https-server4
+ image: http_https_httpd:latest
ports:
- "85:80"
+ - "448:443"
+ - "8085:8080"
restart: on-failure
+ volumes:
+ - ./../certservice/generated-certs/apache-pem:/usr/local/apache2/certs/:rw
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/prepare-images.sh b/test/mocks/datafilecollector-testharness/simulator-group/prepare-images.sh
index fa56724bb..0021eca5e 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/prepare-images.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/prepare-images.sh
@@ -1,4 +1,13 @@
#/bin/bash
+#
+# Modifications copyright (C) 2021 Nokia. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
#Script for manually preparing images for mr-sim, dr-sim, dr-redir-sim and sftp server.
@@ -20,4 +29,4 @@ docker build -t ftpes_vsftpd:latest -f Dockerfile-ftpes .
#Build image for http server
cd ../http-https-server
-docker build -t http_httpd:latest -f Dockerfile-http .
+docker build -t http_https_httpd:latest -f Dockerfile-http-https .
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/simulators-kill.sh b/test/mocks/datafilecollector-testharness/simulator-group/simulators-kill.sh
index 697850339..e53494392 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/simulators-kill.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/simulators-kill.sh
@@ -1,4 +1,13 @@
#!/bin/bash
+#
+# Modifications copyright (C) 2021 Nokia. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
#Script to kill and remove all simulators
docker logs dfc_mr-sim
@@ -21,6 +30,7 @@ docker kill dfc_http-server1
docker kill dfc_http-server2
docker kill dfc_http-server3
docker kill dfc_http-server4
+docker kill oom-certservice-post-processor
docker kill dfc_cbs
docker kill dfc_consul
@@ -38,11 +48,12 @@ docker rm dfc_ftpes-server-vsftpd1
docker rm dfc_ftpes-server-vsftpd2
docker rm dfc_ftpes-server-vsftpd3
docker rm dfc_ftpes-server-vsftpd4
-docker rm dfc_http-server0
-docker rm dfc_http-server1
-docker rm dfc_http-server2
-docker rm dfc_http-server3
-docker rm dfc_http-server4
+docker rm -f dfc_http-https-server0
+docker rm -f dfc_http-https-server1
+docker rm -f dfc_http-https-server2
+docker rm -f dfc_http-https-server3
+docker rm -f dfc_http-https-server4
+docker rm -f oom-certservice-post-processor
docker rm dfc_cbs
docker rm dfc_consul
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
index 895949caa..f39f052a0 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
@@ -1,4 +1,13 @@
#!/bin/bash
+#
+# Modifications copyright (C) 2021 Nokia. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
set -x
server_check() {
for i in {1..10}; do
@@ -12,16 +21,28 @@ server_check() {
echo "Simulator " $1 " on localhost:$2$3 - no response"
}
-basic_auth_server_check() {
+http_https_basic_server_check() {
for i in {1..10}; do
- res=$(curl -s -o /dev/null -w "%{http_code}" http://$BASIC_AUTH_LOGIN:$BASIC_AUTH_PASSWORD@localhost:$2$3)
+ res=$(curl $4 -s -o /dev/null -w "%{http_code}" "$3"://"$BASIC_AUTH_LOGIN":"$BASIC_AUTH_PASSWORD"@localhost:"$2")
if [ $res -gt 199 ] && [ $res -lt 300 ]; then
- echo "Simulator " $1 " on localhost:$2$3 responded ok"
+ echo "Simulator " "$1" " on localhost: ""$2"" responded ok"
return
fi
sleep 1
done
- echo "Simulator " $1 " on localhost:$2$3 - no response"
+ echo "Simulator " "$1" " on localhost:""$2"" - no response"
+}
+
+http_https_server_check() {
+ for i in {1..10}; do
+ res=$(curl $4 -s -o /dev/null -w "%{http_code}" $3://localhost:$2)
+ if [ $res -gt 199 ] && [ $res -lt 300 ]; then
+ echo "Simulator " $1 " on localhost:$2 responded ok"
+ return
+ fi
+ sleep 1
+ done
+ echo "Simulator " $1 " on localhost:$2 - no response"
}
server_check_https() {
@@ -38,7 +59,7 @@ server_check_https() {
ftpes_server_check() {
for i in {1..10}; do
- res=$(curl --silent --max-time 3 localhost:$2 2>&1 | grep vsFTPd)
+ res=$(curl --silent --max-time 3 ftp://localhost:$2 --ftp-ssl -v -k 2>&1 | grep vsFTPd)
if ! [ -z "$res" ]; then
echo "Simulator " $1 " on localhost:$2 responded ok"
return
@@ -50,7 +71,7 @@ ftpes_server_check() {
sftp_server_check() {
for i in {1..10}; do
- res=$(curl --silent --max-time 3 localhost:$2 2>&1 | grep OpenSSH)
+ res=$(curl --silent --max-time 3 sftp://localhost:$2 -v -k 2>&1 | grep Connected)
if ! [ -z "$res" ]; then
echo "Simulator " $1 " on localhost:"$2" responded ok"
return
@@ -67,6 +88,11 @@ DOCKER_SIM_NWNAME="dfcnet"
echo "Creating docker network $DOCKER_SIM_NWNAME, if needed"
docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
+if [ -z "$SIM_GROUP" ]
+ then
+ export SIM_GROUP="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+fi
+
if [ -z "$NUM_FTP_SERVERS" ]
then
export NUM_FTP_SERVERS=1
@@ -101,11 +127,11 @@ FTPES_SIM[1]="$(docker ps -q --filter='name=dfc_ftpes-server-vsftpd1')"
FTPES_SIM[2]="$(docker ps -q --filter='name=dfc_ftpes-server-vsftpd2')"
FTPES_SIM[3]="$(docker ps -q --filter='name=dfc_ftpes-server-vsftpd3')"
FTPES_SIM[4]="$(docker ps -q --filter='name=dfc_ftpes-server-vsftpd4')"
-HTTP_SIM[0]="$(docker ps -q --filter='name=dfc_http-server0')"
-HTTP_SIM[1]="$(docker ps -q --filter='name=dfc_http-server1')"
-HTTP_SIM[2]="$(docker ps -q --filter='name=dfc_http-server2')"
-HTTP_SIM[3]="$(docker ps -q --filter='name=dfc_http-server3')"
-HTTP_SIM[4]="$(docker ps -q --filter='name=dfc_http-server4')"
+HTTP_SIM[0]="$(docker ps -q --filter='name=dfc_http-https-server0')"
+HTTP_SIM[1]="$(docker ps -q --filter='name=dfc_http-https-server1')"
+HTTP_SIM[2]="$(docker ps -q --filter='name=dfc_http-https-server2')"
+HTTP_SIM[3]="$(docker ps -q --filter='name=dfc_http-https-server3')"
+HTTP_SIM[4]="$(docker ps -q --filter='name=dfc_http-https-server4')"
CBS_SIM="$(docker ps -q --filter='name=dfc_cbs')"
CONSUL_SIM="$(docker ps -q --filter='name=dfc_consul')"
@@ -168,11 +194,26 @@ sftp_server_check "SFTP server 1" 1023
sftp_server_check "SFTP server 2" 1024
sftp_server_check "SFTP server 3" 1025
sftp_server_check "SFTP server 4" 1026
-basic_auth_server_check "HTTP server 0" 81
-basic_auth_server_check "HTTP server 1" 82
-basic_auth_server_check "HTTP server 2" 83
-basic_auth_server_check "HTTP server 3" 84
-basic_auth_server_check "HTTP server 4" 85
+http_https_basic_server_check "HTTP basic auth server 0" 81 http
+http_https_basic_server_check "HTTP basic auth server 1" 82 http
+http_https_basic_server_check "HTTP basic auth server 2" 83 http
+http_https_basic_server_check "HTTP basic auth server 3" 84 http
+http_https_basic_server_check "HTTP basic auth server 4" 85 http
+http_https_basic_server_check "HTTPS basic auth server 0" 444 https -k
+http_https_basic_server_check "HTTPS basic auth server 1" 445 https -k
+http_https_basic_server_check "HTTPS basic auth server 2" 446 https -k
+http_https_basic_server_check "HTTPS basic auth server 3" 447 https -k
+http_https_basic_server_check "HTTPS basic auth server 4" 448 https -k
+http_https_server_check "HTTPS client certificate authentication server 0" 444 https "-k --cert ../certservice/generated-certs/apache-pem/keystore.pem --key ../certservice/generated-certs/apache-pem/key.pem"
+http_https_server_check "HTTPS client certificate authentication server 1" 445 https "-k --cert ../certservice/generated-certs/apache-pem/keystore.pem --key ../certservice/generated-certs/apache-pem/key.pem"
+http_https_server_check "HTTPS client certificate authentication server 2" 446 https "-k --cert ../certservice/generated-certs/apache-pem/keystore.pem --key ../certservice/generated-certs/apache-pem/key.pem"
+http_https_server_check "HTTPS client certificate authentication server 3" 447 https "-k --cert ../certservice/generated-certs/apache-pem/keystore.pem --key ../certservice/generated-certs/apache-pem/key.pem"
+http_https_server_check "HTTPS client certificate authentication server 4" 448 https "-k --cert ../certservice/generated-certs/apache-pem/keystore.pem --key ../certservice/generated-certs/apache-pem/key.pem"
+http_https_server_check "HTTPS no auth server 0" 8081 https -k
+http_https_server_check "HTTPS no auth server 1" 8082 https -k
+http_https_server_check "HTTPS no auth server 2" 8083 https -k
+http_https_server_check "HTTPS no auth server 3" 8084 https -k
+http_https_server_check "HTTPS no auth server 4" 8085 https -k
echo ""
@@ -235,7 +276,7 @@ if [ -z "$HTTP_FILE_PREFIXES" ]
HTTP_FILE_PREFIXES="A"
fi
-if [ $HTTP_TYPE = "ALL" ] || [ $HTTP_TYPE = "HTTP" ]; then
+if [ $HTTP_TYPE = "ALL" ] || [ $HTTP_TYPE = "HTTP" ] || [ $HTTP_TYPE = "HTTPS" ]; then
echo "Creating files for HTTP server, may take time...."
p=0
while [ $p -lt $NUM_HTTP_SERVERS ]; do