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

Issuing access token with authorisation code fails using openid scope

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 13.5.2
    • Fix Version/s: 13.5.2
    • Component/s: OpenID Connect
    • Labels:
    • Needs backport:
      No
    • Needs QA verification:
      No
    • Functional tests:
      Yes
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      when issuing access token using grant type as authorisation code and scope as openid we get internal server error as response with http 400. This works fine when using any other scope like profile or email.

      How to reproduce the issue

      set up openid ouath2 service and client with scope as openid
      generate auth code :
      http://openam.example.com:8081/openam/oauth2/authorize?client_id=clientOIDC&client_secret=password&username=user.0&password=password&response_type=code&redirect_uri=http://fake.com&scope=openid&realm=myrealm&nonce=1234

      use this code to get access token :

      curl -X POST \
      'http://openam.example.com:8081/openam/oauth2/access_token?realm=myrealm' \
      -H 'authorization: Basic Y2xpZW50T0lEQzpwYXNzd29yZA==' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'postman-token: 63b81edc-24a0-fd22-ec1b-bb77e09d790c' \
      -d 'grant_type=authorization_code&redirect_uri=http%3A%2F%2Ffake.com&nonce=1234&code=9d32f868-dc3a-440e-9633-ea29c458c57d’

      Error

      HTTP response:
      status=
      400 Bad Request
      headers= 
      Pragma: no-cache
      Cache-Control: no-store
      Date: Mon, 31 Jul 2017 09:00:21 GMT
      Accept-Ranges: bytes
      Server: Restlet-Framework/2.3.4
      Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
      Content-Type: application/json
      Transfer-Encoding: chunked
      Connection: close
      
      body=
      {"error_description":"Internal Server Error","error":"server_error"}
      <<<<<<<<<<<<<<<<<<<<<<<<<
      
      

        Attachments

        1. debug.zip
          32 kB
        2. test.sh
          2 kB

          Issue Links

            Activity

              People

              • Assignee:
                quentin.castel Quentin CASTEL [X] (Inactive)
                Reporter:
                narita.saxena Narita Saxena
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: