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

CTSBlacklist performs initial (and most expensive) search twice

    Details

    • Target Version/s:
    • Needs backport:
      No
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      No (add reasons in the comment)

      Description

      Bug description

      On AM start-up, CTSBlacklist performs two searches for CTS blacklist entries which were created before the AM server started. The first is performed when the listener (either BloomFilterBlacklist or CachingBlacklist) is added (findEntriesBlacklistedSince is passed 0 as a literal). The second is performed when the PollTask is first run - This is because lastPollTime will be 0 initially.

      How to reproduce the issue

      Launch an instance of AM and observe 2x searches for OAuth2 blacklist entries created since 0 - This can be seen in the DJ access logs.

      Expected behaviour
      One search is performed for entries created after 1st Jan 1970.
      
      Current behaviour
      Two searches are performed for entries created after 1st Jan 1970.
      

      Work around

      N/A.

      Code analysis

      • lastPollTime could be tracker per listener.
      • The first search (which initialises the listener) could update that listener's lastPollTime.

        Attachments

          Activity

            People

            • Assignee:
              david.luna@forgerock.com David Luna
              Reporter:
              craig.mcdonnell Craig McDonnell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: