summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src/main
diff options
context:
space:
mode:
author“Kruthi <krutbhat@att.com>2020-06-04 19:34:07 +0530
committer“Kruthi <krutbhat@att.com>2020-06-10 01:34:23 +0530
commit2bd47b537ff4fa78ae8f38758900022df6344cdb (patch)
tree793ee95cdaa550eb6fab92e5b52b0ac01170a702 /ecomp-portal-BE-os/src/main
parent30fde7dffdeb16add93ff772c8e2e212cb6850e8 (diff)
Resubmitting KeyProperty code change since tests failed
Change-Id: I14c0f9b59229e32de45b1652e64c01dd6c1d39e3 Issue-ID: PORTAL-914 Signed-off-by: krutbhat@att.com
Diffstat (limited to 'ecomp-portal-BE-os/src/main')
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java9
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java7
2 files changed, 8 insertions, 8 deletions
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
index 8b92b58c..59c4f7a4 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
@@ -38,13 +38,13 @@
package org.onap.portalapp.service;
import java.util.List;
-
import org.onap.portalapp.portal.domain.EPApp;
import org.onap.portalapp.service.RemoteWebServiceCallService;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.service.WebServiceCallServiceImpl;
-import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -68,11 +68,10 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i
logger.warn(EELFLoggerDelegate.errorLogger, "Failed to find application with UEB key " + requestUebKey);
return false;
}
-
+
String encryptedPwdDB = appRecord.getAppBasicAuthPassword();
String appUserName = appRecord.getAppBasicAuthUsername();
- String decryptedPwd = CipherUtil.decryptPKC(encryptedPwdDB,
- secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey);
+ String decryptedPwd = CipherUtil.decryptPKC(encryptedPwdDB,secretKey == null ? KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY) : secretKey);
if (decryptedPwd.equals(requestPassword) && appUserName.equals(requestAppName))
return true;
else
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java
index 1a347e07..05765021 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java
@@ -43,7 +43,8 @@ import javax.servlet.http.HttpServletResponse;
import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
-import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
public class SessionCookieUtil extends CommonSessionCookieUtil{
@@ -72,7 +73,7 @@ public class SessionCookieUtil extends CommonSessionCookieUtil{
HttpServletResponse response,String userId) throws Exception {
logger.info("************** session cookie util set up UserId cookie begins");
userId = CipherUtil.encrypt(userId,
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
Cookie cookie1 = new Cookie(USER_ID, userId);
cookie1.setSecure(true);
cookie1.setMaxAge(cookieMaxAge);
@@ -93,7 +94,7 @@ public class SessionCookieUtil extends CommonSessionCookieUtil{
userIdcookie = cookie;
if(userIdcookie!=null){
userId = CipherUtil.decrypt(userIdcookie.getValue(),
- SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
}
logger.info("************** session cookie util set up EP cookie completed");