summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common
diff options
context:
space:
mode:
authorstatta <statta@research.att.com>2020-05-18 19:11:11 -0400
committerSunder Tattavarada <statta@research.att.com>2020-05-20 04:18:34 +0000
commit9f1d16678d03d5b59af2f790c06db5a703e8f5cb (patch)
treeb043f6e3220801975629cb6853074450c26ee0b7 /ecomp-portal-BE-common
parent1b5673abbcfe8ef01c16c67ea2e15affc071d070 (diff)
Graceful Fallback if no decryption
Issue-ID: PORTAL-894 Change-Id: I69c7b1d8c499af023200799104838bf5ab485608 Signed-off-by: statta <statta@research.att.com> (cherry picked from commit 8e3d0ff5ce27cd87a257a2a95430add3dd3596ce)
Diffstat (limited to 'ecomp-portal-BE-common')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java
index 7c9aa76b..db984a67 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java
@@ -420,7 +420,13 @@ public class EcompPortalUtils {
decryptedPass = SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_AUTH_PASSWORD);
userName = SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_AUTH_USER_NAME);
}
- String decPass = decrypted(decryptedPass);
+ String decPass;
+ try {
+ decPass = decrypted(decryptedPass);
+ } catch (Exception e) {
+ logger.warn(EELFLoggerDelegate.errorLogger, "decryptedPassword failed using non decrypted pwd from the Properties file", e);
+ decPass = decryptedPass;
+ }
String usernamePass = userName + ":" + decPass;
String encToBase64 = String.valueOf((DatatypeConverter.printBase64Binary(usernamePass.getBytes())));
HttpHeaders headers = new HttpHeaders();