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

HTTP 400 error with /sessions when using API explorer fragment in the URL

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.5.0
    • Fix Version/s: None
    • Component/s: API descriptor
    • Labels:
      None
    • Environment:
      ForgeRock Access Management 6.5.0-SNAPSHOT Build 3097c3a4f4 (2018-October-08 08:36)

      Description

      Bug description

      With AM set up as per the description in OPENAM-13750, get and modify the API description for sessions, and view it through Swagger UI.

      The fragment used in the API descriptor causes the endpoint to return HTTP 400 Bad Request:

      $ curl -X GET "http://openam.example.com:8080/openam/json/realms/root/sessions#3.1_query_filter?_queryFilter=realm%20eq%20%22%2F%22" -H  "accept: application/json" -H  "Accept-API-Version: resource=3.1"  -H "iPlanetDirectoryPro: lixAMYkbx24dLuMYO3nI_pRV6IY.*AAJTSQACMDEAAlNLABx1dVBaYk9ZVDAvNU9lTUR0R1RjbFhUNXFUNlE9AAR0eXBlAANDVFMAAlMxAAA.*"
      {"code":400,"reason":"Bad Request","message":"The resource collection /json/realms/root/sessions cannot be read"}
      
      $ curl -X GET "http://openam.example.com:8080/openam/json/realms/root/sessions?_queryFilter=realm%20eq%20%22%2F%22" -H  "accept: application/json" -H  "Accept-API-Version: resource=3.1"  -H "iPlanetDirectoryPro: lixAMYkbx24dLuMYO3nI_pRV6IY.*AAJTSQACMDEAAlNLABx1dVBaYk9ZVDAvNU9lTUR0R1RjbFhUNXFUNlE9AAR0eXBlAANDVFMAAlMxAAA.*"
      {"result":[{"_rev":"1524687720","username":"amadmin","universalId":"id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org","realm":"/","sessionHandle":"shandle:YHuGuXaFT4pRgMJe96d0-bDJmGE.*AAJTSQACMDEAAlNLABx3YkRINlBjUjJtS21CMGx6NzNPZ2xEY1ZMWVk9AAR0eXBlAANDVFMAAlMxAAA.*","latestAccessTime":"2018-10-11T10:31:57.883Z","maxIdleExpirationTime":"2018-10-11T11:01:57Z","maxSessionExpirationTime":"2018-10-11T12:31:57Z"},{"_rev":"1608969401","username":"amadmin","universalId":"id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org","realm":"/","sessionHandle":"shandle:5eQ2M--JmqzK-OiHdTfvM04EgVk.*AAJTSQACMDEAAlNLABx1dVBaYk9ZVDAvNU9lTUR0R1RjbFhUNXFUNlE9AAR0eXBlAANDVFMAAlMxAAA.*","latestAccessTime":"2018-10-11T11:07:51.352Z","maxIdleExpirationTime":"2018-10-11T11:37:51Z","maxSessionExpirationTime":"2018-10-11T12:37:01Z"}],"resultCount":2,"pagedResultsCookie":null,"totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}

      How to reproduce the issue

      Expected behaviour

      Including a fragment like #3.1_query_filter in the URL should affect the result.

      Current behaviour

      HTTP 400 Bad request with an unhelpful error in the response:

      {
        "code": 400,
        "reason": "Bad Request",
        "message": "The resource collection /json/realms/root/sessions cannot be read"
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Mark Mark Craig
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: