Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-16882

Relationship edge vertex query filters broken by DS version update in commit 8079a81e92

    XMLWordPrintable

Details

    Description

      Query filters on relationship edges/vertices are broken after the DS version update in the following commit when using External DS:

      • 8079a81e924 - Update to new DS release 7.2.0-20210707093059-ee30d9655156adf7f4826a2439594212e495362f

      I noticed this first for internal roles and this was also reproducible when I tested with org model members. Not all query filters are broken, but most appear to be.

      Non-broken queries include:

      _queryFilter=true
      _queryFilter=_refResourceId eq "bjensen"

       

      Steps to Reproduce

      • Start IDM
      • Create user bjensen and grant them the openidm-authorized role
      • Make the following query
        curl --request  GET http://localhost:8080/openidm/internal/role/openidm-authorized/authzMembers?_queryFilter=userName eq "bjensen" \
        --header 'X-OpenIDM-Username: openidm-admin' \
        --header 'X-OpenIDM-Password: openidm-admin'
        

        Expected response from commit 7ed5daafb6

        {
            "result": [
                {
                    "_id": "5e6a0739-28d7-48e3-8865-876ecce2bd43",
                    "_rev": "000000007b059ba2",
                    "_ref": "managed/user/bjensen",
                    "_refResourceCollection": "managed/user",
                    "_refResourceId": "bjensen",
                    "_refProperties": {
                        "_id": "5e6a0739-28d7-48e3-8865-876ecce2bd43",
                        "_rev": "000000007b059ba2"
                    }
                }
            ],
            "resultCount": 1,
            "pagedResultsCookie": null,
            "totalPagedResultsPolicy": "NONE",
            "totalPagedResults": -1,
            "remainingPagedResults": -1
        }

        Actual Response starting with commit 8079a81e92

        {
          "result": [],
          "resultCount": 0,
          "pagedResultsCookie": null,
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
        }

      We can still query the users authzRoles:

      curl --location --request GET 'http://localhost:8080/openidm/managed/user/bjensen/authzRoles?_queryFilter=true' \
      --header 'X-OpenIDM-Username: openidm-admin' \
      --header 'X-OpenIDM-Password: openidm-admin' 
      {
          "result": [
              {
                  "_id": "5e6a0739-28d7-48e3-8865-876ecce2bd43",
                  "_rev": "000000007b059ba2",
                  "_ref": "managed/user/bjensen",
                  "_refResourceCollection": "managed/user",
                  "_refResourceId": "bjensen",
                  "_refProperties": {
                      "_id": "5e6a0739-28d7-48e3-8865-876ecce2bd43",
                      "_rev": "000000007b059ba2"
                  }
              }
          ],
          "resultCount": 1,
          "pagedResultsCookie": null,
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
      }
      

      Attachments

        Issue Links

          Activity

            People

              jason Jason Lemay
              julian.keller Julian Keller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: