summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-02-13 14:01:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-13 14:01:02 +0000
commit5b575deb4de10d9520ac7a117702e526e8872c95 (patch)
tree8b1045fb4c808e956bc117f415da054568c39625 /mso-api-handlers
parent1ffa4a397fb51acb09273e2b04b47281f7eb4840 (diff)
parentc8b4ff6dfea3e28ec4d505022453f0730f707a66 (diff)
Merge "use encrypted auth for dmaap"
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapPropertiesImpl.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisher.java8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml11
4 files changed, 14 insertions, 13 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapPropertiesImpl.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapPropertiesImpl.java
index 813299c370..8409d9c300 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapPropertiesImpl.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapPropertiesImpl.java
@@ -31,8 +31,8 @@ public class DmaapPropertiesImpl implements DmaapProperties {
private final Map<String, String> props = new HashMap<>();
private static final String[] propertyNames = {
- "mso.so.operational-environment.dmaap.username",
- "mso.so.operational-environment.dmaap.password",
+ "mso.so.operational-environment.dmaap.auth",
+ "mso.msoKey",
"mso.so.operational-environment.publisher.topic",
"mso.so.operational-environment.dmaap.host"
};
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisher.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisher.java
index 52c395e1d1..31bc6fcb4f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisher.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisher.java
@@ -37,15 +37,15 @@ public class OperationalEnvironmentPublisher extends DmaapPublisher {
}
@Override
- public String getUserName() {
+ public String getAuth() {
- return this.msoProperties.get("mso.so.operational-environment.dmaap.username");
+ return this.msoProperties.get("mso.so.operational-environment.dmaap.auth");
}
@Override
- public String getPassword() {
+ public String getKey() {
- return this.msoProperties.get("mso.so.operational-environment.dmaap.password");
+ return this.msoProperties.get("mso.msoKey");
}
@Override
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
index 59df7ae960..7329f313a5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
@@ -43,8 +43,8 @@ public class OperationalEnvironmentPublisherTest extends BaseTest {
@Test
public void getProperties() throws FileNotFoundException, IOException {
- assertEquals("testuser", publisher.getUserName());
- assertEquals("VjR5NDcxSzA=", publisher.getPassword());
+ assertEquals("B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0", publisher.getAuth());
+ assertEquals("07a7159d3bf51a0e53be7a8f89699be7", publisher.getKey());
assertEquals("test.operationalEnvironmentEvent", publisher.getTopic());
assertEquals("http://localhost:" + env.getProperty("wiremock.server.port"), publisher.getHost().get());
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
index 63eb0534ea..4826c8756f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
@@ -1,10 +1,10 @@
# will be used as entry in DB to say SITE OFF/ON for healthcheck
-server:
- port: 8080
- tomcat:
- max-threads: 50
-ssl-enable: false
+server:
+ port: 8080
+ tomcat:
+ max-threads: 50
+
mso:
health:
@@ -77,6 +77,7 @@ mso:
username: testuser
password: VjR5NDcxSzA=
host: http://localhost:${wiremock.server.port}
+ auth: B3705D6C2D521257CC2422ACCF03B001811ACC49F564DDB3A2CF2A1378B6D35A23CDCB696F2E1EDFBE6758DFE7C74B94F4A7DF84A0E2BB904935AC4D900D5597DF981ADE6CE1FF3AF993BED0
publisher:
topic: test.operationalEnvironmentEvent