You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ge...@apache.org on 2009/09/11 18:07:32 UTC
svn commit: r813898 - in /geronimo/server/trunk/plugins:
console/console-base-portlets/src/main/i18n-resources/
console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/
tomcat/geronimo-tomcat6/src/main/java/org/apache/geronim...
Author: genspring
Date: Fri Sep 11 16:07:32 2009
New Revision: 813898
URL: http://svn.apache.org/viewvc?rev=813898&view=rev
Log:
GERONIMO-4851 Server will get into abnormal status when trying to edit/delete Tomcat Connector HTTPS BIO network listener
Modified:
geronimo/server/trunk/plugins/console/console-base-portlets/src/main/i18n-resources/consolebase_en.properties
geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatServerConfigManager.java
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java
geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/resources/org/apache/geronimo/tomcat/messages.properties
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/i18n-resources/consolebase_en.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/i18n-resources/consolebase_en.properties?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/i18n-resources/consolebase_en.properties (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/i18n-resources/consolebase_en.properties Fri Sep 11 16:07:32 2009
@@ -634,10 +634,13 @@
webmanager.connector.editConnector.TomcatManagerImpl.153 = The priority of the request processing threads within the JVM.
webmanager.connector.editConnector.TomcatManagerImpl.155 = The certificate encoding algorithm to be used.
webmanager.connector.editConnector.TomcatManagerImpl.157 = Set to true if you want the SSL stack to require a valid certificate chain from the client before accepting a connection. Set to want if you want the SSL stack to request a client Certificate, but not fail if one isn't presented. A false value (which is the default) will not require a certificate chain unless the client requests a resource protected by a security constraint that uses CLIENT-CERT authentication.
-webmanager.connector.editConnector.TomcatManagerImpl.160 = The file that holds the keystore (relative to the Geronimo install dir)
+webmanager.connector.editConnector.TomcatManagerImpl.160 = The file that holds the keystore (relative to Geronimo_Home/var/catalina dir)
webmanager.connector.editConnector.TomcatManagerImpl.162 = Set the password used to access the keystore file. This is also the password used to access the server private key within the keystore (so the two passwords must be set to be the same on the keystore).
webmanager.connector.editConnector.TomcatManagerImpl.165 = Set the keystore type. There is normally no reason not to use the default (JKS).
+webmanager.connector.editConnector.TomcatManagerImpl.167 = Use this attribute to enable SSL traffic on a connector.
webmanager.connector.editConnector.TomcatManagerImpl.168 = Set the HTTPS protocol. This should normally be set to TLS, though some (IBM) JVMs don't work properly with popular browsers unless it is changed to SSL.
+webmanager.connector.editConnector.TomcatManagerImpl.169 = When turning SSLEnabled value to true you will want to set the scheme attribute as well to pass the correct request.getScheme() to the servlets
+webmanager.connector.editConnector.TomcatManagerImpl.170 = When turning SSLEnabled value to true you will want to set the secure attribute as well to pass the correct request.isSecure() values to the servlets
webmanager.connector.editConnector.TomcatManagerImpl.17 = Name of the file that contains the server certificate. The format is PEM-encoded.
webmanager.connector.editConnector.TomcatManagerImpl.171 = A comma separated list of the encryption ciphers that may be used. If not specified, then any available cipher may be used.
webmanager.connector.editConnector.TomcatManagerImpl.173 = The alias used to for the server certificate in the keystore. If not specified the first key read in the keystore will be used.
Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Fri Sep 11 16:07:32 2009
@@ -154,7 +154,7 @@
try {
manager.updateConnectorConfig(newConnectorName);
} catch (Exception e) {
- log.error("Unable to start connector", e); //TODO: get into rendered page
+ log.error("Unable to update connector in server.xml", e); //TODO: get into rendered page
}
actionResponse.setRenderParameter(PARM_MODE, "list");
} else if(mode.equals("save")) { // User just submitted the form to update a connector
@@ -205,7 +205,7 @@
try {
manager.updateConnectorConfig(connectorName);
} catch (Exception e) {
- log.error("Unable to start connector", e); //TODO: get into rendered page
+ log.error("Unable to update connector in server.xml", e); //TODO: get into rendered page
}
}
actionResponse.setRenderParameter(PARM_MODE, "list");
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java Fri Sep 11 16:07:32 2009
@@ -197,6 +197,10 @@
defaultAttributeNames.add("executor");
defaultAttributeNames.add("redirectPort");
defaultAttributeNames.add("connectionTimeout");
+ defaultAttributeNames.add("scheme");
+ defaultAttributeNames.add("secure");
+ defaultAttributeNames.add("sslProtocol");
+ defaultAttributeNames.add("sslEnabled");
}
@@ -444,7 +448,7 @@
connectorAttributes.add(new ConnectorAttribute<String>("noCompressionUserAgents", "", Messages.getString("TomcatManagerImpl.139"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
connectorAttributes.add(new ConnectorAttribute<Integer>("port", 8080, Messages.getString("TomcatManagerImpl.141"), Integer.class, true)); //$NON-NLS-1$ //$NON-NLS-2$
connectorAttributes.add(new ConnectorAttribute<String>("restrictedUserAgents", "", Messages.getString("TomcatManagerImpl.144"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- connectorAttributes.add(new ConnectorAttribute<String>("server", "", Messages.getString("TomcatManagerImpl.147"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ connectorAttributes.add(new ConnectorAttribute<String>("server", null, Messages.getString("TomcatManagerImpl.147"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
connectorAttributes.add(new ConnectorAttribute<Integer>("socketBuffer", 9000, Messages.getString("TomcatManagerImpl.149"), Integer.class)); //$NON-NLS-1$ //$NON-NLS-2$
connectorAttributes.add(new ConnectorAttribute<Boolean>("tcpNoDelay", true, Messages.getString("TomcatManagerImpl.151"), Boolean.class)); //$NON-NLS-1$ //$NON-NLS-2$
connectorAttributes.add(new ConnectorAttribute<Integer>("threadPriority", Thread.NORM_PRIORITY, Messages.getString("TomcatManagerImpl.153"), Integer.class)); //$NON-NLS-1$ //$NON-NLS-2$
@@ -463,6 +467,9 @@
connectorAttributes.add(new ConnectorAttribute<String>("truststoreFile", null, Messages.getString("TomcatManagerImpl.175"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$
connectorAttributes.add(new ConnectorAttribute<String>("truststorePass", null, Messages.getString("TomcatManagerImpl.177"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$
connectorAttributes.add(new ConnectorAttribute<String>("truststoreType", KeystoreUtil.defaultType, Messages.getString("TomcatManagerImpl.179"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$
+ connectorAttributes.add(new ConnectorAttribute<String>("scheme", "https", Messages.getString("TomcatManagerImpl.169"), String.class)); //$NON-NLS-1$ //$NON-NLS-2$
+ connectorAttributes.add(new ConnectorAttribute<Boolean>("secure", true, Messages.getString("TomcatManagerImpl.170"), Boolean.class)); //$NON-NLS-1$ //$NON-NLS-2$
+ connectorAttributes.add(new ConnectorAttribute<Boolean>("sslEnabled", true, Messages.getString("TomcatManagerImpl.167"), Boolean.class)); //$NON-NLS-1$ //$NON-NLS-2$
}
// see http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatServerConfigManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatServerConfigManager.java?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatServerConfigManager.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatServerConfigManager.java Fri Sep 11 16:07:32 2009
@@ -111,11 +111,23 @@
// set attributes for the connector
for (String attributeName : attributesToUpdate.keySet()) {
- connector.setAttribute(attributeName, attributesToUpdate.get(attributeName));
+
+ if(attributesToUpdate.get(attributeName)==null){
+ continue;
+ }
+
+ // must use "SSLEnabled" instead of "sslEnabled" because attribute is case-sensitive in server.xml
+ if (attributeName.equalsIgnoreCase("SSLEnabled")) {
+
+ connector.setAttribute("SSLEnabled", attributesToUpdate.get(attributeName));
+
+ } else {
+
+ connector.setAttribute(attributeName, attributesToUpdate.get(attributeName));
+ }
}
connector.setAttribute("name", uniqueConnectorName);
- connector.getAttributes();
persistServerConfig();
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java Fri Sep 11 16:07:32 2009
@@ -80,7 +80,14 @@
}
public String getKeystoreFile() {
- return keystoreFileName;
+
+ String keystore = (String) connector.getAttribute("keystoreFile");
+
+ if (keystore.indexOf(System.getProperty("catalina.home")) !=-1)
+ return keystore.substring(System.getProperty("catalina.home").length()+1, keystore.length());
+ else
+ return keystore;
+
}
public String getKeystoreType() {
@@ -135,13 +142,14 @@
@Persistent(manageable=false)
public void setKeystoreFile(String keystoreFile) {
- if (keystoreFile!= null && keystoreFile.equals(""))
+ /* if (keystoreFile!= null && keystoreFile.equals(""))
keystoreFile = null;
keystoreFileName = keystoreFile;
if (keystoreFileName == null)
connector.setAttribute("keystoreFile", null);
else
connector.setAttribute("keystoreFile", serverInfo.resolveServerPath(keystoreFileName));
+ */
}
@Persistent(manageable=false)
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/resources/org/apache/geronimo/tomcat/messages.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/resources/org/apache/geronimo/tomcat/messages.properties?rev=813898&r1=813897&r2=813898&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/resources/org/apache/geronimo/tomcat/messages.properties (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/resources/org/apache/geronimo/tomcat/messages.properties Fri Sep 11 16:07:32 2009
@@ -84,7 +84,10 @@
TomcatManagerImpl.160=webmanager.connector.editConnector.TomcatManagerImpl.160
TomcatManagerImpl.162=webmanager.connector.editConnector.TomcatManagerImpl.162
TomcatManagerImpl.165=webmanager.connector.editConnector.TomcatManagerImpl.165
+TomcatManagerImpl.167=webmanager.connector.editConnector.TomcatManagerImpl.167
TomcatManagerImpl.168=webmanager.connector.editConnector.TomcatManagerImpl.168
+TomcatManagerImpl.169=webmanager.connector.editConnector.TomcatManagerImpl.169
+TomcatManagerImpl.170=webmanager.connector.editConnector.TomcatManagerImpl.170
TomcatManagerImpl.171=webmanager.connector.editConnector.TomcatManagerImpl.171
TomcatManagerImpl.173=webmanager.connector.editConnector.TomcatManagerImpl.173
TomcatManagerImpl.175=webmanager.connector.editConnector.TomcatManagerImpl.175