diff --git a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
index 2060172..7f4f628 100644
--- a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
+++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
@@ -2,7 +2,7 @@
  * ================================================================================
  * ONAP Portal SDK
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,11 +17,12 @@
  * limitations under the License.
  * ================================================================================
  */
+
 package org.onap.portalapp.conf;
 
 import java.util.ArrayList;
 import java.util.List;
-
+import org.onap.policy.utils.PeCryptoUtils;
 import org.onap.portalapp.login.LoginStrategyImpl;
 import org.onap.portalapp.scheduler.RegistryAdapter;
 import org.onap.portalsdk.core.auth.LoginStrategy;
@@ -48,125 +49,125 @@
 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 
 /**
- * ONAP Portal SDK sample application. Extends core AppConfig class to
- * reuse interceptors, view resolvers and other features defined there.
+ * ONAP Portal SDK sample application. Extends core AppConfig class to reuse interceptors, view resolvers and other
+ * features defined there.
  */
 @Configuration
 @EnableWebMvc
 @ComponentScan(basePackages = "org.onap")
-@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true)
+@PropertySource(value = {"${container.classpath:}/WEB-INF/conf/app/test.properties"}, ignoreResourceNotFound = true)
 @Profile("src")
 @EnableAsync
 @EnableScheduling
 public class ExternalAppConfig extends AppConfig implements Configurable {
 
-	EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class);
-	
-	private RegistryAdapter schedulerRegistryAdapter;
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class);
 
-	@Configuration
-	@Import(SystemProperties.class)
-	static class InnerConfiguration {
-	}
+    private RegistryAdapter schedulerRegistryAdapter;
 
-	/**
-	 * @see org.onap.portalsdk.core.conf.AppConfig#viewResolver()
-	 */
-	@Override
-	public ViewResolver viewResolver() {
-		return super.viewResolver();
-	}
+    @Configuration
+    @Import(SystemProperties.class)
+    static class InnerConfiguration {
+    }
 
-	/**
-	 * @see org.onap.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry)
-	 * 
-	 * @param registry
-	 */
-	@Override
-	public void addResourceHandlers(ResourceHandlerRegistry registry) {
-		super.addResourceHandlers(registry);
-	}
+    /**
+     * @see org.onap.portalsdk.core.conf.AppConfig#viewResolver()
+     */
+    @Override
+    public ViewResolver viewResolver() {
+        return super.viewResolver();
+    }
 
-	/**
-	 * @see org.onap.portalsdk.core.conf.AppConfig#dataAccessService()
-	 */
-	@Override
-	public DataAccessService dataAccessService() {
-		// Echo the JDBC URL to assist developers when starting the app.
-		System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is "
-				+ SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL));
-		return super.dataAccessService();
-	}
+    /**
+     * @see org.onap.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry)
+     *
+     * @param registry
+     */
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        super.addResourceHandlers(registry);
+    }
 
-	/**
-	 * Creates a new list with a single entry that is the external app
-	 * definitions.xml path.
-	 * 
-	 * @return List of String, size 1
-	 */
-	@Override
-	public List<String> addTileDefinitions() {
-		List<String> definitions = new ArrayList<>();
-		definitions.add("/WEB-INF/defs/definitions.xml");
-		return definitions;
-	}
+    /**
+     * @see org.onap.portalsdk.core.conf.AppConfig#dataAccessService()
+     */
+    @Override
+    public DataAccessService dataAccessService() {
+        // Echo the JDBC URL to assist developers when starting the app.
+        System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is "
+                + SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL));
+        System.setProperty(SystemProperties.DB_PASSWORD,
+                PeCryptoUtils.decrypt(SystemProperties.getProperty(SystemProperties.DB_PASSWORD)));
+        return super.dataAccessService();
+    }
 
-	/**
-	 * Adds request interceptors to the specified registry by calling
-	 * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes
-	 * certain paths from the session timeout interceptor.
-	 */
-	@Override
-	public void addInterceptors(InterceptorRegistry registry) {
-		super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm",
-				"/api*", "/single_signon.htm", "/single_signon");
-		super.addInterceptors(registry);
-	}
+    /**
+     * Creates a new list with a single entry that is the external app definitions.xml path.
+     *
+     * @return List of String, size 1
+     */
+    @Override
+    public List<String> addTileDefinitions() {
+        List<String> definitions = new ArrayList<>();
+        definitions.add("/WEB-INF/defs/definitions.xml");
+        return definitions;
+    }
 
-	/**
-	 * Creates and returns a new instance of a {@link CacheManager} class.
-	 * 
-	 * @return New instance of {@link CacheManager}
-	 */
-	@Bean
-	public AbstractCacheManager cacheManager() {
-		return new CacheManager();
-	}
+    /**
+     * Adds request interceptors to the specified registry by calling
+     * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes certain paths from the session timeout
+     * interceptor.
+     */
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm",
+                "/api*", "/single_signon.htm", "/single_signon");
+        super.addInterceptors(registry);
+    }
 
-	/**
-	 * Creates and returns a new instance of a {@link SchedulerFactoryBean} and
-	 * populates it with triggers.
-	 * 
-	 * @return New instance of {@link SchedulerFactoryBean}
-	 * @throws Exception
-	 */
-	// @Bean // ANNOTATION COMMENTED OUT
-	// APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION
-	public SchedulerFactoryBean schedulerFactoryBean(){
-		SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
-		scheduler.setTriggers(schedulerRegistryAdapter.getTriggers());
-		scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties"));
-		try {
-			scheduler.setDataSource(dataSource());
-		} catch (Exception e) {
-			logger.error("Exception occured While Setting DataSource for schedulerfactorybean"+e);
-			return null;
-		}
-		return scheduler;
-	}
+    /**
+     * Creates and returns a new instance of a {@link CacheManager} class.
+     *
+     * @return New instance of {@link CacheManager}
+     */
+    @Bean
+    public AbstractCacheManager cacheManager() {
+        return new CacheManager();
+    }
 
-	/**
-	 * Sets the scheduler registry adapter.
-	 * 
-	 * @param schedulerRegistryAdapter
-	 */
-	@Autowired
-	public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) {
-		this.schedulerRegistryAdapter = schedulerRegistryAdapter;
-	}
+    /**
+     * Creates and returns a new instance of a {@link SchedulerFactoryBean} and populates it with triggers.
+     *
+     * @return New instance of {@link SchedulerFactoryBean}
+     * @throws Exception
+     */
+    // @Bean // ANNOTATION COMMENTED OUT
+    // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION
+    public SchedulerFactoryBean schedulerFactoryBean() {
+        SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
+        scheduler.setTriggers(schedulerRegistryAdapter.getTriggers());
+        scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties"));
+        try {
+            scheduler.setDataSource(dataSource());
+        } catch (Exception e) {
+            logger.error("Exception occured While Setting DataSource for schedulerfactorybean" + e);
+            return null;
+        }
+        return scheduler;
+    }
 
-	@Bean
-	public LoginStrategy loginStrategy() {
-		return new LoginStrategyImpl();
-	}
+    /**
+     * Sets the scheduler registry adapter.
+     *
+     * @param schedulerRegistryAdapter
+     */
+    @Autowired
+    public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) {
+        this.schedulerRegistryAdapter = schedulerRegistryAdapter;
+    }
+
+    @Bean
+    public LoginStrategy loginStrategy() {
+        return new LoginStrategyImpl();
+    }
 }
diff --git a/ONAP-SDK-APP/xacml.admin.properties b/ONAP-SDK-APP/xacml.admin.properties
index 8e68528..0a7f388 100644
--- a/ONAP-SDK-APP/xacml.admin.properties
+++ b/ONAP-SDK-APP/xacml.admin.properties
@@ -2,7 +2,7 @@
 # ============LICENSE_START=======================================================
 # ONAP Policy Engine
 # ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -205,3 +205,6 @@
 
 #Size limit (in bytes) for file uploads
 file.size.limit=30000000
+
+# AES key for password encryption in config files
+#org.onap.policy.encryption.aes.key=12345678901234567890123456789012
\ No newline at end of file
