Results 1 to 3 of 3

Thread: Cross domain cookies

  1. #1
    Join Date
    Jan 2008
    Posts
    248

    Default Cross domain cookies

    Hi,

    I want a user to be able to use a session across multiple sub domains. I understand that by default cookies are subdomain specific and in order to have a session work across subdomains, the cookie should be set as .domain.com in stead of sub.domain.com.

    What I'm not sure about is how to do this. Should I do this by modifying Spring Security or is this a web server kind of configuration?

    If I have to modify Spring Security for this, can I do this in a central place? Any suggestions for this? There doesn't seem to be a lot of information on the subject.

    Kind regards,

    Marc

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    There's a section on session management in the FAQ.

    Session management is not controlled by Spring Security, so it has no control over the domain setting for the session cookie. If you're using Tomcat, then you can use the sessionCookieDomain setting.
    Spring - by Pivotal
    twitter @tekul

  3. #3
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    What cookie are you trying to set that needs to be shared across multiple domains? If it is the JSESSIONID, then that is specified by your container (i.e. tomcat).
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •