httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40136] - bug releted to loadbalancing using mod_proxy, mod_proxy_balancer and mod_proxy_ajp
Date Tue, 08 Aug 2006 19:18:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40136>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40136





------- Additional Comments From rpluem@apache.org  2006-08-08 19:18 -------
(In reply to comment #4)
> I tried this solution and I didn't see anything in the SingleSignOn class, so  

To be honest I did only a very quick view into the Tomcat sources and did not
actually work out a solution. This is left as an exercise to the reader :-).

So maybe some parts of my remarks aren't correct. After having a brief view
again I would say that the following completly untested patch (don't even know
if it compiles!) should work:

--- AuthenticatorBase.java.orig 2004-08-29 02:14:04.000000000 +0200
+++ AuthenticatorBase.java      2006-08-08 21:15:55.000000000 +0200
@@ -36,6 +36,7 @@

 import org.apache.catalina.Authenticator;
 import org.apache.catalina.Container;
+import org.apache.catalina.Engine;
 import org.apache.catalina.Context;
 import org.apache.catalina.HttpRequest;
 import org.apache.catalina.HttpResponse;
@@ -785,6 +786,32 @@
     }


+   /**
+     * Retrieve the enclosing Engine.
+     *
+     * @return an Engine object (or null).
+     */
+    protected Engine getEngine() {
+        Engine e = null;
+        for (Container c = getContainer(); e == null && c != null ; c =
c.getParent()) {
+            if (c != null && c instanceof Engine) {
+                e = (Engine)c;
+            }
+        }
+        return e;
+    }
+
+
+    /**
+     * Retrieve the JvmRoute for the enclosing Engine.
+     * @return the JvmRoute or null.
+     */
+    protected String getJvmRoute() {
+        Engine e = getEngine();
+        return e == null ? null : e.getJvmRoute();
+    }
+
+
     /**
      * Register an authenticated Principal and authentication type in our
      * request, in the current session (if there is one), and with our
@@ -840,6 +867,10 @@
             HttpServletResponse hres =
                 (HttpServletResponse) response.getResponse();
             ssoId = generateSessionId();
+            String jvmRoute = getJvmRoute();
+            if (jvmRoute != null) {
+                ssoId += '.' + jvmRoute;
+            }
             Cookie cookie = new Cookie(Constants.SINGLE_SIGN_ON_COOKIE, ssoId);
             cookie.setMaxAge(-1);
             cookie.setPath("/");


At least it should create a JSESSIONIDSSO cookie with the jvm route added to it
and thenm your original configuration should work.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message