Re: [Zope] Setting a session's domain

2005-11-15 Thread Jonathan
- Original Message - 
From: "Pablo Ziliani" <[EMAIL PROTECTED]>

To: "Zope" 
Sent: Tuesday, November 15, 2005 8:15 AM
Subject: [Zope] Setting a session's domain



Hi all,
I'm developing a site that has multiple subdomains (i.e.: 
http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody 
point me how can I get the session to be shared across these different 
subdomains? Unless someone can give me an opposite advise, I think I need 
to specify a "domain" to the cookie which is trivial for regular cookies 
but I just can't find how to do it with sessions (notice that I am I'm 
using Zope's regular request.SESSION).


How about creating subfolders, one for each subdomain, and then use URL 
rewriting to point to the required subfolder.  The top level folder would 
contain your login/authenication/session info which could be accessed via 
acquisition.



Jonathan 



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Setting a session's domain

2005-11-15 Thread Pablo Ziliani

Jonathan wrote:


Hi all,
I'm developing a site that has multiple subdomains (i.e.: 
http://atlanta.website.com, http://nyc.website.com, etc.). Can 
anybody point me how can I get the session to be shared across these 
different subdomains? Unless someone can give me an opposite advise, 
I think I need to specify a "domain" to the cookie which is trivial 
for regular cookies but I just can't find how to do it with sessions 
(notice that I am I'm using Zope's regular request.SESSION).


How about creating subfolders, one for each subdomain, and then use 
URL rewriting to point to the required subfolder.  The top level 
folder would contain your login/authenication/session info which could 
be accessed via acquisition.


Hello Jonathan and thanks for your help,

Actually, the site is working. I have something close to what you said 
with the difference that I am getting the rewritings go to the same 
folder. Unfortunately this doesn't work because of the way that 
session's cookies are served by default in Zope (including the 
subdomain). In other words, no matter how you construct your internal 
folder hierarchy, browsers won't submit a session cookie from a 
subdomain to another. Cookies specification define a keyword to set the 
domain from which the cookie should be submitted, but I don't know how 
to set it for Zope's default session. Or if I'm completely missing 
something.


Thanks,
Pablo

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Setting a session's domain

2005-11-15 Thread Jonathan


- Original Message - 
From: "Pablo Ziliani" <[EMAIL PROTECTED]>

To: "Jonathan" <[EMAIL PROTECTED]>; "Zope" 
Sent: Tuesday, November 15, 2005 8:53 AM
Subject: Re: [Zope] Setting a session's domain



Jonathan wrote:


Hi all,
I'm developing a site that has multiple subdomains (i.e.: 
http://atlanta.website.com, http://nyc.website.com, etc.). Can 
anybody point me how can I get the session to be shared across these 
different subdomains? Unless someone can give me an opposite advise, 
I think I need to specify a "domain" to the cookie which is trivial 
for regular cookies but I just can't find how to do it with sessions 
(notice that I am I'm using Zope's regular request.SESSION).


How about creating subfolders, one for each subdomain, and then use 
URL rewriting to point to the required subfolder.  The top level 
folder would contain your login/authenication/session info which could 
be accessed via acquisition.


Hello Jonathan and thanks for your help,

Actually, the site is working. I have something close to what you said 
with the difference that I am getting the rewritings go to the same 
folder. Unfortunately this doesn't work because of the way that 
session's cookies are served by default in Zope (including the 
subdomain). In other words, no matter how you construct your internal 
folder hierarchy, browsers won't submit a session cookie from a 
subdomain to another. Cookies specification define a keyword to set the 
domain from which the cookie should be submitted, but I don't know how 
to set it for Zope's default session. Or if I'm completely missing 
something.


try googling:   site:www.zope.org set cookie domain


Jonathan



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Setting a session's domain

2005-11-15 Thread Dieter Maurer
Pablo Ziliani wrote at 2005-11-15 10:15 -0300:
>I'm developing a site that has multiple subdomains (i.e.: 
>http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody 
>point me how can I get the session to be shared across these different 
>subdomains? Unless someone can give me an opposite advise, I think I 
>need to specify a "domain" to the cookie which is trivial for regular 
>cookies but I just can't find how to do it with sessions (notice that I 
>am I'm using Zope's regular request.SESSION).

The "Browser Id Manager" ("browser_id_manager" in your Zope "Root Folder")
is responsible for the session cookies. It has a configuration option
to choose the cookie domain.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Setting a session's domain

2005-11-15 Thread Pablo Ziliani

Dieter Maurer wrote:


Pablo Ziliani wrote at 2005-11-15 10:15 -0300:
 

I'm developing a site that has multiple subdomains (i.e.: 
http://atlanta.website.com, http://nyc.website.com, etc.). Can anybody 
point me how can I get the session to be shared across these different 
subdomains? Unless someone can give me an opposite advise, I think I 
need to specify a "domain" to the cookie which is trivial for regular 
cookies but I just can't find how to do it with sessions (notice that I 
am I'm using Zope's regular request.SESSION).
   



The "Browser Id Manager" ("browser_id_manager" in your Zope "Root Folder")
is responsible for the session cookies. It has a configuration option
to choose the cookie domain.
 

YES! that's the one I was looking for (I can't believe that I haven't 
seen it before).


Thanks a lot Dieter,
Pablo

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )