From c1b69dfb1297365d35f2ada8690f13f787d38b4f Mon Sep 17 00:00:00 2001 From: pa834y Date: Tue, 26 Mar 2019 14:29:38 -0400 Subject: Enhancement to use the common CryptoUtils Change-Id: I06718526382b424eab991f39a7dac1b5cf4f1b74 Issue-ID: POLICY-1422 Signed-off-by: pa834y --- .../src/main/java/org/onap/policy/std/StdPolicyEngine.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'PolicyEngineAPI') 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 { -- cgit 1.2.3-korg