geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: svn commit: r232499 - in /geronimo/trunk: applications/console-standard/ applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/ modules/assembly/src/pla...
Date Sat, 13 Aug 2005 22:47:13 GMT
On Sat, 13 Aug 2005, Jeremy Boynes wrote:
> This changes renames the keystore, password and needClientAuth 
> attributes of the Jetty HTTPS Connector breaking any plans that use them 
> (including the CTS plans which I have now fixed).

	Sorry, I should have put in the TCK change at the same time.

	But to answer your question, I think we need to standardize the
naming of these things rather than having separate interfaces for Tomcat
and Jetty for the same settings.  I wish we could have done it sooner, but
better now than "post 1.0", IMO.  I'd really like the same management code
to work regardless of web container.  I suspect there will be some more
little changes like that (for example, updating Tomcat to implement the
same interfaces, and bring OpenEJB network property names in line with
Jetty/Tomcat network property names) -- I'll do better about changing the 
TCK at the same time.

Aaron

> ammulder@apache.org wrote:
> > Author: ammulder
> > Date: Sat Aug 13 07:31:24 2005
> > New Revision: 232499
> > 
> > URL: http://svn.apache.org/viewcvs?rev=232499&view=rev
> > Log:
> > Add SSL properties for HTTPS connector configuration
> > Make the Jetty HTTPS connector implement the SecureConnector management API
> >  - update the Jetty plan to adjust a couple property names accordingly
> > Make the portlets aware of Tomcat (though the Tomcat container/connectors
> >   still don't implement the management API)
> > 
> > Added:
> >     geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
  (with props)
> >     geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java
  (with props)
> > Modified:
> >     geronimo/trunk/applications/console-standard/project.xml
> >     geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
> >     geronimo/trunk/modules/assembly/src/plan/jetty-config.xml
> >     geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/geronimo/SecureConnector.java
> >     geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
> > 
> > Modified: geronimo/trunk/applications/console-standard/project.xml
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/project.xml?rev=232499&r1=232498&r2=232499&view=diff
> > ==============================================================================
> > --- geronimo/trunk/applications/console-standard/project.xml (original)
> > +++ geronimo/trunk/applications/console-standard/project.xml Sat Aug 13 07:31:24
2005
> > @@ -35,6 +35,16 @@
> >              <artifactId>geronimo-jetty</artifactId>
> >              <version>${pom.currentVersion}</version>
> >          </dependency>
> > +         <dependency>
> > +            <groupId>geronimo</groupId>
> > +            <artifactId>geronimo-tomcat</artifactId>
> > +            <version>${pom.currentVersion}</version>
> > +        </dependency>
> > +         <dependency>
> > +            <groupId>geronimo</groupId>
> > +            <artifactId>geronimo-webservices</artifactId>
> > +            <version>${pom.currentVersion}</version>
> > +        </dependency>
> >          <dependency>
> >              <groupId>geronimo</groupId>
> >              <artifactId>geronimo-j2ee</artifactId>
> > 
> > Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=232499&r1=232498&r2=232499&view=diff
> > ==============================================================================
> > --- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
(original)
> > +++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
Sat Aug 13 07:31:24 2005
> > @@ -36,9 +36,12 @@
> >  import org.apache.geronimo.console.util.PortletManager;
> >  import org.apache.geronimo.j2ee.management.geronimo.WebContainer;
> >  import org.apache.geronimo.j2ee.management.geronimo.WebConnector;
> > +import org.apache.geronimo.j2ee.management.geronimo.SecureConnector;
> >  import org.apache.geronimo.jetty.JettyContainer;
> >  import org.apache.geronimo.jetty.JettyWebConnector;
> > +import org.apache.geronimo.jetty.JettySecureConnector;
> >  import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
> > +import org.apache.geronimo.tomcat.TomcatContainer;
> >  import org.apache.commons.logging.Log;
> >  import org.apache.commons.logging.LogFactory;
> >  
> > @@ -61,6 +64,8 @@
> >          String server = "generic";
> >          if(container instanceof JettyContainer) {
> >              server = "jetty";
> > +        } else if (container instanceof TomcatContainer) {
> > +            server = "tomcat";
> >          }
> >          actionResponse.setRenderParameter("server", server);
> >          if(mode.equals("new")) {
> > @@ -87,7 +92,23 @@
> >                  }
> >              }
> >              if(protocol.equals(WebContainer.PROTOCOL_HTTPS)) {
> > -                //todo: HTTPS values
> > +                String keystoreType = actionRequest.getParameter("keystoreType");
> > +                String keystoreFile = actionRequest.getParameter("keystoreFile");
> > +                String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
> > +                String keystorePass = actionRequest.getParameter("keystorePassword");
> > +                String secureProtocol = actionRequest.getParameter("secureProtocol");
> > +                String algorithm = actionRequest.getParameter("algorithm");
> > +                boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
> > +                SecureConnector secure = (SecureConnector) connector;
> > +                if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
> > +                if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
> > +                if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
> > +                if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
> > +                if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
> > +                secure.setClientAuthRequired(clientAuth);
> > +                if(secure instanceof JettySecureConnector) {
> > +                    if(isValid(privateKeyPass)) {((JettySecureConnector)secure).setKeyPassword(privateKeyPass);}
> > +                }
> >              }
> >              // Start the connector
> >              try {
> > @@ -123,6 +144,25 @@
> >                          ((JettyWebConnector)connector).setMinThreads(minThreads.intValue());
> >                      }
> >                  }
> > +                if(connector instanceof SecureConnector) {
> > +                    String keystoreType = actionRequest.getParameter("keystoreType");
> > +                    String keystoreFile = actionRequest.getParameter("keystoreFile");
> > +                    String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
> > +                    String keystorePass = actionRequest.getParameter("keystorePassword");
> > +                    String secureProtocol = actionRequest.getParameter("secureProtocol");
> > +                    String algorithm = actionRequest.getParameter("algorithm");
> > +                    boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
> > +                    SecureConnector secure = (SecureConnector) connector;
> > +                    if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
> > +                    if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
> > +                    if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
> > +                    if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
> > +                    if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
> > +                    secure.setClientAuthRequired(clientAuth);
> > +                    if(secure instanceof JettySecureConnector) {
> > +                        if(isValid(privateKeyPass)) {((JettySecureConnector)secure).setKeyPassword(privateKeyPass);}
> > +                    }
> > +                }
> >              }
> >              actionResponse.setRenderParameter("mode", "list");
> >          } else if(mode.equals("start")) {
> > @@ -243,6 +283,18 @@
> >                      renderRequest.setAttribute("minThreads", String.valueOf(minThreads));
> >                  }
> >                  renderRequest.setAttribute("mode", "save");
> > +
> > +                if(connector instanceof SecureConnector) {
> > +                    SecureConnector secure = (SecureConnector) connector;
> > +                    renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
> > +                    renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
> > +                    renderRequest.setAttribute("algorithm",secure.getAlgorithm());
> > +                    renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
> > +                    if(secure.isClientAuthRequired()) {
> > +                        renderRequest.setAttribute("clientAuth", Boolean.TRUE);
> > +                    }
> > +                }
> > +
> >                  if(connector.getProtocol().equals(WebContainer.PROTOCOL_HTTPS))
{
> >                      editHttpsView.include(renderRequest, renderResponse);
> >                  } else {
> > @@ -301,12 +353,16 @@
> >          maximizedView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/maximized.jsp");
> >          helpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/help.jsp");
> >          editHttpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
> > -        editHttpsView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
//todo: HTTPS args
> > +        editHttpsView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTPS.jsp");
> >      }
> >  
> >      public void destroy() {
> >          normalView = null;
> >          maximizedView = null;
> >          super.destroy();
> > +    }
> > +
> > +    public final static boolean isValid(String s) {
> > +        return s != null && !s.equals("");
> >      }
> >  }
> > 
> > Added: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp?rev=232499&view=auto
> > ==============================================================================
> > --- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
(added)
> > +++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
Sat Aug 13 07:31:24 2005
> > @@ -0,0 +1,197 @@
> > +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> > +<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
> > +<portlet:defineObjects/>
> > +
> > +<form name="<portlet:namespace/>" action="<portlet:actionURL/>">
> > +<input type="hidden" name="mode" value="${mode}">
> > +<input type="hidden" name="protocol" value="${protocol}">
> > +<c:if test="${mode eq 'save'}">
> > +  <input type="hidden" name="objectName" value="${objectName}">
> > +</c:if>
> > +<table width="100%%"  border="0">
> > +
> > +<%-- THIS PART SHOULD BE THE SAME AS THE HTTP CONNECTOR --%>
> > +
> > +<!-- Name Field -->
> > +<c:if test="${mode eq 'add'}">
> > +  <tr>
> > +    <td><div align="right">Unique Name: </div></td>
> > +    <td><input name="name" type="text" size="30"></td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>A name that is different than the name for any other web connectors
in the server (no spaces in the name please)</td>
> > +  </tr>
> > +</c:if>
> > +<!-- Host Field -->
> > +  <tr>
> > +    <td><div align="right">Host: </div></td>
> > +    <td>
> > +      <input name="host" type="text" size="30" value="${host}">
> > +    </td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>The host name or IP to bind to.  The normal values are <tt>0.0.0.0</tt>
(all interfaces) or <tt>localhost</tt> (local connections only)</td>
> > +  </tr>
> > +<!-- Port Field -->
> > +  <tr>
> > +    <td><div align="right">Port: </div></td>
> > +    <td>
> > +      <input name="port" type="text" size="5" value="${port}">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>The network port to bind to.</td>
> > +  </tr>
> > +<!-- Min Threads Field (Jetty only) -->
> > +<c:if test="${server eq 'jetty'}">
> > +  <tr>
> > +    <td><div align="right">Min Threads: </div></td>
> > +    <td>
> > +      <input name="minThreads" type="text" size="3" value="${minThreads}">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>The minimum number of threads this connector should use to handle
incoming requests</td>
> > +  </tr>
> > +</c:if>
> > +<!-- Max Threads Field -->
> > +  <tr>
> > +    <td><div align="right">Max Threads: </div></td>
> > +    <td>
> > +      <input name="maxThreads" type="text" size="3" value="${maxThreads}">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>The maximum number of threads this connector should use to handle
incoming requests</td>
> > +  </tr>
> > +
> > +<%-- END OF PART THAT SHOULD BE THE SAME AS THE HTTP CONNECTOR --%>
> > +
> > +  <tr>
> > +    <th colspan="2"><div align="left">SSL Settings</div></th>
> > +  </tr>
> > +
> > +<!-- Keystore File Field -->
> > +  <tr>
> > +    <td><div align="right">Keystore File: </div></td>
> > +    <td>
> > +      <input name="keystoreFile" type="text" size="30" value="${keystoreFile}">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>The file that holds the keystore (relative to the Geronimo install
dir)</td>
> > +  </tr>
> > +
> > +<!-- Keystore Password Field -->
> > +  <tr>
> > +    <td><div align="right"><c:if test="${mode eq 'save'}">Change
</c:if>Keystore Password: </div></td>
> > +    <td>
> > +      <input name="keystorePassword" type="password" size="10">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
> > +      the password used to access the keystore file.<c:if test="${server ne
'jetty'}">  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).</c:if><c:if test="${mode eq
'save'}">  Leave
> > +      this empty if you don't want to change the current password.</c:if></td>
> > +  </tr>
> > +
> > +<!-- Key Password Field (Jetty only) -->
> > +<c:if test="${server eq 'jetty'}">
> > +  <tr>
> > +    <td><div align="right"><c:if test="${mode eq 'save'}">Change
</c:if>Server Key Password: </div></td>
> > +    <td>
> > +      <input name="privateKeyPassword" type="password" size="10">
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
> > +      the password used to access the private key in the keystore.<c:if test="${mode
eq 'save'}">  Leave
> > +      this empty if you don't want to change the current password.</c:if></td>
> > +  </tr>
> > +</c:if>
> > +
> > +<!-- Keystore Type Field -->
> > +  <tr>
> > +    <td><div align="right">Keystore Type: </div></td>
> > +    <td>
> > +      <select name="keystoreType">
> > +        <option<c:if test="${keystoreType eq 'JKS' || logLevel eq ''}">
selected</c:if>>JKS</option>
> > +        <option<c:if test="${keystoreType eq 'PKCS12'}"> selected</c:if>>PKCS12</option>
> > +      </select>
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
> > +      the keystore type.  There is normally no reason not to use the default (<tt>JKS</tt>).</td>
> > +  </tr>
> > +
> > +<!-- Algorithm Field -->
> > +  <tr>
> > +    <td><div align="right">HTTPS Algorithm: </div></td>
> > +    <td>
> > +      <select name="algorithm">
> > +        <option value="SunX509"<c:if test="${algorithm eq 'SunX509' || logLevel
eq ''}"> selected</c:if>>Sun</option>
> > +        <option value="IbmX509"<c:if test="${algorithm eq 'IbmX509'}">
selected</c:if>>IBM</option>
> > +      </select>
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
> > +      the HTTPS algorithm.  This should normally be set to match the JVM vendor.</td>
> > +  </tr>
> > +
> > +<!-- Secure Protocol Field -->
> > +  <tr>
> > +    <td><div align="right">HTTPS Protocol: </div></td>
> > +    <td>
> > +      <select name="secureProtocol">
> > +        <option<c:if test="${secureProtocol eq 'TLS' || logLevel eq ''}">
selected</c:if>>TLS</option>
> > +        <option<c:if test="${secureProtocol eq 'SSL'}"> selected</c:if>>SSL</option>
> > +      </select>
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><c:choose><c:when test="${mode eq 'save'}">Change</c:when><c:otherwise>Set</c:otherwise></c:choose>
> > +      the HTTPS protocol.  This should normally be set to <tt>TLS</tt>,
though some (IBM) JVMs don't work properly
> > +      with popular browsers unless it is changed to <tt>SSL</tt>.</td>
> > +  </tr>
> > +
> > +<!-- Client Auth Field -->
> > +  <tr>
> > +    <td><div align="right">Client Auth Required: </div></td>
> > +    <td>
> > +      <input type="checkbox" name="clientAuth" <c:if test="${!empty clientAuth}">CHECKED
</c:if>/>
> > +	</td>
> > +  </tr>
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td>If set, then clients connecting through this connector must supply
a valid client certificate.  By default, the
> > +      validity is based on the CA certificates in the server keystore (<i>need
to confirm not the JVM default
> > +      trust keystore</i>).</td>
> > +  </tr>
> > +
> > +
> > +
> > +<!-- Submit Button -->
> > +  <tr>
> > +    <td><div align="right"></div></td>
> > +    <td><input name="submit" type="submit" value="Save"></td>
> > +  </tr>
> > +</table>
> > +</form>
> > +<a href='<portlet:actionURL portletMode="view">
> > +           <portlet:param name="mode" value="list" />
> > +         </portlet:actionURL>'>List connectors</a>
> > \ No newline at end of file
> > 
> > Propchange: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
> > ------------------------------------------------------------------------------
> >     svn:eol-style = native
> > 
> > Modified: geronimo/trunk/modules/assembly/src/plan/jetty-config.xml
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/jetty-config.xml?rev=232499&r1=232498&r2=232499&view=diff
> > ==============================================================================
> > --- geronimo/trunk/modules/assembly/src/plan/jetty-config.xml (original)
> > +++ geronimo/trunk/modules/assembly/src/plan/jetty-config.xml Sat Aug 13 07:31:24
2005
> > @@ -51,11 +51,11 @@
> >  
> >      <gbean name="JettySSLConnector" class="org.apache.geronimo.jetty.connector.HTTPSConnector">
> >          <attribute name="port">${PlanHTTPSPort}</attribute>
> > -        <attribute name="keystore">var/security/keystore</attribute>
> > +        <attribute name="keystoreFileName">var/security/keystore</attribute>
> >          <attribute name="keystoreType">JKS</attribute>
> > -        <attribute name="password">secret</attribute>
> > +        <attribute name="keystorePassword">secret</attribute>
> >          <attribute name="keyPassword">secret</attribute>
> > -        <attribute name="needClientAuth">false</attribute>
> > +        <attribute name="clientAuthRequired">false</attribute>
> >          <attribute name="secureProtocol">TLS</attribute>
> >          <attribute name="maxThreads">50</attribute>
> >          <attribute name="minThreads">10</attribute>
> > 
> > Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/geronimo/SecureConnector.java
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/geronimo/SecureConnector.java?rev=232499&r1=232498&r2=232499&view=diff
> > ==============================================================================
> > --- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/geronimo/SecureConnector.java
(original)
> > +++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/geronimo/SecureConnector.java
Sat Aug 13 07:31:24 2005
> > @@ -46,11 +46,6 @@
> >       */
> >      public void setKeystoreFileName(String name);
> >      /**
> > -     * Gets the password used to access the keystore, and by default, used to
> > -     * access the server private key inside the keystore.
> > -     */
> > -    public String getKeystorePassword();
> > -    /**
> >       * Sets the password used to access the keystore, and by default, used to
> >       * access the server private key inside the keystore.  Not all connectors
> >       * support configuring different passwords for those two features; if so,
> > @@ -119,6 +114,6 @@
> >       */
> >      public void setClientAuthRequired(boolean clientCert);
> >  
> > -    // Jetty: key password, integral/confidential separation
> > +    // Jetty: integral/confidential separation
> >      // Tomcat: trust keystore, trust password, trust keystore type, ciphers
> >  }
> > 
> > Added: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java?rev=232499&view=auto
> > ==============================================================================
> > --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java
(added)
> > +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java
Sat Aug 13 07:31:24 2005
> > @@ -0,0 +1,30 @@
> > +/**
> > + *
> > + * Copyright 2003-2004 The Apache Software Foundation
> > + *
> > + *  Licensed under the Apache License, Version 2.0 (the "License");
> > + *  you may not use this file except in compliance with the License.
> > + *  You may obtain a copy of the License at
> > + *
> > + *     http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + *  Unless required by applicable law or agreed to in writing, software
> > + *  distributed under the License is distributed on an "AS IS" BASIS,
> > + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > + *  See the License for the specific language governing permissions and
> > + *  limitations under the License.
> > + */
> > +package org.apache.geronimo.jetty;
> > +
> > +import org.apache.geronimo.j2ee.management.geronimo.SecureConnector;
> > +
> > +/**
> > + * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
> > + */
> > +public interface JettySecureConnector extends SecureConnector {
> > +    /**
> > +     * Sets the password used to access the server private key inside the
> > +     * keystore.
> > +     */
> > +    public void setKeyPassword(String password);
> > +}
> > 
> > Propchange: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecureConnector.java
> > ------------------------------------------------------------------------------
> >     svn:eol-style = native
> > 
> > Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
> > URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?rev=232499&r1=232498&r2=232499&view=diff
> > ==============================================================================
> > --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
(original)
> > +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
Sat Aug 13 07:31:24 2005
> > @@ -26,6 +26,7 @@
> >  import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
> >  import org.apache.geronimo.j2ee.management.geronimo.WebContainer;
> >  import org.apache.geronimo.jetty.JettyContainer;
> > +import org.apache.geronimo.jetty.JettySecureConnector;
> >  import org.apache.geronimo.system.serverinfo.ServerInfo;
> >  
> >  /**
> > @@ -33,7 +34,7 @@
> >   *
> >   * @version $Rev$ $Date$
> >   */
> > -public class HTTPSConnector extends JettyConnector {
> > +public class HTTPSConnector extends JettyConnector implements JettySecureConnector
{
> >      private final SslListener https;
> >      private final ServerInfo serverInfo;
> >      private String keystore;
> > @@ -49,12 +50,12 @@
> >          return WebContainer.PROTOCOL_HTTPS;
> >      }
> >  
> > -    public String getKeystore() {
> > +    public String getKeystoreFileName() {
> >          // this does not delegate to https as it needs to be resolved against ServerInfo
> >          return keystore;
> >      }
> >  
> > -    public void setKeystore(String keystore) {
> > +    public void setKeystoreFileName(String keystore) {
> >          // this does not delegate to https as it needs to be resolved against ServerInfo
> >          this.keystore = keystore;
> >      }
> > @@ -79,7 +80,7 @@
> >          https.setAlgorithm(algorithm);
> >      }
> >  
> > -    public void setPassword(String password) {
> > +    public void setKeystorePassword(String password) {
> >          https.setPassword(password);
> >      }
> >  
> > @@ -103,11 +104,11 @@
> >          https.setKeystoreType(keystoreType);
> >      }
> >  
> > -    public void setNeedClientAuth(boolean needClientAuth) {
> > +    public void setClientAuthRequired(boolean needClientAuth) {
> >          https.setNeedClientAuth(needClientAuth);
> >      }
> >  
> > -    public boolean getNeedClientAuth() {
> > +    public boolean isClientAuthRequired() {
> >          return https.getNeedClientAuth();
> >      }
> >  
> > @@ -120,14 +121,15 @@
> >  
> >      static {
> >          GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Connector HTTPS",
HTTPSConnector.class, JettyConnector.GBEAN_INFO);
> > -        infoFactory.addAttribute("keystore", String.class, true);
> > +        infoFactory.addAttribute("keystoreFileName", String.class, true);
> >          infoFactory.addAttribute("algorithm", String.class, true);
> > +        infoFactory.addAttribute("keystorePassword", String.class, true);
> >          infoFactory.addAttribute("keyPassword", String.class, true);
> > -        infoFactory.addAttribute("keystoreType", String.class, true);
> > -        infoFactory.addAttribute("needClientAuth", boolean.class, true);
> > -        infoFactory.addAttribute("password", String.class, true);
> >          infoFactory.addAttribute("secureProtocol", String.class, true);
> > +        infoFactory.addAttribute("keystoreType", String.class, true);
> > +        infoFactory.addAttribute("clientAuthRequired", boolean.class, true);
> >          infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
> > +        infoFactory.addInterface(JettySecureConnector.class);
> >          infoFactory.setConstructor(new String[]{"JettyContainer", "ServerInfo"});
> >          GBEAN_INFO = infoFactory.getBeanInfo();
> >      }
> > 
> > 
> 
> 

Mime
View raw message