diff options
author | statta <statta@research.att.com> | 2020-05-18 19:11:11 -0400 |
---|---|---|
committer | Sunder Tattavarada <statta@research.att.com> | 2020-09-14 21:51:33 +0000 |
commit | 0d2d51e2fbcb7b90b62be1ffa0c462a78b1fc166 (patch) | |
tree | 3ec1cf011cf610ca7a17f5e58d7bfb8ad5706e56 /ecomp-portal-BE-common/src/main | |
parent | 6ef88aa2c574f12d6a36b16e1b5e5562261b6cab (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/src/main')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java | 8 |
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 3fc8c393..913f8b5f 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 @@ -423,7 +423,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(); |