summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstatta <statta@research.att.com>2020-05-18 19:11:11 -0400
committerstatta <statta@research.att.com>2020-05-19 09:53:15 -0400
commit8e3d0ff5ce27cd87a257a2a95430add3dd3596ce (patch)
treeb043f6e3220801975629cb6853074450c26ee0b7
parent1b5673abbcfe8ef01c16c67ea2e15affc071d070 (diff)
Graceful Fallback if no decryption
Issue-ID: PORTAL-894 Change-Id: I69c7b1d8c499af023200799104838bf5ab485608 Signed-off-by: statta <statta@research.att.com>
-rw-r--r--deliveries/.env4
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/EcompPortalUtils.java8
-rw-r--r--ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql5
3 files changed, 14 insertions, 3 deletions
diff --git a/deliveries/.env b/deliveries/.env
index 4910d24e..665f33b5 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 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();
diff --git a/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql b/ecomp-portal-DB-os/PortalDMLMySql_3_2_OS.sql
index ef687418..6d6e2435 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 @@ UPDATE fn_menu
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);