aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-prov/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-prov/src/test')
-rw-r--r--datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtilsTest.java64
-rw-r--r--datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.cred.props17
-rw-r--r--datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.keyfile27
-rw-r--r--datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.props21
-rwxr-xr-xdatarouter-prov/src/test/resources/h2Database.properties9
5 files changed, 130 insertions, 8 deletions
diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtilsTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtilsTest.java
new file mode 100644
index 00000000..09d4a819
--- /dev/null
+++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/utils/AafPropsUtilsTest.java
@@ -0,0 +1,64 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.dmaap.datarouter.provisioning.utils;
+
+import java.io.File;
+import java.io.IOException;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AafPropsUtilsTest {
+
+ private static AafPropsUtils aafPropsUtils;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ AafPropsUtils.init(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
+ aafPropsUtils = AafPropsUtils.getInstance();
+ }
+
+ @Test
+ public void Assert_AaafPropsUtils_Decrypt_KeyStorePass() {
+ Assert.assertEquals("m9l&3F+{7E&xE&v7xugWAAy0", aafPropsUtils.getKeystorePassProperty());
+ }
+
+ @Test
+ public void Assert_AaafPropsUtils_Decrypt_TruststorePass() {
+ Assert.assertEquals("@y,%VD).h8k1z+j1Nhar?.Af", aafPropsUtils.getTruststorePassProperty());
+ }
+
+ @Test
+ public void Assert_AaafPropsUtils_Get_KeyStorePathProp() {
+ Assert.assertEquals("src/test/resources/aaf/org.onap.dmaap-dr.p12", aafPropsUtils.getKeystorePathProperty());
+ }
+
+ @Test
+ public void Assert_AaafPropsUtils_Get_TrustStorePathProp() {
+ Assert.assertEquals("src/test/resources/aaf/org.onap.dmaap-dr.trust.jks", aafPropsUtils.getTruststorePathProperty());
+ }
+
+ @Test
+ public void Assert_AaafPropsUtils_Get_PropAccessObj() {
+ Assert.assertNotNull(aafPropsUtils.getPropAccess());
+ }
+
+}
diff --git a/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.cred.props b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.cred.props
new file mode 100644
index 00000000..b06b283d
--- /dev/null
+++ b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.cred.props
@@ -0,0 +1,17 @@
+############################################################
+# Properties Generated by AT&T Certificate Manager
+# by root
+# on 2019-10-02T14:52:33.828+0000
+# @copyright 2019, AT&T
+############################################################
+Challenge=enc:D1K4bZlKwIDTY6RYX4V1nCgj1mJruMZ4qDaO80iSwm20J8zpUa0qEzOwM-aFjKCe
+cadi_alias=dmaap-dr-prov@dmaap-dr.onap.org
+cadi_key_password=enc:d80GqeXpOhPOmZAn76t5xgKlq54yAPYQw-OoVqFwcXkCwd58zwHfzZQ3Rgitj30-
+cadi_keyfile=src/test/resources/aaf/org.onap.dmaap-dr.keyfile
+cadi_keystore=src/test/resources/aaf/org.onap.dmaap-dr.p12
+cadi_keystore_password=enc:xcPI_-oWnLvQ8SFDyafZG7ii7yZdcgaUwVQFp7x9mkHTnyODGDUaPHb5svAE2euP
+cadi_keystore_password_jks=enc:EO1-8pk7wWbiGMriX0aAOX0zxoQ9-ow7LRqOlKgMYVlYGs59yappGzKd0FxkcqM0
+cadi_keystore_password_p12=enc:xcPI_-oWnLvQ8SFDyafZG7ii7yZdcgaUwVQFp7x9mkHTnyODGDUaPHb5svAE2euP
+cadi_truststore=src/test/resources/aaf/org.onap.dmaap-dr.trust.jks
+cadi_truststore_password=enc:XawqMezvaPspcdG9J9tdYx-pEtIu4VaY_QG3ZyLtyWg_gsxvrfg2tInmj95fAkrj
+cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
diff --git a/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.keyfile b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.keyfile
new file mode 100644
index 00000000..c5d9d876
--- /dev/null
+++ b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.keyfile
@@ -0,0 +1,27 @@
+0wlntBQae2B_RCqlj0vFvThyNkGfB47eGQ-JDX2LvNaIWjhg6P114TZ1dVwoqIUO_GvGdZfXvTNe
+9W-86XLVDuaom2Ep0bWGpweiIfnRuXuMWwZy7vNRS_jj1GQ8Y30_SrXft3YVHR_r1AC3XTOk1LSS
+Yeo356B7juJuOnkRpZwyZflEZM_U72EymWOd5JKb5ugrtdRBCXzh_pmQ24kxepi8XMFoaViI2ccL
+KbL3fjSsberNKsSYqeGtXmcElEvDUfNam_ylxTStu-BbZRjelr5zY-rQnvXl01Tapkdl_ejIo8fT
+FcdZTSMH2eic32WGO5QJzIhaEXoJu3oNzK0x-rfyURtE15tJAn6FiFvtWFb8nSnWH8TBUYnTLX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mgMoe
+tclMBS4AaWP2ac5OPwxP3ldnZcMuHLSVhhxyNLk9nhn8BB8_vtNEZUopU2tb7OKHKgdX47qsP5aa
+ueb1_T_0ojj9grruiWO_C0_DaKlpmTh7xKzhCOt3w4IOTezN4If9oJ0AB-3vL7XHb6qs3OZw9Iop
+MB1ztIrv1QAE87ZfdyZzZVuNgmosZtNJa2IOjRe83ipr5-DolUgR5OYFNVNg-fFO59SwILdM38U9
+Nq4B_rzR9R7dEdOMp-rs4YBJxqLlL6zZE1tdEP6yba09Dx1fqeh1oXHlWjGSX5JZMnjwrgai_z3q
+2h2SeLOUlbyi-i-rMlrqbzro4-kFONIqZdAAsocjGfkoXBtGNJgkmGhHq2TMI2SCXDYqCKtFYOQa
+2XSGyJ1QsvOGcHlJhGK-hwFj_JcbnxDx6b_24RrEzWSTXlW0R03JAl9fM24Nk9Y1v5iO6fPfWXU0
+J5BniYOohauEGbogRLwupN9-Deh5JzZlaFCFEDup32oxm4RC6tVk_Ik6jA7C3wVU5pfu8t2lgG6M
+PhH0efEjQWNbX5Uv1pbTY8W5bIJ3BSYI4o-cRabaA8UbuCViJ8uvHvFIXew6O3pWDB7vcGKA \ No newline at end of file
diff --git a/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.props b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.props
new file mode 100644
index 00000000..4e15dc32
--- /dev/null
+++ b/datarouter-prov/src/test/resources/aaf/org.onap.dmaap-dr.props
@@ -0,0 +1,21 @@
+############################################################
+# Properties Generated by AT&T Certificate Manager
+# by root
+# on 2019-10-02T14:52:10.008+0000
+# @copyright 2019, AT&T
+############################################################
+aaf_env=DEV
+aaf_id=dmaap-dr-prov@dmaap-dr.onap.org
+aaf_locate_url=https://aaf-locate:8095
+aaf_locator_container=docker
+aaf_locator_container_ns=onap
+aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.introspect:2.1/introspect
+aaf_oauth2_token_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.token:2.1/token
+aaf_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.service:2.1
+aaf_url_cm=https://AAF_LOCATE_URL/%CNS.%AAF_NS.cm:2.1
+aaf_url_fs=https://AAF_LOCATE_URL/%CNS.%AAF_NS.fs:2.1
+aaf_url_gui=https://AAF_LOCATE_URL/%CNS.%AAF_NS.gui:2.1
+aaf_url_hello=https://aaf-locate:8095/locate/onap.org.osaaf.aaf.hello:2.1
+aaf_url_oauth=https://AAF_LOCATE_URL/%CNS.%AAF_NS.oauth:2.1
+cadi_prop_files=src/test/resources/aaf/org.onap.dmaap-dr.location.props:src/test/resources/aaf/org.onap.dmaap-dr.cred.props
+cadi_protocols=TLSv1.1,TLSv1.2
diff --git a/datarouter-prov/src/test/resources/h2Database.properties b/datarouter-prov/src/test/resources/h2Database.properties
index 991fadc5..a9c831a3 100755
--- a/datarouter-prov/src/test/resources/h2Database.properties
+++ b/datarouter-prov/src/test/resources/h2Database.properties
@@ -30,11 +30,4 @@ org.onap.dmaap.datarouter.provserver.accesslog.dir = unit-test-logs
org.onap.dmaap.datarouter.provserver.spooldir = src/test/resources
org.onap.dmaap.datarouter.provserver.dbscripts = src/test/resources
org.onap.dmaap.datarouter.provserver.localhost = 127.0.0.1
-org.onap.dmaap.datarouter.provserver.passwordencryption = PasswordEncryptionKey#@$%^&1234#
-
-org.onap.dmaap.datarouter.provserver.keystore.type = jks
-org.onap.dmaap.datarouter.provserver.keymanager.password = FZNkU,B%NJzcT1v7;^v]M#ZX
-org.onap.dmaap.datarouter.provserver.keystore.path = aaf_certs/org.onap.dmaap-dr.jks
-org.onap.dmaap.datarouter.provserver.keystore.password = FZNkU,B%NJzcT1v7;^v]M#ZX
-org.onap.dmaap.datarouter.provserver.truststore.path = aaf_certs/org.onap.dmaap-dr.trust.jks
-org.onap.dmaap.datarouter.provserver.truststore.password = +mzf@J.D^;3!![*Xr.z$c#?b \ No newline at end of file
+org.onap.dmaap.datarouter.provserver.passwordencryption = PasswordEncryptionKey#@$%^&1234# \ No newline at end of file