You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2014/09/22 09:19:41 UTC

svn commit: r1626677 - in /ofbiz/trunk/framework/catalina: ofbiz-component.xml src/org/ofbiz/catalina/container/CatalinaContainer.java

Author: jacopoc
Date: Mon Sep 22 07:19:41 2014
New Revision: 1626677

URL: http://svn.apache.org/r1626677
Log:
Explicitly setting the keyPass and keyAlias to the Tomcat connector: this is similar to keystorePass but is more flexible when the keystore contains multiple values.
In the log info, don't print the content of Connector parameters that may contain a password. 

Modified:
    ofbiz/trunk/framework/catalina/ofbiz-component.xml
    ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Modified: ofbiz/trunk/framework/catalina/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/ofbiz-component.xml?rev=1626677&r1=1626676&r2=1626677&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/ofbiz-component.xml (original)
+++ ofbiz/trunk/framework/catalina/ofbiz-component.xml Mon Sep 22 07:19:41 2014
@@ -144,8 +144,9 @@ under the License.
             <property name="clientAuth" value="false"/>
             -->
             <property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>
-            <property name="keystorePass" value="changeit"/>
             <property name="keystoreType" value="JKS"/>
+            <property name="keyAlias" value="ofbiz"/>
+            <property name="keyPass" value="changeit"/>
             <property name="sslProtocol" value="TLS"/>
             <property name="ciphers" value=""/>
         </property>

Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1626677&r1=1626676&r2=1626677&view=diff
==============================================================================
--- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original)
+++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Mon Sep 22 07:19:41 2014
@@ -460,7 +460,12 @@ public class CatalinaContainer implement
                     continue;
                 }
                 if (IntrospectionUtils.setProperty(connector, prop.name, prop.value)) {
-                    Debug.logInfo("Tomcat " + connector + ": set " + prop.name + "=" + prop.value, module);
+                    if (prop.name.indexOf("Pass") != -1) {
+                        // this property may be a password, do not include its value in the logs
+                        Debug.logInfo("Tomcat " + connector + ": set " + prop.name, module);
+                    } else {
+                        Debug.logInfo("Tomcat " + connector + ": set " + prop.name + "=" + prop.value, module);
+                    }
                 } else {
                     Debug.logWarning("Tomcat " + connector + ": ignored parameter " + prop.name, module);
                 }