geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gr...@apache.org
Subject svn commit: r419235 - in /geronimo/sandbox/servlet-2.5/modules/jetty/src: java/org/apache/geronimo/jetty/ java/org/apache/geronimo/jetty/connector/ java/org/apache/geronimo/jetty/interceptor/ java/org/apache/geronimo/jetty/requestlog/ test/org/apache/g...
Date Wed, 05 Jul 2006 14:19:44 GMT
Author: gregw
Date: Wed Jul  5 07:19:42 2006
New Revision: 419235

URL: http://svn.apache.org/viewvc?rev=419235&view=rev
Log:
converted security BeforeAfter to a handler.  Lots more of these to do and probably need to make JettyWebAppContext actually extend WebAppContext

Removed:
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/SecurityContextBeforeAfter.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/WebApplicationContextBeforeAfter.java
Modified:
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainer.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecurityHandler.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServer.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHandler.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletRegistration.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyThreadPool.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/NonAuthenticator.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ClassLoaderTest.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java
    geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/connector/HTTPConnectorTest.java

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/InternalJAASJettyRealm.java Wed Jul  5 07:19:42 2006
@@ -21,6 +21,7 @@
 import java.security.Principal;
 import java.security.cert.X509Certificate;
 import java.util.HashMap;
+
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
@@ -28,7 +29,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.realm.providers.CertificateCallbackHandler;
 import org.apache.geronimo.security.realm.providers.ClearableCallbackHandler;
@@ -155,7 +155,7 @@
 
     public Principal pushRole(Principal user, String role) {
         ((JAASJettyPrincipal) user).push(ContextManager.getCurrentCaller());
-        ContextManager.setCurrentCaller(SecurityContextBeforeAfter.getCurrentRoleDesignate(role));
+        ContextManager.setCurrentCaller(JettySecurityHandler.getCurrentRoleDesignate(role));
         return user;
     }
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyPrincipal.java Wed Jul  5 07:19:42 2006
@@ -18,6 +18,7 @@
 
 import java.security.Principal;
 import java.util.Stack;
+
 import javax.security.auth.Subject;
 
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainer.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainer.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainer.java Wed Jul  5 07:19:42 2006
@@ -16,10 +16,10 @@
  */
 
 package org.apache.geronimo.jetty;
-import org.mortbay.jetty.handler.ContextHandler;
+import org.apache.geronimo.management.geronimo.WebContainer;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.RequestLog;
-import org.apache.geronimo.management.geronimo.WebContainer;
+import org.mortbay.jetty.handler.ContextHandler;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java Wed Jul  5 07:19:42 2006
@@ -30,16 +30,15 @@
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.RequestLog;
+import org.mortbay.jetty.Server;
 import org.mortbay.jetty.handler.ContextHandler;
 import org.mortbay.jetty.handler.ContextHandlerCollection;
 import org.mortbay.jetty.handler.DefaultHandler;
 import org.mortbay.jetty.handler.HandlerCollection;
 import org.mortbay.jetty.handler.RequestLogHandler;
-import org.mortbay.jetty.Connector;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.RequestLog;
-import org.mortbay.jetty.security.UserRealm;
-import org.mortbay.jetty.Server;
 
 
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyEJBWebServiceContext.java Wed Jul  5 07:19:42 2006
@@ -28,14 +28,14 @@
 
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.webservices.WebServiceContainer;
+import org.mortbay.jetty.HttpException;
+import org.mortbay.jetty.Request;
+import org.mortbay.jetty.Response;
+import org.mortbay.jetty.handler.ContextHandler;
 import org.mortbay.jetty.security.Authenticator;
 import org.mortbay.jetty.security.BasicAuthenticator;
 import org.mortbay.jetty.security.ClientCertAuthenticator;
 import org.mortbay.jetty.security.DigestAuthenticator;
