Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 652BD17762 for ; Sun, 10 May 2015 13:40:50 +0000 (UTC) Received: (qmail 64616 invoked by uid 500); 10 May 2015 13:40:50 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 64566 invoked by uid 500); 10 May 2015 13:40:50 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 64557 invoked by uid 99); 10 May 2015 13:40:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 May 2015 13:40:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 34C26E0ACF; Sun, 10 May 2015 13:40:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smckinney@apache.org To: commits@directory.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: directory-fortress-core git commit: FC-96 - Externalize fortress web.war config - add log statements Date: Sun, 10 May 2015 13:40:50 +0000 (UTC) Repository: directory-fortress-core Updated Branches: refs/heads/master cc7b68ff5 -> 8da0a73b8 FC-96 - Externalize fortress web.war config - add log statements Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/8da0a73b Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/8da0a73b Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/8da0a73b Branch: refs/heads/master Commit: 8da0a73b81c0104c78a8538195e279368d0f9490 Parents: cc7b68f Author: Shawn McKinney Authored: Sun May 10 05:55:58 2015 -0500 Committer: Shawn McKinney Committed: Sun May 10 05:55:58 2015 -0500 ---------------------------------------------------------------------- .../directory/fortress/core/cfg/Config.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/8da0a73b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java index 55a298f..bfebb92 100755 --- a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java +++ b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java @@ -73,7 +73,7 @@ public class Config { try { - // Load the system config bootstrap xml file. + // Load the system config file. URL fUrl = Config.class.getClassLoader().getResource( propFile ); if ( fUrl == null ) @@ -390,12 +390,14 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_HOST, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.LDAP_HOST, szValue ); } // Check to see if the ldap port has been overriden by a system property: szValue = System.getProperty( EXT_LDAP_PORT ); if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_PORT, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.LDAP_PORT, szValue ); } // Check to see if the admin pool uid has been overriden by a system property: @@ -403,6 +405,8 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_ADMIN_POOL_UID, szValue ); + // never display ldap admin userid name to log: + LOG.info( "getExternalConfig override name [{}]", GlobalIds.LDAP_ADMIN_POOL_UID ); } // Check to see if the admin pool pw has been overriden by a system property: @@ -410,6 +414,8 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_ADMIN_POOL_PW, szValue ); + // never display password of any type to log: + LOG.info( "getExternalConfig override name [{}]", GlobalIds.LDAP_ADMIN_POOL_PW ); } // Check to see if the admin pool min connections has been overriden by a system property: @@ -417,6 +423,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MIN, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.LDAP_ADMIN_POOL_MIN, szValue ); } // Check to see if the admin pool max connections has been overriden by a system property: @@ -424,6 +431,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MAX, new Integer( szValue ) ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.LDAP_ADMIN_POOL_MAX, szValue ); } // Check to see if ssl enabled parameter has been overriden by a system property: @@ -431,6 +439,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.ENABLE_LDAP_SSL, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.ENABLE_LDAP_SSL, szValue ); } // Check to see if the ssl debug enabled parameter has been overriden by a system property: @@ -438,6 +447,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue ); } // Check to see if the trust store location has been overriden by a system property: @@ -445,6 +455,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.TRUST_STORE, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.TRUST_STORE, szValue ); } // Check to see if the trust store password has been overriden by a system property: @@ -452,6 +463,8 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.TRUST_STORE_PW, szValue ); + // never display password value to log: + LOG.info( "getExternalConfig override name [{}]", GlobalIds.TRUST_STORE_PW ); } // Check to see if the trust store set parameter has been overriden by a system property: @@ -459,6 +472,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.SET_TRUST_STORE_PROP, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.SET_TRUST_STORE_PROP, szValue ); } // Check to see if the config realm name has been overriden by a system property: @@ -466,6 +480,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.CONFIG_REALM, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.CONFIG_REALM, szValue ); } // Check to see if the ldap server type has been overriden by a system property: @@ -473,6 +488,7 @@ public class Config if( VUtil.isNotNullOrEmpty( szValue )) { config.setProperty( GlobalIds.SERVER_TYPE, szValue ); + LOG.info( "getExternalConfig override name [{}] value [{}]", GlobalIds.SERVER_TYPE, szValue ); } } } \ No newline at end of file