Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-14200

Social auth modules do not work when AM is installed into the root context

    Details

    • Target Version/s:
    • Needs backport:
      Yes
    • Support Ticket IDs:
    • Verified Version/s:
    • Needs QA verification:
      Yes
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      When AM is installed into the root context, the social auth modules (not tree nodes) do not work.

      How to reproduce the issue

      1. Install AM into the root context of your container
      2. Configure a social auth module - e.g. by running the Google wizard in the root realm
      3. Try to log in using that newly created auth chain
      Expected behaviour

      You should be able to log in.

      Current behaviour

      After redirect from Google the request fails with "Request not valid !".

      Work around

      Adding a dummy parameter a=b to the authentication request seems to let it get a bit further (but it still fails for me, still investigating why).

      Code analysis

      org.forgerock.openam.authentication.modules.social.AbstractSocialAuthLoginModule#addDomainCookiesToResponse calls down to org.forgerock.openam.authentication.modules.oauth2.OAuthUtil#getOriginalUrl to get the original URL to set as the "ORIG_URL" cookie before redirecting to Google. When AM is installed in the root context, this method returns an empty string.

      After the redirect back from Google, we end up in org.forgerock.openam.authentication.modules.oauth2.OAuthProxy#continueAuthentication which fails because the ORIG_URL cookie value is empty.

        Attachments

          Activity

            People

            • Assignee:
              peter.major Peter Major [X] (Inactive)
              Reporter:
              neil.madden Neil Madden
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0h
                0h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h