Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1147

LDAP Connector: Query with _pagedResultsOffset higher than number of records in ldap is returning incorrect results

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ldap-connector-1.4.11.0, ldap-connector-1.4.12.0
    • Fix Version/s: ldap-connector-1.5.0.0
    • Labels:
    • Environment:

      Description

      When using a query filter with _pagedResultsOffset on ldap where the offset is higher than number of the records in ldap, it should not return any results. However, it returns some results as shown below.

      Steps to reproduce:

      1. Install IDM
      2. Install DS
      3. Create an ldif file with 10 records, e.g. JDoe[0-9]
      4. Configure provisioner-ldap
      5. Start DS and IDM
      6. Query ids to display all records
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request GET "http://localhost:8080/openidm/system/ldap/account?_queryId=query-all-ids"
        
      7. Query ids with _pageSize=4 and _pagedResultsOffset=11, expected 0 results
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request GET "http://localhost:8080/openidm/system/ldap/account?_queryId=query-all-ids&_sortKeys=_id&_pageSize=4&_pagedResultsOffset=11"
        

        Json output:

        {
          "result": [
            {
              "_id": "6dc80de6-0c53-38b6-91a6-afeafe13e5e5",
              "dn": "uid=bjensen1,ou=People,dc=example,dc=com"
            },
            {
              "_id": "8399b1d7-f229-34b6-916a-c6ede3702652",
              "dn": "uid=bjensen2,ou=People,dc=example,dc=com"
            },
            {
              "_id": "01ec36a6-e33a-3e8a-b170-7649e30b7a09",
              "dn": "uid=bjensen3,ou=People,dc=example,dc=com"
            },
            {
              "_id": "537df05e-c95c-364f-9c9f-2bcaed421c1a",
              "dn": "uid=bjensen4,ou=People,dc=example,dc=com"
            }
          ],
          "resultCount": 4,
          "pagedResultsCookie": "AAAAAAAAAAo%3D%3A0",
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
        }
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gael Gael Allioux
                Reporter:
                son.nguyen Son Nguyen
                QA Assignee:
                Son Nguyen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: