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

Crowd Spring Integration does not cache token validation results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • None
    • Integration/Connectors, SSO
    • None

    Description

      There is a bug in the Crowd Spring Integration library that causes applications using it to make a remote request to the Crowd server to validate the token for each request, even when the library is configured to cache the validation results.

      Steps to reproduce

      1. Set up a web app that uses Spring Security and the Crowd Spring Integration libraries with SSO enabled (instructions: https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Spring+Security ). Make sure the property 'session.validationinterval' is set to a positive integer (e.g., 30 minutes), and 'session.lastvalidation' is also set, both in the crowd.properties in the new application.
      2. Authenticate successfully to create a SSO token.
      3. Reload the page in the application.

      Expected results

      After the first successful validation of the token, the result is cached for a certain period, and no more requests are made to the remote Crowd server in that period for that token.

      Observed results

      All requests made to the application cause a remote request to the remote Crowd server to validate the token.

      Workaround

      The bug is specific to the Spring Integration, and does not affect other applications that integrate with Crowd SSO using the SOAP or the REST API directly (they go through HttpAuthenticatorImpl and CrowdHttpAuthenticatorImpl respectively, which correctly cache the token validation results). Until a fix is available, applications that require caching may discard the Spring Integration libraries provided with Crowd and develop their own integration using the REST API (CrowdHttpAuthenticatorImpl). The SOAP API is not recommended anymore.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dberrueta Diego Berrueta
              Votes:
              9 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated: