aboutsummaryrefslogtreecommitdiffstats
path: root/PolicyEngineAPI/src
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-04-03 02:01:34 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-03 02:01:34 +0000
commitd5f95d08ffd3f2e16b67aadae7007c7a51dfae19 (patch)
treea9388d004af2bf679b66524edbc53571ce06d8e1 /PolicyEngineAPI/src
parent338796c4d56d2e95aa2903d80589b3b35b5a3dd2 (diff)
parentc1b69dfb1297365d35f2ada8690f13f787d38b4f (diff)
Merge "Enhancement to use the common CryptoUtils"
Diffstat (limited to 'PolicyEngineAPI/src')
-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 {