aboutsummaryrefslogtreecommitdiffstats
path: root/PolicyEngineAPI/src/main/java
diff options
context:
space:
mode:
authorpa834y <pa834y@att.com>2019-03-26 14:29:38 -0400
committerpa834y <pa834y@att.com>2019-03-31 19:59:20 -0400
commitc1b69dfb1297365d35f2ada8690f13f787d38b4f (patch)
treef7c9780ad4cd84bb24f5d527feac83cb81f50319 /PolicyEngineAPI/src/main/java
parentc683a67fbf4a50e68bf8736517865b43db75ed4b (diff)
Enhancement to use the common CryptoUtils
Change-Id: I06718526382b424eab991f39a7dac1b5cf4f1b74 Issue-ID: POLICY-1422 Signed-off-by: pa834y <pa834y@att.com>
Diffstat (limited to 'PolicyEngineAPI/src/main/java')
-rw-r--r--PolicyEngineAPI/src/main/java/org/onap/policy/std/StdPolicyEngine.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/std/StdPolicyEngine.java b/PolicyEngineAPI/src/main/java/org/onap/policy/std/StdPolicyEngine.java
index ab356ec17..a4c1e9852 100644
--- a/PolicyEngineAPI/src/main/java/org/onap/policy/std/StdPolicyEngine.java
+++ b/PolicyEngineAPI/src/main/java/org/onap/policy/std/StdPolicyEngine.java
@@ -125,6 +125,7 @@ import org.onap.policy.models.APIDictionaryResponse;
import org.onap.policy.models.APIPolicyConfigResponse;
import org.onap.policy.std.utils.PolicyCommonConfigConstants;
import org.onap.policy.utils.AAFEnvironment;
+import org.onap.policy.utils.PeCryptoUtils;
import org.onap.policy.utils.PolicyUtils;
import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.springframework.core.io.FileSystemResource;
@@ -989,7 +990,7 @@ public class StdPolicyEngine {
}
private String getClientKeyFromProperties(final Properties prop) {
- final String clientKeyValue = prop.getProperty(CLIENT_KEY_PROP_NAME);
+ final String clientKeyValue = PeCryptoUtils.decrypt(prop.getProperty(CLIENT_KEY_PROP_NAME));
try {
return PolicyUtils.decode(clientKeyValue);
} catch (UnsupportedEncodingException | IllegalArgumentException e) {
@@ -1095,7 +1096,7 @@ public class StdPolicyEngine {
pdps.add(pdpValues.get(0));
// 1:2 will be UserID:Password
final String userID = pdpValues.get(1);
- final String userPas = pdpValues.get(2);
+ final String userPas = PeCryptoUtils.decrypt(pdpValues.get(2));
final Base64.Encoder encoder = Base64.getEncoder();
encoding.add(encoder.encodeToString((userID + ":" + userPas).getBytes(StandardCharsets.UTF_8)));
} else {