-import org.mortbay.jetty.handler.ContextHandler;
-import org.mortbay.jetty.HttpException;
-import org.mortbay.jetty.Request;
-import org.mortbay.jetty.Response;
 
 /**
  * Delegates requests to a WebServiceContainer which is presumably for an EJB WebService.

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java Wed Jul  5 07:19:42 2006
@@ -20,6 +20,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
@@ -36,7 +37,6 @@
 import org.apache.geronimo.jetty.requestlog.JettyLogManager;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.EditableConfigurationManager;
 import org.apache.geronimo.kernel.config.InvalidConfigException;

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecurityHandler.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecurityHandler.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettySecurityHandler.java Wed Jul  5 07:19:42 2006
@@ -17,31 +17,295 @@
 package org.apache.geronimo.jetty;
 
 import java.io.IOException;
+import java.security.AccessControlContext;
+import java.security.AccessControlException;
+import java.security.PermissionCollection;
+import java.security.Principal;
+import java.util.Map;
 
-import org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter;
+import javax.security.auth.Subject;
+import javax.security.jacc.PolicyContext;
+import javax.security.jacc.WebResourcePermission;
+import javax.security.jacc.WebUserDataPermission;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.common.GeronimoSecurityException;
+import org.apache.geronimo.jetty.interceptor.BeforeAfter;
+import org.apache.geronimo.security.ContextManager;
+import org.apache.geronimo.security.IdentificationPrincipal;
+import org.apache.geronimo.security.SubjectId;
+import org.apache.geronimo.security.deploy.DefaultPrincipal;
+import org.apache.geronimo.security.util.ConfigurationUtil;
 import org.mortbay.jetty.HttpException;
 import org.mortbay.jetty.Request;
 import org.mortbay.jetty.Response;
+import org.mortbay.jetty.security.Authenticator;
+import org.mortbay.jetty.security.FormAuthenticator;
 import org.mortbay.jetty.security.SecurityHandler;
+import org.mortbay.jetty.webapp.WebAppContext;
 
 public class JettySecurityHandler extends SecurityHandler {
-    
-    private SecurityContextBeforeAfter securityInterceptor;
-    
-    public SecurityContextBeforeAfter getSecurityInterceptor() {
-        return this.securityInterceptor;
-    }
-    
-    public void setSecurityInterceptor (SecurityContextBeforeAfter securityInterceptor) {
-        this.securityInterceptor = securityInterceptor;
-    }
-    
-    public boolean checkSecurityConstraints(String pathInContext, Request request, Response response) throws HttpException, IOException {
-        if (securityInterceptor != null) {
-            return securityInterceptor.checkSecurityConstraints(pathInContext, request, response);
+
+    private String policyContextID;
+
+    private Map roleDesignates;
+
+    private JAASJettyPrincipal defaultPrincipal;
+
+    private String formLoginPath;
+
+    private PermissionCollection checked;
+
+    private PermissionCollection excludedPermissions;
+
+    private Authenticator authenticator;
+
+    private JAASJettyRealm realm;
+
+    public JettySecurityHandler() {
+    }
+
+    public void init(String policyContextID,
+            DefaultPrincipal defaultPrincipal, Authenticator authenticator,
+            PermissionCollection checkedPermissions,
+            PermissionCollection excludedPermissions, Map roleDesignates,
+            JAASJettyRealm realm, ClassLoader classLoader) {
+        assert realm != null;
+        assert authenticator != null;
+
+        this.policyContextID = policyContextID;
+
+        this.defaultPrincipal = generateDefaultPrincipal(defaultPrincipal,
+                classLoader);
+        this.roleDesignates = roleDesignates;
+        this.checked = checkedPermissions;
+        this.excludedPermissions = excludedPermissions;
+
+        if (authenticator instanceof FormAuthenticator) {
+            String formLoginPath = ((FormAuthenticator) authenticator)
+                    .getLoginPage();
+            if (formLoginPath.indexOf('?') > 0) {
+                formLoginPath = formLoginPath.substring(0, formLoginPath
+                        .indexOf('?'));
+            }
+            this.formLoginPath = formLoginPath;
+        } else {
+            formLoginPath = null;
+        }
+
+        this.authenticator = authenticator;
+        /**
+         * Register our default principal with the ContextManager
+         */
+        Subject defaultSubject = this.defaultPrincipal.getSubject();
+        ContextManager.registerSubject(defaultSubject);
+        SubjectId id = ContextManager.getSubjectId(defaultSubject);
+        defaultSubject.getPrincipals().add(new IdentificationPrincipal(id));
+        this.realm = realm;
+    }
+
+    public void doStop(JettyContainer jettyContainer) throws Exception {
+        try{
+            super.doStop();
+        }
+        finally {
+            Subject defaultSubject = this.defaultPrincipal.getSubject();
+            ContextManager.unregisterSubject(defaultSubject);
+            jettyContainer.removeRealm(realm.getSecurityRealmName());
+        }
+    }
+
+    /* ------------------------------------------------------------ */
+    /*
+     * @see org.mortbay.jetty.security.SecurityHandler#handle(java.lang.String,
+     *      javax.servlet.http.HttpServletRequest,
+     *      javax.servlet.http.HttpServletResponse, int)
+     */
+    public void handle(String target, HttpServletRequest request,
+            HttpServletResponse response, int dispatch) throws IOException,
+            ServletException {
+        String old_policy_id = PolicyContext.getContextID();
+
+        try {
+            PolicyContext.setContextID(policyContextID);
+            PolicyContext.setHandlerData(request);
+
+            super.handle(target, request, response, dispatch);
+        } finally {
+            PolicyContext.setContextID(old_policy_id);
+        }
+    }
+
+    public static Subject getCurrentRoleDesignate(String role) {
+        return ((JettySecurityHandler) (WebAppContext.getCurrentWebAppContext()
+                .getSecurityHandler())).getRoleDesignate(role);
+    }
+
+    private Subject getRoleDesignate(String roleName) {
+        return (Subject) roleDesignates.get(roleName);
+    }
+
+    /**
+     * Check the security constraints using JACC.
+     * 
+     * @param pathInContext
+     *            path in context
+     * @param request
+     *            HTTP request
+     * @param response
+     *            HTTP response
+     * @return true if the path in context passes the security check, false if
+     *         it fails or a redirection has occured during authentication.
+     */
+    public boolean checkSecurityConstraints(String pathInContext,
+            Request request, Response response) throws HttpException,
+            IOException {
+        if (formLoginPath != null) {
+            String pathToBeTested = (pathInContext.indexOf('?') > 0 ? pathInContext
+                    .substring(0, pathInContext.indexOf('?'))
+                    : pathInContext);
+
+            if (pathToBeTested.equals(formLoginPath)) {
+                return true;
+            }
+        }
+
+        try {
+            String transportType;
+            if (request.isSecure()) {
+                transportType = "CONFIDENTIAL";
+            } else if (request.getConnection().isIntegral(request)) {
+                transportType = "INTEGRAL";
+            } else {
+                transportType = "NONE";
+            }
+            WebUserDataPermission wudp = new WebUserDataPermission(request
+                    .getServletPath(), new String[] { request.getMethod() },
+                    transportType);
+            WebResourcePermission webResourcePermission = new WebResourcePermission(
+                    request);
+            Principal user = obtainUser(pathInContext, request, response,
+                    webResourcePermission, wudp);
+
+            if (user == null) {
+                return false;
+            }
+            if (user == SecurityHandler.__NOBODY) {
+                return true;
+            }
+
+            AccessControlContext acc = ContextManager.getCurrentContext();
+
+            /**
+             * JACC v1.0 secion 4.1.1
+             */
+
+            acc.checkPermission(wudp);
+
+            /**
+             * JACC v1.0 secion 4.1.2
+             */
+            acc.checkPermission(webResourcePermission);
+        } catch (HttpException he) {
+            response.sendError(he.getStatus(), he.getReason());
+            return false;
+        } catch (AccessControlException ace) {
+            response.sendError(403);
+            return false;
         }
-        return super.checkSecurityConstraints(pathInContext, request, response);
+        return true;
     }
 
+    /**
+     * Obtain an authenticated user, if one is required. Otherwise return the
+     * default principal. <p/> Also set the current caller for JACC security
+     * checks for the default principal. This is automatically done by
+     * <code>JAASJettyRealm</code>.
+     * 
+     * @param pathInContext
+     *            path in context
+     * @param request
+     *            HTTP request
+     * @param response
+     *            HTTP response
+     * @return <code>null</code> if there is no authenticated user at the
+     *         moment and security checking should not proceed and servlet
+     *         handling should also not proceed, e.g. redirect.
+     *         <code>SecurityConstraint.__NOBODY</code> if security checking
+     *         should not proceed and servlet handling should proceed, e.g.
+     *         login page.
+     */
+    private Principal obtainUser(String pathInContext, Request request,
+            Response response, WebResourcePermission resourcePermission,
+            WebUserDataPermission dataPermission) throws IOException {
+        boolean unauthenticated = !(checked.implies(resourcePermission) || checked
+                .implies(dataPermission));
+        boolean forbidden = excludedPermissions.implies(resourcePermission)
+                || excludedPermissions.implies(dataPermission);
+
+        if (!unauthenticated && !forbidden) {
+            return authenticator.authenticate(realm, pathInContext, request,
+                    response);
+        } else if (authenticator instanceof FormAuthenticator
+                && pathInContext.endsWith(FormAuthenticator.__J_SECURITY_CHECK)) {
+            /**
+             * This could be a post request to __J_SECURITY_CHECK.
+             */
+            return authenticator.authenticate(realm, pathInContext, request,
+                    response);
+        }
+
+        // attempt to access an unprotected resource that is not the
+        // j_security_check.
+        // if we are logged in, return the logged in principal.
+        if (request != null) {
+            // null response appears to prevent redirect to login page
+            Principal user = authenticator.authenticate(realm, pathInContext,
+                    request, null);
+            if (user != null) {
+                return user;
+            }
+        }
+
+        /**
+         * No authentication is required. Return the defaultPrincipal.
+         */
+        ContextManager.setCurrentCaller(defaultPrincipal.getSubject());
+        return defaultPrincipal;
+    }
+
+    /**
+     * Generate the default principal from the security config.
+     * 
+     * @param defaultPrincipal
+     *            The Geronimo security configuration.
+     * @param classLoader
+     * @return the default principal
+     */
+    protected JAASJettyPrincipal generateDefaultPrincipal(
+            DefaultPrincipal defaultPrincipal, ClassLoader classLoader)
+            throws GeronimoSecurityException {
+
+        if (defaultPrincipal == null) {
+            throw new GeronimoSecurityException(
+                    "Unable to generate default principal");
+        }
+
+        try {
+            JAASJettyPrincipal result = new JAASJettyPrincipal("default");
+            Subject defaultSubject = ConfigurationUtil.generateDefaultSubject(
+                    defaultPrincipal, classLoader);
+
+            result.setSubject(defaultSubject);
+
+            return result;
+        } catch (DeploymentException de) {
+            throw new GeronimoSecurityException(
+                    "Unable to generate default principal", de);
+        }
+    }
 
 }

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServer.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServer.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServer.java Wed Jul  5 07:19:42 2006
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.jetty;
 
-import org.mortbay.jetty.security.UserRealm;
 import org.mortbay.jetty.Server;
+import org.mortbay.jetty.security.UserRealm;
 
 
 /**

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHandler.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHandler.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHandler.java Wed Jul  5 07:19:42 2006
@@ -19,14 +19,14 @@
 
 import java.io.IOException;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import javax.security.auth.Subject;
 import javax.servlet.ServletException;
 import javax.servlet.UnavailableException;
-import javax.security.auth.Subject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
-import org.mortbay.jetty.servlet.ServletHandler;
 import org.apache.geronimo.security.ContextManager;
+import org.mortbay.jetty.servlet.ServletHandler;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java Wed Jul  5 07:19:42 2006
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.util.Map;
 import java.util.Set;
+
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
@@ -28,7 +29,6 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.Servlet;
-
 import org.mortbay.jetty.servlet.ServletHolder;
 
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletRegistration.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletRegistration.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletRegistration.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletRegistration.java Wed Jul  5 07:19:42 2006
@@ -16,9 +16,7 @@
  */
 package org.apache.geronimo.jetty;
 
-import java.util.Map;
 import java.util.Set;
-import javax.security.jacc.PolicyContextException;
 
 import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.ServletHolder;

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyThreadPool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyThreadPool.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyThreadPool.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyThreadPool.java Wed Jul  5 07:19:42 2006
@@ -1,8 +1,8 @@
 package org.apache.geronimo.jetty;
 
