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

Setting returnByDefault to true on relationship properties in managed objects DJ repo could cause missing attributes in sync.json script hooks

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      3
    • Support Ticket IDs:
    • Zendesk ID:
      38104

      Description

      To reproduce this issue:

      1. Set up IDM 6.0.0.3 with DJ repository.

      2. Configure at least 3 relationship properties to managed/user and set returnByDefault to true for all of them.

      3. Create a connector such as ldap connector, a mapping from ldap to managed/user, reconcile so that ldap and idm share a common set of users.

      4. Set sourceQuery to an impossible queryFilter, to ensure a target phase gets executed. For example:

                  "sourceQuery" : {
                      "_queryFilter" : "/uid eq \"fake\""
                  }
      

      5. Reconcile the mapping again. It can be observed that the oldOjbect is the onUpdate (sync.json) script hook is missing the attributes such as userName, givenName, etc

      -> [219] Mar 14, 2019 3:40:38.611 PM org.forgerock.openidm.script.scope.FunctionFactory$1 call
      SEVERE: onUpdate target is: { "_rev": "000000001564d6a5", "_id": "b2541ae5-b854-469e-ab68-13fd2830a2e9", "manager": null, "friend": null, "secretary": null, "userName": "test1", "givenName": "test1", "sn": "user", "mail": "test1@example.com" }
      [219] Mar 14, 2019 3:40:38.611 PM org.forgerock.openidm.script.scope.FunctionFactory$1 call
      SEVERE: onUpdate oldTarget is: { "_rev": "000000001564d6a5", "_id": "b2541ae5-b854-469e-ab68-13fd2830a2e9", "manager": null, "friend": null, "secretary": null }
      

      The workaround is to set queryFilter to true.

       "targetQuery" : {
                  "_queryFilter" : "true"
              },
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhogan Dirk Hogan
                Reporter:
                yinyan.cao Yinyan Cao
                QA Assignee:
                Alexander Dracka
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: