Merge "Resubmitting KeyProperty code change since tests failed"
authorSunder Tattavarada <statta@research.att.com>
Thu, 18 Jun 2020 19:43:40 +0000 (19:43 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 18 Jun 2020 19:43:40 +0000 (19:43 +0000)
1  2 
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java

@@@ -94,6 -94,8 +94,8 @@@ import org.onap.portalsdk.core.logging.
  import org.onap.portalsdk.core.onboarding.ueb.Helper;
  import org.onap.portalsdk.core.onboarding.ueb.TopicManager;
  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.onboarding.util.PortalApiConstants;
  import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
  import org.onap.portalsdk.core.service.DataAccessService;
@@@ -855,8 -857,7 +857,8 @@@ public class EPAppCommonServiceImpl imp
        public List<OnboardingApp> getEnabledNonOpenOnboardingApps() {
                @SuppressWarnings("unchecked")
                List<EPApp> apps = dataAccessService.getList(EPApp.class,
 -                              " where enabled = true and open = false and id!=" + ECOMP_APP_ID, null, null);
 +                              " where enabled = true and open = false and app_type!= 3 and id!=" + ECOMP_APP_ID, null, null);
 +      
                List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>();
                for (EPApp app : apps) {
                        OnboardingApp onboardingApp = new OnboardingApp();
                if (encryptedAppPwd != null && !encryptedAppPwd.isEmpty()) {
                        try {
                                result = CipherUtil.decryptPKC(encryptedAppPwd,
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                                               KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
                        } catch (Exception e) {
                                logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed for app " + app.getName(), e);
                        }
                if (decryptedAppPwd != null && !decryptedAppPwd.isEmpty()) {
                        try {
                                result = CipherUtil.encryptPKC(decryptedAppPwd,
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                                               KeyProperties.getProperty(KeyConstants.CIPHER_ENCRYPTION_KEY));
                        } catch (Exception e) {
                                logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword failed for app " + app.getName(), e);
                        }