-import org.mortbay.thread.ThreadPool;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.mortbay.thread.ThreadPool;
 
 /**
  * JettyThreadPool

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java Wed Jul  5 07:19:42 2006
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.jetty;
 
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.PermissionCollection;
@@ -32,7 +31,6 @@
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-import javax.naming.Context;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -44,11 +42,8 @@
 import org.apache.geronimo.jetty.interceptor.BeforeAfter;
 import org.apache.geronimo.jetty.interceptor.ComponentContextBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.InstanceContextBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.RequestWrappingBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.ThreadClassloaderBeforeAfter;
 import org.apache.geronimo.jetty.interceptor.TransactionContextBeforeAfter;
-import org.apache.geronimo.jetty.interceptor.WebApplicationContextBeforeAfter;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.ObjectNameUtil;
 import org.apache.geronimo.management.J2EEApplication;
@@ -64,22 +59,14 @@
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
 import org.apache.geronimo.transaction.context.OnlineUserTransaction;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
-import org.mortbay.jetty.HttpException;
 import org.mortbay.jetty.Request;
 import org.mortbay.jetty.Response;
-import org.mortbay.jetty.SessionManager;
-import org.mortbay.jetty.handler.ErrorHandler;
-import org.mortbay.jetty.servlet.AbstractSessionManager;
-import org.mortbay.jetty.servlet.Dispatcher;
-import org.mortbay.jetty.servlet.FilterHolder;
+import org.mortbay.jetty.security.Authenticator;
 import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.ServletHolder;
 import org.mortbay.jetty.servlet.ServletMapping;
-import org.mortbay.jetty.servlet.SessionHandler;
-import org.mortbay.jetty.webapp.Configuration;
 import org.mortbay.jetty.webapp.WebAppContext;
 import org.mortbay.jetty.webapp.WebAppContext.WebAppErrorHandler;
-import org.mortbay.jetty.security.Authenticator;
 
 /**
  * Wrapper for a WebApplicationContext that sets up its J2EE environment.
@@ -103,7 +90,6 @@
 
     private final BeforeAfter chain;
     private final int contextLength;
-    private final SecurityContextBeforeAfter securityInterceptor;
 
     private final String objectName;
     private String sessionManagerClassName;
@@ -126,7 +112,6 @@
         webAppRoot = null;
         chain = null;
         contextLength = 0;
-        securityInterceptor = null;
         welcomeFiles = null;
         objectName = null;
         sessionManagerClassName = null;
@@ -245,7 +230,6 @@
         interceptor = new TransactionContextBeforeAfter(interceptor, index++, index++, transactionContextManager);
         interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
         interceptor = new ThreadClassloaderBeforeAfter(interceptor, index++, index++, this.webClassLoader);
-        interceptor = new WebApplicationContextBeforeAfter(interceptor, index++, this);
 //JACC
 
         if (securityRealmName != null) {
@@ -257,13 +241,11 @@
             //wrap jetty realm with something that knows the dumb realmName
             JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
             this.webAppContext.getSecurityHandler().setUserRealm(realm);
-            this.securityInterceptor = new SecurityContextBeforeAfter(interceptor, index++, index++, policyContextID, defaultPrincipal, authenticator, checkedPermissions, excludedPermissions, roleDesignates, realm, classLoader);
-            interceptor = this.securityInterceptor;
-        } else {
-            securityInterceptor = null;
+            ((JettySecurityHandler)this.webAppContext.getSecurityHandler()).init(policyContextID, defaultPrincipal, authenticator, checkedPermissions, excludedPermissions, roleDesignates, realm, classLoader);
+            
         }
 //      end JACC
-        interceptor = new RequestWrappingBeforeAfter(interceptor, getServletHandler());
+        
         chain = interceptor;
         contextLength = index;
 
@@ -382,9 +364,6 @@
             return;
         }
 
-        if (securityInterceptor != null) {
-            securityInterceptor.stop(jettyContainer);
-        }
         Object context = enterContextScope(null, null);
         try {
             this.webAppContext.stop();

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebContainerStatsImpl.java Wed Jul  5 07:19:42 2006
@@ -1,14 +1,14 @@
 package org.apache.geronimo.jetty;
 
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.RangeStatistic;
+import javax.management.j2ee.statistics.TimeStatistic;
+
 import org.apache.geronimo.management.stats.CountStatisticImpl;
 import org.apache.geronimo.management.stats.RangeStatisticImpl;
 import org.apache.geronimo.management.stats.StatisticImpl;
 import org.apache.geronimo.management.stats.StatsImpl;
 import org.apache.geronimo.management.stats.TimeStatisticImpl;
-
-import javax.management.j2ee.statistics.CountStatistic;
-import javax.management.j2ee.statistics.RangeStatistic;
-import javax.management.j2ee.statistics.TimeStatistic;
 
 /**
  * Jetty implementation of the Geronimo stats interface WebContainerStats

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/NonAuthenticator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/NonAuthenticator.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/NonAuthenticator.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/NonAuthenticator.java Wed Jul  5 07:19:42 2006
@@ -1,12 +1,12 @@
 package org.apache.geronimo.jetty;
 
-import org.mortbay.jetty.security.Authenticator;
-import org.mortbay.jetty.security.UserRealm;
+import java.io.IOException;
+import java.security.Principal;
+
 import org.mortbay.jetty.Request;
 import org.mortbay.jetty.Response;
-
-import java.security.Principal;
-import java.io.IOException;
+import org.mortbay.jetty.security.Authenticator;
+import org.mortbay.jetty.security.UserRealm;
 
 /**
  * Authenticator that always denies, returning null.  Useful when you need to install a default principal/subject

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/GeronimoSSLListener.java Wed Jul  5 07:19:42 2006
@@ -16,10 +16,10 @@
  */
 package org.apache.geronimo.jetty.connector;
 
