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

Salesforce connector: pagination and cookies not working properly

    XMLWordPrintable

    Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.17.0, 1.5.19.1
    • Salesforce Connector
    • OpenIDM: 7.0.0-SNAPSHOT e5576a4
      SalesforceConnector: 1.5.5.0-SNAPSHOT 18860c50fc0

      Description

      Found several issues when testing the latest Salesforce connector 1.5.5.0-SNAPSHOT.

      Pagination does not work properly:

      • pageSize < 200 on User endpoint, it returns always a 200 results on sandbox with over 2000 user accounts
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request  GET 'http://localhost:8080/openidm/system/salesforce/User?_queryId=query-all-ids&_pageSize=150' | jq
        
        {
          "result": [
            {
              "_id": "00530000009pf58AAA"
            },
            {
              "_id": "00529000001xLPeAAM"
            },
           ...
            {
              "_id": "00529000003KsUNAA0"
            }
          ],
          "resultCount": 200,
          "pagedResultsCookie": "01g29000013IlpkAAC-200",
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
        }
        
      • pageSize < 4 on Group endpoint, it returns always all 4 groups we have on our sandbox without a cookie
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request  GET 'http://localhost:8080/openidm/system/salesforce/Group?_queryId=query-all-ids&_pageSize=1' | jq
        
        {
          "result": [
            {
              "_id": "00G30000004CD2tEAG"
            },
            {
              "_id": "00G30000004CD2uEAG"
            },
            {
              "_id": "00G30000003bET1EAM"
            },
            {
              "_id": "00G30000004CD2jEAG"
            }
          ],
          "resultCount": 4,
          "pagedResultsCookie": null,
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
        }
        
      • pageSize > number of user accounts, it returns HTTP 409 instead of returning all results without a cookie
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request  GET 'http://localhost:8080/openidm/system/salesforce/Group?_queryId=query-all-ids&_pageSize=2500' | jq
        {
          "code": 409,
          "reason": "Conflict",
          "message": "Attribute value conflicts with the attribute&#39;s schema definition on operation QUERY for system object"
        }
        

        Cookie doesn't work properly:

      • pagedResultsCookie returns a cookie in different format compared to other connectors
        "pagedResultsCookie": "01g29000013IlpkAAC-200"
        

        expected to see only cookie without the dash and pageSize:

        01g29000013IlpkAAC
        
      • pagedResultsCookie with invalid value returns HTTP 409 instead of HTTP 400 or HTTP 500
        curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --request  GET 'http://localhost:8080/openidm/system/salesforce/Group?_queryId=query-all-ids&_pageSize=5&_pagedResultsCookie=invalid' | jq
        
        {
          "code": 409,
          "reason": "Conflict",
          "message": "Attribute value conflicts with the attribute&#39;s schema definition on operation QUERY for system object"
        }
        

        Attachments

          Issue Links

            Activity

              People

              emanuel.brici Emanuel Brici [X] (Inactive)
              son.nguyen Son Nguyen
              Son Nguyen Son Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: