Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-592

Wrong domain name in cookies when running webapp on localhost with SSO-enabled Crowd

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unsolved Mysteries
    • Medium
    • None
    • 1.1.2
    • SSO
    • None
    • JBoss 4.2-GA

    Description

      I have configured Crowd to set the Cookie domain to the corporate domain name. When I installed the demo on my localhost it din't work. The authentication was performed successfully, but the demo just redirected me back to it's login page. The demo's log file stated:

      13:00:24,207 INFO [STDOUT] 13:00:24,207 INFO atlassian.crowd.integration.http.VerifyTokenFilter: Authentication is not valid, redirecting to: http://localhost:8080/demo

      I traced the problem to processClientCookieDomain(Cookie tokenCookie) in the HttpAuthenticator class.

      If the Crowd server has been configured to use f.i. ".domain.com" as cookie domain, this is used in the cookie. The problem is that my browser uses localhost and it probably ignores the cookie completely. It will definitely not sent the cookie back to localhost when the domain is set to ".domain.com", thus the application will handle the user as not authenticated.

      When I removed the ".domain.com" setting from the Crowd configuration, the cookie was created with no domain set and I was able to sign in to the demo application.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              865f90db8294 Lars Preben Sørsdahl
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: