Graceful Fallback if no decryption
Issue-ID: PORTAL-894
Change-Id: I69c7b1d8c499af023200799104838bf5ab485608
Signed-off-by: statta <statta@research.att.com>
diff --git a/deliveries/.env b/deliveries/.env
index 4910d24..665f33b 100644
--- a/deliveries/.env
+++ b/deliveries/.env
@@ -6,8 +6,8 @@
# change dockerfile name to "skip"
PORTAL_DOCKERFILE=Dockerfile.portal
SDK_DOCKERFILE=skip
-DB_DOCKERFILE=skip
-WMS_DOCKERFILE=skip
+DB_DOCKERFILE=Dockerfile.mariadb
+WMS_DOCKERFILE=Dockerfile.wms
# These are FE only and BE only docker images. Change to Dockerfile.fe and Dockerfile.be to enable.
FE_DOCKERFILE=skip
BE_DOCKERFILE=skip
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 7c9aa76..db984a6 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 @@
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();
diff --git a/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql b/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql
index ef68741..6d6e243 100644
--- a/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql
+++ b/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql
@@ -15,6 +15,11 @@
SET function_cd = 'menu_acc_admin'
WHERE label = 'Users';
+--- update fn_menu for Onboarding Page
+UPDATE fn_menu
+SET function_cd = 'menu_acc_admin'
+WHERE label = 'Application Onboarding';
+
-- fn_user
Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS,is_system_user,language_id) values (1,NULL,NULL,'Demo',NULL,'User',NULL,NULL,NULL,'demo@openecomp.org',NULL,NULL,NULL,'demo',NULL,'demo','4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,'N',1);