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

If saved consent is not enabled an error message is logged for every OAuth request

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.0
    • Component/s: oauth2, performance
    • Labels:
      None
    • Needs backport:
      No
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      If "save consent" is not enabled in the OAuth 2 provider settings then an error message is logged on every authorization POST request:

      OAuth2Provider:04/26/2018 05:13:19:200 PM BST: Thread[http-nio-8080-exec-4,5,main]: TransactionId[4afdb936-6968-4286-b72e-677596ca7635-96695]
      ERROR: Can't save consent as it is not configured properly for the realm:/

      How to reproduce the issue

      1. Configure an OAuth 2 provider and client
      2. Ensure "save consent" is turned off
      3. Make an OAuth 2 request
      4. Login as demo and approve the request
      5. Check the OAuth2Provider debug log
      Expected behaviour
      No error messages in the log
      
      Current behaviour
      Error message in the log after every request
      

      Work around

      None

      Code analysis

      org.forgerock.oauth2.core.RealmOAuth2ProviderSettings#getSavedConsent
      if (isSaveConsentEnabled()) {
          ....
      } else {
          logger.error("Can't save consent as it is not configured properly for the realm:" + realm);
      }

      This should be changed to message-level debug and say something like "Can't save consent as it is not enabled for the realm: {}".

        Attachments

          Activity

            People

            • Assignee:
              neil.madden Neil Madden
              Reporter:
              neil.madden Neil Madden
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: