aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-09-16 10:44:03 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2020-09-16 14:20:03 -0400
commitff2317db56215b6b3f4d69a975a3c37823e9c391 (patch)
treeeed8875f52f273a1a46ed9ddd1f75af1c083f56d /main/src
parent8471973b523a501ebf4c175d17b3bfcc5bad3db6 (diff)
Remove base64 encoding of password from api
Remove base64 encoding of db password from policy-api component. Issue-ID: POLICY-2550 Change-Id: If395896f88f56f0284187f23d90ec5e0252ea17f Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'main/src')
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java3
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java3
-rw-r--r--main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java4
3 files changed, 4 insertions, 6 deletions
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
index 78a52872..ca0b0f6a 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/TestApiRestServer.java
@@ -35,7 +35,6 @@ import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.security.SecureRandom;
-import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -191,7 +190,7 @@ public class TestApiRestServer {
providerParams.setDatabaseDriver("org.h2.Driver");
providerParams.setDatabaseUrl("jdbc:h2:mem:testdb");
providerParams.setDatabaseUser("policy");
- providerParams.setDatabasePassword(Base64.getEncoder().encodeToString("P01icY".getBytes()));
+ providerParams.setDatabasePassword("P01icY");
providerParams.setPersistenceUnit("ToscaConceptTest");
apiParamGroup = new ApiParameterGroup("ApiGroup", null, providerParams, Collections.emptyList(),
Collections.emptyList());
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
index 6e742c9b..8d991792 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyProvider.java
@@ -33,7 +33,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.ArrayList;
-import java.util.Base64;
import java.util.Collections;
import java.util.List;
import org.junit.After;
@@ -104,7 +103,7 @@ public class TestPolicyProvider {
providerParams.setDatabaseDriver("org.h2.Driver");
providerParams.setDatabaseUrl("jdbc:h2:mem:testdb");
providerParams.setDatabaseUser("policy");
- providerParams.setDatabasePassword(Base64.getEncoder().encodeToString("P01icY".getBytes()));
+ providerParams.setDatabasePassword("P01icY");
providerParams.setPersistenceUnit("ToscaConceptTest");
apiParamGroup =
new ApiParameterGroup("ApiGroup", null, providerParams, Collections.emptyList(), Collections.emptyList());
diff --git a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
index 17d2cb94..5c7c25a9 100644
--- a/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
+++ b/main/src/test/java/org/onap/policy/api/main/rest/provider/TestPolicyTypeProvider.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -28,7 +29,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import java.util.Base64;
import java.util.Collections;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -88,7 +88,7 @@ public class TestPolicyTypeProvider {
providerParams.setDatabaseDriver("org.h2.Driver");
providerParams.setDatabaseUrl("jdbc:h2:mem:testdb");
providerParams.setDatabaseUser("policy");
- providerParams.setDatabasePassword(Base64.getEncoder().encodeToString("P01icY".getBytes()));
+ providerParams.setDatabasePassword("P01icY");
providerParams.setPersistenceUnit("ToscaConceptTest");
apiParamGroup = new ApiParameterGroup("ApiGroup", null, providerParams,
Collections.emptyList(), Collections.emptyList());