summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-03-19 13:08:02 -0400
committerJim Hahn <jrh3@att.com>2021-03-19 13:37:37 -0400
commita247d7b2c29b1422e0025b63529b3a92dc8aa551 (patch)
treeebea611d94c605e6cb8dc4d8542453b37b13ddba
parent28d3d6e8e95f450a6d2a03c74614bbaef50fb410 (diff)
Delete keystores from models
The Keystores are no longer needed in the tarballs, as they are supplied externally by the CSITs and Helm charts. Deleted those files. Also modified the junits to use utils-test to generate keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: Idd24b735a908476765d40bdcb5c741257edc7bb6 Signed-off-by: Jim Hahn <jrh3@att.com>
-rw-r--r--models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystorebin4431 -> 0 bytes
-rw-r--r--models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystorebin4431 -> 0 bytes
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystorebin4431 -> 0 bytes
-rw-r--r--models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystorebin4431 -> 0 bytes
-rw-r--r--models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java15
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/keystore-testbin3895 -> 0 bytes
6 files changed, 10 insertions, 5 deletions
diff --git a/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore b/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore
deleted file mode 100644
index b95e01031..000000000
--- a/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore b/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e01031..000000000
--- a/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore b/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e01031..000000000
--- a/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore b/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e01031..000000000
--- a/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
index bb4fa7c5a..e1517f3a8 100644
--- a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
+++ b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
@@ -31,6 +31,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -52,6 +53,7 @@ import org.onap.policy.common.endpoints.http.server.internal.JettyJerseyServer;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.network.NetworkUtil;
+import org.onap.policy.common.utils.security.SelfSignedKeyStore;
public class MainTest {
private static final String PARAMETER_FILE = "simParameters.json";
@@ -64,7 +66,7 @@ public class MainTest {
* Saves system properties.
*/
@BeforeClass
- public static void setUpBeforeClass() {
+ public static void setUpBeforeClass() throws IOException, InterruptedException {
savedValues = new HashMap<>();
for (String prop : List.of(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME,
@@ -75,11 +77,14 @@ public class MainTest {
savedValues.put(prop, System.getProperty(prop));
}
- System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PROPERTY_NAME, "src/test/resources/keystore-test");
- System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME, "kstest");
+ System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PROPERTY_NAME, new SelfSignedKeyStore().getKeystoreName());
+ System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME,
+ SelfSignedKeyStore.KEYSTORE_PASSWORD);
- System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PROPERTY_NAME, "src/test/resources/keystore-test");
- System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME, "kstest");
+ System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PROPERTY_NAME,
+ "src/main/resources/ssl/policy-truststore");
+ System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME,
+ SelfSignedKeyStore.KEYSTORE_PASSWORD);
}
/**
diff --git a/models-sim/policy-models-simulators/src/test/resources/keystore-test b/models-sim/policy-models-simulators/src/test/resources/keystore-test
deleted file mode 100644
index 5820e0f0c..000000000
--- a/models-sim/policy-models-simulators/src/test/resources/keystore-test
+++ /dev/null
Binary files differ