-import org.mortbay.jetty.security.SslSocketConnector;
-import org.apache.geronimo.management.geronimo.KeystoreManager;
-
 import javax.net.ssl.SSLServerSocketFactory;
+
+import org.apache.geronimo.management.geronimo.KeystoreManager;
+import org.mortbay.jetty.security.SslSocketConnector;
 
 /**
  * SSL listener that hooks into the Geronimo keystore infrastructure.

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java Wed Jul  5 07:19:42 2006
@@ -18,6 +18,7 @@
 package org.apache.geronimo.jetty.connector;
 
 import javax.net.ssl.KeyManagerFactory;
+
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java Wed Jul  5 07:19:42 2006
@@ -17,20 +17,20 @@
 
 package org.apache.geronimo.jetty.connector;
 
-import java.net.UnknownHostException;
-import java.net.InetSocketAddress;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.jetty.JettyWebConnector;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.mortbay.jetty.AbstractConnector;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.bio.SocketConnector;
 import org.mortbay.jetty.nio.SelectChannelConnector;
-import org.mortbay.jetty.AbstractConnector;
 
 /**
  * Base class for GBeans for Jetty network connectors (HTTP, HTTPS, AJP, etc.).

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/BeforeAfter.java Wed Jul  5 07:19:42 2006
@@ -20,6 +20,7 @@
 import org.mortbay.jetty.Response;
 
 /**
+ * @deprecated
  * @version $Rev$ $Date$
  */
 public interface BeforeAfter {

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/interceptor/InstanceContextBeforeAfter.java Wed Jul  5 07:19:42 2006
@@ -17,6 +17,7 @@
 package org.apache.geronimo.jetty.interceptor;
 
 import java.util.Set;
+
 import javax.resource.ResourceException;
 
 import org.apache.geronimo.transaction.DefaultInstanceContext;

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/JettyLogManagerImpl.java Wed Jul  5 07:19:42 2006
@@ -16,24 +16,29 @@
  */
 package org.apache.geronimo.jetty.requestlog;
 
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.*;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.RandomAccessFile;
-import java.nio.channels.FileChannel;
-import java.nio.MappedByteBuffer;
 import java.nio.CharBuffer;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
 import java.nio.charset.Charset;
-import java.text.SimpleDateFormat;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
  * Jetty implementation of the WebAccessLog management interface.

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java Wed Jul  5 07:19:42 2006
@@ -19,9 +19,9 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.jetty.RequestLog;
 
 /**

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java Wed Jul  5 07:19:42 2006
@@ -16,7 +16,16 @@
  */
 package org.apache.geronimo.jetty;
 
+import java.net.URL;
+import java.security.PermissionCollection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
 import junit.framework.TestCase;
+
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
 import org.apache.geronimo.jetty.connector.HTTPConnector;
 import org.apache.geronimo.security.SecurityServiceImpl;
@@ -27,10 +36,10 @@
 import org.apache.geronimo.security.jaas.LoginModuleGBean;
 import org.apache.geronimo.security.jaas.server.JaasLoginService;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
-import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.security.jacc.RoleDesignateSource;
 import org.apache.geronimo.security.jacc.ApplicationPrincipalRoleConfigurationManager;
+import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.security.jacc.PrincipalRoleMapper;
+import org.apache.geronimo.security.jacc.RoleDesignateSource;
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -39,14 +48,6 @@
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 import org.mortbay.jetty.security.Authenticator;
 import org.mortbay.jetty.security.FormAuthenticator;
-
-import java.net.URL;
-import java.security.PermissionCollection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
 
 
 /**

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ClassLoaderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ClassLoaderTest.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ClassLoaderTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ClassLoaderTest.java Wed Jul  5 07:19:42 2006
@@ -18,10 +18,10 @@
 package org.apache.geronimo.jetty;
 
 import java.io.File;
-import java.net.MalformedURLException;
 import java.net.URL;
 
 import junit.framework.TestCase;
+
 import org.apache.geronimo.kernel.config.MultiParentClassLoader;
 import org.apache.geronimo.kernel.repository.Artifact;
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java Wed Jul  5 07:19:42 2006
@@ -17,22 +17,12 @@
 
 package org.apache.geronimo.jetty;
 
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
-import javax.management.ObjectName;
+import java.net.HttpURLConnection;
+import java.net.URL;
 
-import junit.framework.TestCase;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.jetty.connector.HTTPConnector;
 import org.apache.geronimo.jetty.app.MockWebServiceContainer;
-import org.apache.geronimo.kernel.KernelFactory;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.management.State;
-import org.apache.geronimo.webservices.WebServiceContainer;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/SecurityTest.java Wed Jul  5 07:19:42 2006
@@ -29,6 +29,7 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+
 import javax.security.jacc.WebResourcePermission;
 import javax.security.jacc.WebUserDataPermission;
 

Modified: geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/connector/HTTPConnectorTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/connector/HTTPConnectorTest.java?rev=419235&r1=419234&r2=419235&view=diff
==============================================================================
--- geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/connector/HTTPConnectorTest.java (original)
+++ geronimo/sandbox/servlet-2.5/modules/jetty/src/test/org/apache/geronimo/jetty/connector/HTTPConnectorTest.java Wed Jul  5 07:19:42 2006
@@ -16,8 +16,8 @@
  */
 package org.apache.geronimo.jetty.connector;
 
-import java.net.UnknownHostException;
 import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 
 import junit.framework.TestCase;
 



Mime
View raw message