cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
remm2004/07/07 09:34:16 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: - Restore the ability to easily access the internal session. Otherwise, internal components would have to use the manager, which is far less efficient and more complex. Revision ChangesPath 1.5 +37 -7 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Request.java 24 Jun 2004 16:20:21 - 1.4 +++ Request.java 7 Jul 2004 16:34:16 - 1.5 @@ -2072,7 +2072,12 @@ * if necessary. */ public HttpSession getSession() { -return doGetSession(true); +Session session = doGetSession(true); +if (session != null) { +return session.getSession(); +} else { +return null; +} } @@ -2083,7 +2088,12 @@ * @param create Create a new session if one does not exist */ public HttpSession getSession(boolean create) { -return doGetSession(create); +Session session = doGetSession(create); +if (session != null) { +return session.getSession(); +} else { +return null; +} } @@ -2195,10 +2205,30 @@ } +/** + * Return the session associated with this Request, creating one + * if necessary. + */ +public Session getSessionInternal() { +return doGetSession(true); +} + + +/** + * Return the session associated with this Request, creating one + * if necessary and requested. + * + * @param create Create a new session if one does not exist + */ +public Session getSessionInternal(boolean create) { +return doGetSession(create); +} + + // -- Protected Methods -protected HttpSession doGetSession(boolean create) { +protected Session doGetSession(boolean create) { // There cannot be a session if no context has been assigned yet if (context == null) @@ -2208,7 +2238,7 @@ if ((session != null) && !session.isValid()) session = null; if (session != null) -return (session.getSession()); +return (session); // Return the requested session if it exists and is valid Manager manager = null; @@ -2226,7 +2256,7 @@ session = null; if (session != null) { session.access(); -return (session.getSession()); +return (session); } } @@ -2253,7 +2283,7 @@ if (session != null) { session.access(); -return (session.getSession()); +return (session); } else { return (null); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
remm2004/07/22 23:41:00 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: - enum -> enumeration (JDK 1.5 update). Revision ChangesPath 1.8 +4 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Request.java 16 Jul 2004 05:16:56 - 1.7 +++ Request.java 23 Jul 2004 06:41:00 - 1.8 @@ -1040,9 +1040,9 @@ if (parameterMap.isLocked()) return parameterMap; -Enumeration enum = getParameterNames(); -while (enum.hasMoreElements()) { -String name = enum.nextElement().toString(); +Enumeration enumeration = getParameterNames(); +while (enumeration.hasMoreElements()) { +String name = enumeration.nextElement().toString(); String[] values = getParameterValues(name); parameterMap.put(name, values); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
billbarker2004/07/23 00:16:41 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Removing the unused Socket from the Request. If anyone is subclassing the Connector to depend on having a Socket, they can implement the Socket in their subclass. Tomcat has no good reason to expect that the request transport is via Sockets. Revision ChangesPath 1.9 +16 -77 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Request.java 23 Jul 2004 06:41:00 - 1.8 +++ Request.java 23 Jul 2004 07:16:41 - 1.9 @@ -22,8 +22,6 @@ import java.io.IOException; import java.io.BufferedReader; import java.io.UnsupportedEncodingException; -import java.net.InetAddress; -import java.net.Socket; import java.security.Principal; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -302,12 +300,6 @@ /** - * The socket through which this Request was received. - */ -protected Socket socket = null; - - -/** * Parse locales. */ protected boolean localesParsed = false; @@ -589,33 +581,6 @@ this.response = response; } - -/** - * Return the Socket (if any) through which this Request was received. - * This should only be used to access underlying state - * information about this Socket, such as the SSLSession associated with - * an SSLSocket. - */ -public Socket getSocket() { -return (socket); -} - -/** - * Set the Socket (if any) through which this Request was received. - * - * @param socket The socket through which this request was received - */ -public void setSocket(Socket socket) { -this.socket = socket; -remoteHost = null; -remoteAddr = null; -remotePort = -1; -localPort = -1; -localAddr = null; -localName = null; -} - - /** * Return the input stream associated with this Request. */ @@ -1147,14 +1112,9 @@ */ public String getRemoteAddr() { if (remoteAddr == null) { -if (socket != null) { -InetAddress inet = socket.getInetAddress(); -remoteAddr = inet.getHostAddress(); -} else { -coyoteRequest.action -(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest); -remoteAddr = coyoteRequest.remoteAddr().toString(); -} +coyoteRequest.action +(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest); +remoteAddr = coyoteRequest.remoteAddr().toString(); } return remoteAddr; } @@ -1167,9 +1127,6 @@ if (remoteHost == null) { if (!connector.getEnableLookups()) { remoteHost = getRemoteAddr(); -} else if (socket != null) { -InetAddress inet = socket.getInetAddress(); -remoteHost = inet.getHostName(); } else { coyoteRequest.action (ActionCode.ACTION_REQ_HOST_ATTRIBUTE, coyoteRequest); @@ -1185,13 +1142,9 @@ */ public int getRemotePort(){ if (remotePort == -1) { -if (socket != null) { -remotePort = socket.getPort(); -} else { -coyoteRequest.action -(ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest); -remotePort = coyoteRequest.getRemotePort(); -} +coyoteRequest.action +(ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE, coyoteRequest); +remotePort = coyoteRequest.getRemotePort(); } return remotePort; } @@ -1202,14 +1155,9 @@ */ public String getLocalName(){ if (localName == null) { -if (socket != null) { -InetAddress inet = socket.getLocalAddress(); -localName = inet.getHostName(); -} else { -coyoteRequest.action -(ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, coyoteRequest); -localName = coyoteRequest.localName().toString(); -} +coyoteRequest.action +(ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, coyoteRequest); +localName = coyoteRequest.localName().toString(); }
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
luehe 2004/08/03 12:42:39 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Protect against potential NPE Revision ChangesPath 1.10 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Request.java 23 Jul 2004 07:16:41 - 1.9 +++ Request.java 3 Aug 2004 19:42:38 - 1.10 @@ -1876,7 +1876,7 @@ */ public String getQueryString() { String queryString = coyoteRequest.queryString().toString(); -if (queryString.equals("")) { +if (queryString == null || queryString.equals("")) { return (null); } else { return queryString; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
luehe 2004/08/05 18:27:50 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Avoid allocating SimpleDateFormat[] for each request. Instead, declare SimpleDateFormat[] as static and use static initializer to initialize it. This is consistent with SimpleDateFormat[] in org.apache.tomcat.util.http.FastHttpDateFormat. Revision ChangesPath 1.11 +23 -25 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Request.java 3 Aug 2004 19:42:38 - 1.10 +++ Request.java 6 Aug 2004 01:27:50 - 1.11 @@ -82,18 +82,6 @@ implements HttpServletRequest { -// --- Constructors - - -public Request() { - -formats[0].setTimeZone(TimeZone.getTimeZone("GMT")); -formats[1].setTimeZone(TimeZone.getTimeZone("GMT")); -formats[2].setTimeZone(TimeZone.getTimeZone("GMT")); - -} - - // - Properties @@ -120,7 +108,27 @@ } -// - Instance Variables +// - Variables + + +/** + * The set of SimpleDateFormat formats to use in getDateHeader(). + */ +protected static final SimpleDateFormat FORMATS[] = { +new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz", Locale.US), +new SimpleDateFormat("EE, dd-MMM-yy HH:mm:ss zzz", Locale.US), +new SimpleDateFormat("EEE d HH:mm:ss ", Locale.US) +}; + + +protected static final TimeZone GMT_ZONE = TimeZone.getTimeZone("GMT"); + + +static { +FORMATS[0].setTimeZone(GMT_ZONE); +FORMATS[1].setTimeZone(GMT_ZONE); +FORMATS[2].setTimeZone(GMT_ZONE); +} /** @@ -137,16 +145,6 @@ /** - * The set of SimpleDateFormat formats to use in getDateHeader(). - */ -protected SimpleDateFormat formats[] = { -new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz", Locale.US), -new SimpleDateFormat("EE, dd-MMM-yy HH:mm:ss zzz", Locale.US), -new SimpleDateFormat("EEE d HH:mm:ss ", Locale.US) -}; - - -/** * The default Locale if none are specified. */ protected static Locale defaultLocale = Locale.getDefault(); @@ -1767,7 +1765,7 @@ return (-1L); // Attempt to convert the date header in a variety of formats -long result = FastHttpDateFormat.parseDate(value, formats); +long result = FastHttpDateFormat.parseDate(value, FORMATS); if (result != (-1L)) { return result; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
luehe 2004/08/09 15:55:00 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Reverted previous patch (except for keeping the GMT_ZONE constant), because SimpleDateFormat is not thread-safe and therefore cannot be declared as a static var. We could pass "null" to FastHttpDateFormat.parseDate(), in which case we would leverage FastHttpDateFormat's SimpleDateFormat[] constant, but this would mean that dates would be parsed within the synchronized block in FastHttpDateFormat.parseDate(), which may be costly. Revision ChangesPath 1.12 +26 -18 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Request.java 6 Aug 2004 01:27:50 - 1.11 +++ Request.java 9 Aug 2004 22:55:00 - 1.12 @@ -82,6 +82,18 @@ implements HttpServletRequest { +// --- Constructors + + +public Request() { + +formats[0].setTimeZone(GMT_ZONE); +formats[1].setTimeZone(GMT_ZONE); +formats[2].setTimeZone(GMT_ZONE); + +} + + // - Properties @@ -111,26 +123,9 @@ // - Variables -/** - * The set of SimpleDateFormat formats to use in getDateHeader(). - */ -protected static final SimpleDateFormat FORMATS[] = { -new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz", Locale.US), -new SimpleDateFormat("EE, dd-MMM-yy HH:mm:ss zzz", Locale.US), -new SimpleDateFormat("EEE d HH:mm:ss ", Locale.US) -}; - - protected static final TimeZone GMT_ZONE = TimeZone.getTimeZone("GMT"); -static { -FORMATS[0].setTimeZone(GMT_ZONE); -FORMATS[1].setTimeZone(GMT_ZONE); -FORMATS[2].setTimeZone(GMT_ZONE); -} - - /** * The string manager for this package. */ @@ -145,6 +140,19 @@ /** + * The set of SimpleDateFormat formats to use in getDateHeader(). + * + * Notice that because SimpleDateFormat is not thread-safe, we can't + * declare formats[] as a static variable. + */ +protected SimpleDateFormat formats[] = { +new SimpleDateFormat("EEE, dd MMM HH:mm:ss zzz", Locale.US), +new SimpleDateFormat("EE, dd-MMM-yy HH:mm:ss zzz", Locale.US), +new SimpleDateFormat("EEE d HH:mm:ss ", Locale.US) +}; + + +/** * The default Locale if none are specified. */ protected static Locale defaultLocale = Locale.getDefault(); @@ -1765,7 +1773,7 @@ return (-1L); // Attempt to convert the date header in a variety of formats -long result = FastHttpDateFormat.parseDate(value, FORMATS); +long result = FastHttpDateFormat.parseDate(value, formats); if (result != (-1L)) { return result; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
remm2004/10/26 08:42:06 Modified:catalina/src/share/org/apache/catalina/core StandardContext.java catalina/src/share/org/apache/catalina Context.java catalina/src/share/org/apache/catalina/connector Request.java Log: - Add the encoded path to the Context interface. - Use that to set a URL encoded path for the session cookie. - Fixes bug 31090. Revision ChangesPath 1.155 +34 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.154 retrieving revision 1.155 diff -u -r1.154 -r1.155 --- StandardContext.java 25 Oct 2004 19:09:06 - 1.154 +++ StandardContext.java 26 Oct 2004 15:42:02 - 1.155 @@ -86,6 +86,7 @@ import org.apache.catalina.util.CharsetMapper; import org.apache.catalina.util.ExtensionValidator; import org.apache.catalina.util.RequestUtil; +import org.apache.catalina.util.URLEncoder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.modeler.Registry; @@ -145,6 +146,25 @@ private static final JdkCompat jdkCompat = JdkCompat.getJdkCompat(); +/** + * Array containing the safe characters set. + */ +protected static URLEncoder urlEncoder; + + +/** + * GMT timezone - all HTTP dates are on GMT + */ +static { +urlEncoder = new URLEncoder(); +urlEncoder.addSafeCharacter('-'); +urlEncoder.addSafeCharacter('_'); +urlEncoder.addSafeCharacter('.'); +urlEncoder.addSafeCharacter('*'); +urlEncoder.addSafeCharacter('/'); +} + + // - Instance Variables @@ -265,6 +285,12 @@ */ private boolean crossContext = false; + +/** + * Encoded path. + */ +private String encodedPath = null; + /** * The "follow standard delegation model" flag that will be used to @@ -628,8 +654,15 @@ // - Context Properties + +public String getEncodedPath() { +return encodedPath; +} + + public void setName( String name ) { super.setName( name ); +encodedPath = urlEncoder.encode(name); } 1.18 +7 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java Index: Context.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Context.java 28 Jul 2004 18:02:15 - 1.17 +++ Context.java 26 Oct 2004 15:42:05 - 1.18 @@ -253,6 +253,12 @@ /** + * Return the URL encoded context path, using UTF-8. + */ +public String getEncodedPath(); + + +/** * Return the login configuration descriptor for this web application. */ public LoginConfig getLoginConfig(); 1.16 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Request.java 12 Oct 2004 22:53:16 - 1.15 +++ Request.java 26 Oct 2004 15:42:05 - 1.16 @@ -2220,7 +2220,7 @@ cookie.setMaxAge(-1); String contextPath = null; if (!connector.getEmptySessionPath() && (getContext() != null)) { -contextPath = getContext().getPath(); +contextPath = getContext().getEncodedPath(); } if ((contextPath != null) && (contextPath.length() > 0)) { cookie.setPath(contextPath); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
billbarker2004/11/18 22:07:56 Modified:catalina/src/share/org/apache/catalina Globals.java catalina/src/share/org/apache/catalina/connector Request.java Log: Since we are documenting the SSL Session ID attribute, treat it like other SSL attributes. Revision ChangesPath 1.13 +8 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java Index: Globals.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Globals.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Globals.java 15 Oct 2004 00:18:35 - 1.12 +++ Globals.java 19 Nov 2004 06:07:56 - 1.13 @@ -144,6 +144,13 @@ public static final String KEY_SIZE_ATTR = "javax.servlet.request.key_size"; +/** + * The request attribute under which we store the session id being used + * for this SSL connection (as an object of type java.lang.String). + */ +public static final String SSL_SESSION_ID_ATTR = +"javax.servlet.request.ssl_session"; + /** * The servlet context attribute under which the managed bean Registry 1.17 +7 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Request.java 26 Oct 2004 15:42:05 - 1.16 +++ Request.java 19 Nov 2004 06:07:56 - 1.17 @@ -863,6 +863,10 @@ if(attr != null) { attributes.put(Globals.KEY_SIZE_ATTR, attr); } +attr = coyoteRequest.getAttribute(Globals.SSL_SESSION_ID_ATTR); +if(attr != null) { +attributes.put(Globals.SSL_SESSION_ID_ATTR, attr); +} attr = attributes.get(name); } return attr; @@ -875,7 +879,8 @@ static boolean isSSLAttribute(String name) { return Globals.CERTIFICATES_ATTR.equals(name) || Globals.CIPHER_SUITE_ATTR.equals(name) || -Globals.KEY_SIZE_ATTR.equals(name); +Globals.KEY_SIZE_ATTR.equals(name) || +Globals.SSL_SESSION_ID_ATTR.equals(name); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
luehe 2004/11/20 13:10:47 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Allow parseParameters() to use possibly overridden impl of getCharacterEncoding() Revision ChangesPath 1.18 +5 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Request.java 19 Nov 2004 06:07:56 - 1.17 +++ Request.java 20 Nov 2004 21:10:47 - 1.18 @@ -2285,7 +2285,10 @@ Parameters parameters = coyoteRequest.getParameters(); -String enc = coyoteRequest.getCharacterEncoding(); +// getCharacterEncoding() may have been overridden to search for +// hidden form field containing request encoding +String enc = getCharacterEncoding(); + boolean useBodyEncodingForURI = connector.getUseBodyEncodingForURI(); if (enc != null) { parameters.setEncoding(enc); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
remm2005/04/01 03:36:52 Modified:catalina/src/share/org/apache/catalina/realm GenericPrincipal.java JAASRealm.java catalina/src/share/org/apache/catalina/connector Request.java Log: - Commit my proposed changes to GenericPrincipal, and use it to remove the role map in the JAAS realm. - Let me know if I did it wrong ;) Revision ChangesPath 1.5 +33 -14 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/GenericPrincipal.java Index: GenericPrincipal.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/GenericPrincipal.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- GenericPrincipal.java 27 Feb 2004 14:58:45 - 1.4 +++ GenericPrincipal.java 1 Apr 2005 11:36:51 - 1.5 @@ -65,25 +65,29 @@ */ public GenericPrincipal(Realm realm, String name, String password, List roles) { - -super(); -this.realm = realm; -this.name = name; -this.password = password; -if (roles != null) { -this.roles = new String[roles.size()]; -this.roles = (String[]) roles.toArray(this.roles); -if (this.roles.length > 0) -Arrays.sort(this.roles); -} +this(realm, name, password, roles, null); } -public GenericPrincipal(String name, String password, -List roles) { +/** + * Construct a new Principal, associated with the specified Realm, for the + * specified username and password, with the specified role names + * (as Strings). + * + * @param realm The Realm that owns this principal + * @param name The username of the user represented by this Principal + * @param password Credentials used to authenticate this user + * @param roles List of roles (must be Strings) possessed by this user + * @param userPrincipal - the principal to be returned from the request + *getUserPrincipal call if not null; if null, this will be returned + */ +public GenericPrincipal(Realm realm, String name, String password, +List roles, Principal userPrincipal) { super(); +this.realm = realm; this.name = name; this.password = password; +this.userPrincipal = userPrincipal; if (roles != null) { this.roles = new String[roles.size()]; this.roles = (String[]) roles.toArray(this.roles); @@ -92,6 +96,7 @@ } } + // - Properties @@ -140,6 +145,20 @@ } +/** + * The authenticated Principal to be exposed to applications. + */ +protected Principal userPrincipal = null; + +public Principal getUserPrincipal() { +if (userPrincipal != null) { +return userPrincipal; +} else { +return this; +} +} + + // - Public Methods 1.12 +3 -63 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASRealm.java Index: JAASRealm.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASRealm.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- JAASRealm.java6 Oct 2004 16:11:34 - 1.11 +++ JAASRealm.java1 Apr 2005 11:36:51 - 1.12 @@ -20,9 +20,7 @@ import java.security.Principal; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; -import java.util.Map; import java.util.List; import javax.security.auth.Subject; @@ -170,12 +168,6 @@ */ protected List userClasses = new ArrayList(); - /** - * Map associating each user Principal object - * with an array of role Principals. - * This Map is read when hasRole is called. - */ - protected Map roleMap = new HashMap(); /** * Whether to use context ClassLoader or default ClassLoader. @@ -417,52 +409,6 @@ } } - /** - * Returns true if the specified user Principal has the specified - * security role, within the context of this Realm; otherwise return - * false. This will be true when - * an associated role Principal can be found whose getName - * method returns a String equalling the specified role. - * @param princi
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
markt 2005/05/10 13:51:43 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Fix NPE when POST size exceeds limit set by maxPostSize. Also remove log attribute since it is never used. Revision ChangesPath 1.24 +4 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Request.java 28 Apr 2005 12:30:38 - 1.23 +++ Request.java 10 May 2005 20:51:43 - 1.24 @@ -68,7 +68,7 @@ import org.apache.catalina.util.RequestUtil; import org.apache.catalina.util.StringManager; import org.apache.catalina.util.StringParser; -import org.apache.commons.logging.Log; + /** * Wrapper object for the Coyote request. @@ -350,11 +350,6 @@ */ protected String localName = null; -/** After the request is mapped to a ServletContext, we can also - * map it to a logger. - */ -protected Log log=null; - // - Public Methods /** @@ -399,7 +394,6 @@ requestedSessionCookie = false; requestedSessionId = null; requestedSessionURL = false; -log = null; parameterMap.setLocked(false); parameterMap.clear(); @@ -2347,7 +2341,8 @@ if (len > 0) { int maxPostSize = connector.getMaxPostSize(); if ((maxPostSize > 0) && (len > maxPostSize)) { -log.info(sm.getString("coyoteRequest.postTooLarge")); +context.getLogger().info +(sm.getString("coyoteRequest.postTooLarge")); throw new IllegalStateException("Post too large"); } try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java CoyoteAdapter.java
remm2004/06/24 09:20:21 Modified:catalina/src/share/org/apache/catalina/valves RequestFilterValve.java ErrorReportValve.java PersistentValve.java AccessLogValve.java catalina/src/share/org/apache/catalina/authenticator Constants.java catalina/src/share/org/apache/catalina/connector Request.java CoyoteAdapter.java Log: - Last (?) round of casts removal. Revision ChangesPath 1.7 +4 -14 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java Index: RequestFilterValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/RequestFilterValve.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RequestFilterValve.java 23 Jun 2004 08:24:56 - 1.6 +++ RequestFilterValve.java 24 Jun 2004 16:20:20 - 1.7 @@ -22,7 +22,6 @@ import java.util.ArrayList; import javax.servlet.ServletException; -import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.connector.Request; @@ -269,12 +268,8 @@ // Check the deny patterns, if any for (int i = 0; i < denies.length; i++) { if (denies[i].match(property)) { -ServletResponse sres = response.getResponse(); -if (sres instanceof HttpServletResponse) { -HttpServletResponse hres = (HttpServletResponse) sres; -hres.sendError(HttpServletResponse.SC_FORBIDDEN); -return; -} +response.sendError(HttpServletResponse.SC_FORBIDDEN); +return; } } @@ -293,12 +288,7 @@ } // Deny this request -ServletResponse sres = response.getResponse(); -if (sres instanceof HttpServletResponse) { -HttpServletResponse hres = (HttpServletResponse) sres; -hres.sendError(HttpServletResponse.SC_FORBIDDEN); -return; -} +response.sendError(HttpServletResponse.SC_FORBIDDEN); } 1.20 +3 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java Index: ErrorReportValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ErrorReportValve.java 23 Jun 2004 13:51:34 - 1.19 +++ ErrorReportValve.java 24 Jun 2004 16:20:20 - 1.20 @@ -127,10 +127,8 @@ ; } -ServletResponse sresponse = (ServletResponse) response; -if (sresponse instanceof HttpServletResponse) -((HttpServletResponse) sresponse).sendError -(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); +response.sendError +(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } 1.8 +4 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/PersistentValve.java Index: PersistentValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/PersistentValve.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PersistentValve.java 23 Jun 2004 13:51:34 - 1.7 +++ PersistentValve.java 24 Jun 2004 16:20:20 - 1.8 @@ -21,7 +21,6 @@ import java.io.IOException; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -102,7 +101,7 @@ StandardHost host = (StandardHost) getContainer(); Context context = request.getContext(); if (context == null) { -((HttpServletResponse) response.getResponse()).sendError +response.sendError (HttpServletResponse.SC_INTERNAL_SERVER_ERROR, sm.getString("standardHost.noContext")); return; @@ -113,8 +112,7 @@ (context.getLoader().getClassLoader()); // Update the session last access time for our session (if any) -HttpServletRequest hreq = (HttpServletRequest) request.getRequest(); -String sessionId = hreq.getRequestedSessionId(); +String sessionId = request.getRequestedSessionId();
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java Constants.java
remm2004/07/15 07:31:47 Modified:catalina/src/share/org/apache/catalina/connector Request.java Constants.java Log: - Remove get/setAuthorization, which is just a direct shotcut for a getHeader (= it's useless). Revision ChangesPath 1.6 +1 -18 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java Index: Request.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Request.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Request.java 7 Jul 2004 16:34:16 - 1.5 +++ Request.java 15 Jul 2004 14:31:47 - 1.6 @@ -430,23 +430,6 @@ /** - * Return the authorization credentials sent with this request. - */ -public String getAuthorization() { -return (coyoteRequest.getHeader(Constants.AUTHORIZATION_HEADER)); -} - -/** - * Set the authorization credentials sent with this request. - * - * @param authorization The new authorization credentials - */ -public void setAuthorization(String authorization) { -// Not used -} - - -/** * Associated Catalina connector. */ protected Connector connector; 1.4 +0 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Constants.java Index: Constants.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Constants.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Constants.java23 Jun 2004 08:24:57 - 1.3 +++ Constants.java15 Jul 2004 14:31:47 - 1.4 @@ -39,11 +39,6 @@ public static final int PROCESSOR_ACTIVE = 1; /** - * Default header names. - */ -public static final String AUTHORIZATION_HEADER = "authorization"; - -/** * SSL Certificate Request Attributite. */ public static final String SSL_CERTIFICATE_ATTR = "org.apache.coyote.request.X509Certificate"; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 6:27 PM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java > luehe 2004/08/05 18:27:50 > > Modified:catalina/src/share/org/apache/catalina/connector > Request.java > Log: > Avoid allocating SimpleDateFormat[] for each request. Instead, declare SimpleDateFormat[] as static and use static initializer to initialize it. > -1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads accessing them. That's why they were instance variables, so that one one thread would ever be accessing them. > This is consistent with SimpleDateFormat[] in org.apache.tomcat.util.http.FastHttpDateFormat. Which is well known to be broken ;-). This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Bill Barker wrote: - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 6:27 PM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java luehe 2004/08/05 18:27:50 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Avoid allocating SimpleDateFormat[] for each request. Instead, declare SimpleDateFormat[] as static and use static initializer to initialize it. -1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads accessing them. That's why they were instance variables, so that one one thread would ever be accessing them. This is consistent with SimpleDateFormat[] in org.apache.tomcat.util.http.FastHttpDateFormat. Which is well known to be broken ;-). There's a misunderstanding about the design (I don't think FastHttpDateFormat is that broken anyway ;) ). The formats passed in argument has to be thread local, and FHDF won't sync. So -1 too. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
REMOVE MY NAME FROM THIS MAILING LIST IMMEDIATELY ! DO YOU NOT HAVE ANY CONTROL OF YOUR MAILING LISTS ??? Remy Maucherat <[EMAIL PROTECTED]> 09.08.2004 12:42 Please respond to "Tomcat Developers List" <[EMAIL PROTECTED]> To Tomcat Developers List <[EMAIL PROTECTED]> cc Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java Bill Barker wrote: >- Original Message - >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, August 05, 2004 6:27 PM >Subject: cvs commit: >jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector >Request.java > > > > >>luehe 2004/08/05 18:27:50 >> >> Modified:catalina/src/share/org/apache/catalina/connector >>Request.java >> Log: >> Avoid allocating SimpleDateFormat[] for each request. Instead, declare >> >> >SimpleDateFormat[] as static and use static initializer to initialize it. > > > >-1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads >accessing them. That's why they were instance variables, so that one one >thread would ever be accessing them. > > > >> This is consistent with SimpleDateFormat[] in >> >> >org.apache.tomcat.util.http.FastHttpDateFormat. > >Which is well known to be broken ;-). > > There's a misunderstanding about the design (I don't think FastHttpDateFormat is that broken anyway ;) ). The formats passed in argument has to be thread local, and FHDF won't sync. So -1 too. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Remy Maucherat wrote: Bill Barker wrote: - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 6:27 PM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java luehe 2004/08/05 18:27:50 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Avoid allocating SimpleDateFormat[] for each request. Instead, declare SimpleDateFormat[] as static and use static initializer to initialize it. -1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads accessing them. That's why they were instance variables, so that one one thread would ever be accessing them. OK. This is consistent with SimpleDateFormat[] in org.apache.tomcat.util.http.FastHttpDateFormat. Which is well known to be broken ;-). There's a misunderstanding about the design (I don't think FastHttpDateFormat is that broken anyway ;) ). The formats passed in argument has to be thread local, and FHDF won't sync. So -1 too. actually, FHDF.parseDate() does sync around SimpleDateFormat.parse() if the "threadLocalformats" passed to it is null, in which case it falls back to its own static "formats" (notice that in this case, FHDF.internalParseDate() is within the synchronized block): public static final long parseDate(String value, DateFormat[] threadLocalformats) { if (threadLocalformats != null) { date = internalParseDate(value, threadLocalformats); synchronized (parseCache) { updateCache(parseCache, value, date); } } else { synchronized (parseCache) { date = internalParseDate(value, formats); updateCache(parseCache, value, date); } } } The DateFormat[] passed in from Request.parseDate() is *identical* to the static "formats" in FHDF, so why are we not just passing "null" from Request.parseDate() and leverage FHDF.formats (instead of having each Request object provide its own SimpleDateFormat[] instance var)? Is it to avoid that the potentially expensive date parsing is performed inside the synchronized block? Thanks, Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Jan Luehe wrote: Remy Maucherat wrote: Bill Barker wrote: - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 05, 2004 6:27 PM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java luehe 2004/08/05 18:27:50 Modified:catalina/src/share/org/apache/catalina/connector Request.java Log: Avoid allocating SimpleDateFormat[] for each request. Instead, declare SimpleDateFormat[] as static and use static initializer to initialize it. -1. SimpleDateFormat isn't thread-safe, so you can't have multiple threads accessing them. That's why they were instance variables, so that one one thread would ever be accessing them. OK. This is consistent with SimpleDateFormat[] in org.apache.tomcat.util.http.FastHttpDateFormat. Which is well known to be broken ;-). There's a misunderstanding about the design (I don't think FastHttpDateFormat is that broken anyway ;) ). The formats passed in argument has to be thread local, and FHDF won't sync. So -1 too. actually, FHDF.parseDate() does sync around SimpleDateFormat.parse() if the "threadLocalformats" passed to it is null, in which case it falls back to its own static "formats" (notice that in this case, FHDF.internalParseDate() is within the synchronized block): public static final long parseDate(String value, DateFormat[] threadLocalformats) { if (threadLocalformats != null) { date = internalParseDate(value, threadLocalformats); synchronized (parseCache) { updateCache(parseCache, value, date); } } else { synchronized (parseCache) { date = internalParseDate(value, formats); updateCache(parseCache, value, date); } } } The DateFormat[] passed in from Request.parseDate() is *identical* to the static "formats" in FHDF, so why are we not just passing "null" from Request.parseDate() and leverage FHDF.formats (instead of having each Request object provide its own SimpleDateFormat[] instance var)? Is it to avoid that the potentially expensive date parsing is performed inside the synchronized block? Yes, it's sort of obvious ;) How much memory does a formatter uses ? I'd like to point out that pasing of dates will happen relatively often (last modified headers in requests, etc). To summarize: - passing null is correct, but syncs (otherwise it wouldn't work) - passing a thread local formatter is correct - passing a shared formatter isn't correct (as there would be thread safety issues) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
[EMAIL PROTECTED] The DateFormat[] passed in from Request.parseDate() is *identical* to the static "formats" in FHDF, so why are we not just passing "null" from Request.parseDate() and leverage FHDF.formats (instead of having each Request object provide its own SimpleDateFormat[] instance var)? Is it to avoid that the potentially expensive date parsing is performed inside the synchronized block? Yes, it's sort of obvious ;) How much memory does a formatter uses ? I'd like to point out that pasing of dates will happen relatively often (last modified headers in requests, etc). To summarize: - passing null is correct, but syncs (otherwise it wouldn't work) - passing a thread local formatter is correct - passing a shared formatter isn't correct (as there would be thread safety issues) Agreed. I stumbled across mem usage as I was running a stress test under OptimizeIt (and eventually getting OutOfMemory errors from Servlets), and noticed a large number of char[] instances had been allocated due to each Request creating its own SimpleDateFormat[]. Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Jan Luehe wrote: Agreed. I stumbled across mem usage as I was running a stress test under OptimizeIt (and eventually getting OutOfMemory errors from Servlets), and noticed a large number of char[] instances had been allocated due to each Request creating its own SimpleDateFormat[]. You get an OOM because of it ? I think not, though. You need to speak hard numbers here (because syncing will have its own cost, esp on a large server that your company makes so much cash on ;) ): how many bytes are allocated by each formatter ? Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Remy Maucherat wrote: Jan Luehe wrote: Agreed. I stumbled across mem usage as I was running a stress test under OptimizeIt (and eventually getting OutOfMemory errors from Servlets), and noticed a large number of char[] instances had been allocated due to each Request creating its own SimpleDateFormat[]. You get an OOM because of it ? I think not, though. No, definitely not because of this, but i'm in the process of eliminating any redundant allocations. I thought SimpleDateFormat with a constant pattern was a candidate, but as Bill and you pointed out (and the javadocs now mention), it is not thread-safe. You need to speak hard numbers here (because syncing will have its own cost, esp on a large server that your company makes so much cash on ;) ): Agreed. :) how many bytes are allocated by each formatter ? I'll get back to you on this. For the time being, I'll revert my previous change. Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 01, 2005 3:36 AM Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java > remm2005/04/01 03:36:52 > > Modified:catalina/src/share/org/apache/catalina/realm > GenericPrincipal.java JAASRealm.java >catalina/src/share/org/apache/catalina/connector > Request.java > Log: > - Commit my proposed changes to GenericPrincipal, and use it to remove the role map in the JAAS realm. > - Let me know if I did it wrong ;) > Cluster has code to serialize GP that will need to be updated (but I don't see a good way myself off the top of my head :(). But with this, at least Cluster+JAAS is less broken than it was before. This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Request.java
Bill Barker wrote: remm2005/04/01 03:36:52 Modified:catalina/src/share/org/apache/catalina/realm GenericPrincipal.java JAASRealm.java catalina/src/share/org/apache/catalina/connector Request.java Log: - Commit my proposed changes to GenericPrincipal, and use it to remove the role map in the JAAS realm. - Let me know if I did it wrong ;) Cluster has code to serialize GP that will need to be updated (but I don't see a good way myself off the top of my head :(). But with this, at least Cluster+JAAS is less broken than it was before. I didn't think about that kind of issues at all. It's one of the reasons I didn't do it before 5.5.9 ;) Maybe it would be good to standardize on JAAS + JAAC for the next big release. When serializing the session, the principal is marked as transient. I don't know much besides that. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]