[pubcookie-dev] Bookmarking

Bradley Schwoerer schwoerb at doit.wisc.edu
Thu Jun 23 21:57:22 PDT 2005


To handle clients bookmarking the login server for the apps, I think I 
came up with an interesting approach.  I want feedback as if this is 
something that should be coded into pubcookie itself or are there other 
ways that are more appropriate.

This approach is not fully tested yet.  On the appserver side they 
append a querystring where someone should be directed for login to the 
PubccokieLogin directive like this:
PubcookieLogin 
https://loginserver.example.edu/?appurl=app.example.edu/protecteddir/

On the loginserver it is using mod_rewrite with the following rules:

RewriteEngine on
RewriteCond %{REQUEST_URI}      (^/$|^/index\.cgi)
RewriteCond %{REQUEST_METHOD}   ^GET
RewriteCond %{QUERY_STRING}     ^appurl=(.*)$
RewriteCond %{HTTP_COOKIE}      !pubcookie_g_req=
RewriteRule ^.*                 https://%1                  [R,NE]

These rules look to see if the cgi is called using the GET method and a 
querystring as shown above.  It then checks to see if the 
pubcookie_g_req cookie is set.  If the cookie is not set it will do an 
external redirect to the parameter that was passed in the querystring. 
This will cause mod_pubcookie to send the request back to the login 
server with the cookie set.  Issues that I see are people that do not 
have cookies enabled could just bounce back and forth.  More mod_rewrite 
magic could detect for that too.

As asked earlier, is this something that belongs in pubcookie, or am I 
off in left field somewhere.  Also, are there any other recomendations 
to handle this.

-Bradley Schwoerer


More information about the pubcookie-dev mailing list