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

Reconciliation with link qualifier is not working properly on IDM5.0.0.3-RC2.

    Details

      Description

      Couple of our automated tests are failing with OpenIDM version "5.0.0.3-RC2" (revision: 6455c5b). It looks like reconciliation with link qualifier is not working properly. For reproduction you can use steps below.

      Steps to reproduce:

      1. Start IDM with sample5
      2. Copy xml_LDAP_Data.xml to openidm/samples/sample5
      3. Add link_qualifier_in_condition mapping int sync.json
        {
          "name": "link_qualifier_in_condition",
          "source": "managed/user",
          "target": "system/ldap/account",
          "linkQualifiers": [
            "main",
            "test"
          ],
          "enableSync": false,
          "correlationQuery": [
            {
              "linkQualifier": "main",
              "type": "text/javascript",
              "source": "var query = {'_queryFilter': 'description eq \"' + source.description + '.main\"'}; query;"
            },
            {
              "linkQualifier": "test",
              "type": "text/javascript",
              "source": "var query = {'_queryFilter': 'description eq \"' + source.description + '.test\"'}; query;"
            }
          ],
          "properties": [
            {
              "source": "userName",
              "target": "uid"
            },
            {
              "source": "sn",
              "target": "lastname"
            },
            {
              "source": "givenName",
              "target": "firstname",
              "condition": "/linkQualifier eq \"test\""
            },
            {
              "source": "mail",
              "target": "email"
            },
            {
              "default": "initial_Passw0rd",
              "source": "password",
              "transform": {
                "type": "text/javascript",
                "source": "source && openidm.decrypt(source);"
              },
              "target": "userPassword"
            }
          ],
          "policies": [
            {
              "situation": "SOURCE_MISSING",
              "action": "IGNORE"
            },
            {
              "situation": "UNASSIGNED",
              "action": "IGNORE"
            }
          ]
        }
        

        4. Create user

        curl --header "If-None-Match: *" --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '{"userName": "barbara.jensen", "telephoneNumber": "6669876987", "givenName": "NewGivenName", "description": "barbara.jensen", "sn": "Jensen", "mail": "new@mail.com", "password": "Th3Password"}' --request PUT "http://localhost:8080/openidm/managed/user/barbara_with_new_mail"

        5. Recon

        curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --request POST "http://localhost:8080/openidm/recon?_action=recon&mapping=link_qualifier_in_condition&waitForCompletion=True"
        

         

      Expected result: firstname should be NewGivenName

      Actual result: firstname is Barbara

      curl --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin"  --request GET "http://localhost:8080/openidm/system/ldap/account/bjensen.test"

       

      Error during recon:

      Resource exception: 500 Internal Server Error: "Must be a single value."
      org.forgerock.json.resource.InternalServerErrorException: Must be a single value.
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:626)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleUpdate(ObjectClassRequestHandler.java:156)
      at org.forgerock.json.resource.Router.handleUpdate(Router.java:347)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:144)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:141)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:182)
      at org.forgerock.openidm.filter.ScriptedFilter.filterUpdate(ScriptedFilter.java:140)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:222)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:219)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:247)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:218)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$4.filterUpdate(ServletConnectionFactory.java:475)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
      at org.forgerock.json.resource.InternalConnection.updateAsync(InternalConnection.java:92)
      at org.forgerock.json.resource.AbstractAsynchronousConnection.update(AbstractAsynchronousConnection.java:103)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$1$1.update(ServletConnectionFactory.java:257)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.sync.impl.SyncOperation.updateTargetObject(SyncOperation.java:841)
      at org.forgerock.openidm.sync.impl.SyncOperation.performAction(SyncOperation.java:516)
      at org.forgerock.openidm.sync.impl.SourceSyncOperation.sync(SourceSyncOperation.java:81)
      at org.forgerock.openidm.sync.impl.SourceRecon.recon(SourceRecon.java:68)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:54)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:24)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: Must be a single value.
      at org.identityconnectors.framework.common.objects.Attribute.<init>(Attribute.java:111)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:191)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:80)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.getDeletedAttributes(ObjectClassResourceProvider.java:638)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:602)
      ... 53 more
      Failed to update target object
      org.forgerock.json.resource.InternalServerErrorException: Must be a single value.
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:626)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleUpdate(ObjectClassRequestHandler.java:156)
      at org.forgerock.json.resource.Router.handleUpdate(Router.java:347)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:144)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:141)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:182)
      at org.forgerock.openidm.filter.ScriptedFilter.filterUpdate(ScriptedFilter.java:140)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:222)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:219)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:247)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:218)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$4.filterUpdate(ServletConnectionFactory.java:475)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
      at org.forgerock.json.resource.InternalConnection.updateAsync(InternalConnection.java:92)
      at org.forgerock.json.resource.AbstractAsynchronousConnection.update(AbstractAsynchronousConnection.java:103)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$1$1.update(ServletConnectionFactory.java:257)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.sync.impl.SyncOperation.updateTargetObject(SyncOperation.java:841)
      at org.forgerock.openidm.sync.impl.SyncOperation.performAction(SyncOperation.java:516)
      at org.forgerock.openidm.sync.impl.SourceSyncOperation.sync(SourceSyncOperation.java:81)
      at org.forgerock.openidm.sync.impl.SourceRecon.recon(SourceRecon.java:68)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:54)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:24)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: Must be a single value.
      at org.identityconnectors.framework.common.objects.Attribute.<init>(Attribute.java:111)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:191)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:80)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.getDeletedAttributes(ObjectClassResourceProvider.java:638)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:602)
      ... 53 more
      Unexpected failure during source reconciliation 33c36123-b72b-45e0-bb22-0512edb97180-29
      org.forgerock.openidm.sync.SynchronizationException: Must be a single value.
      at org.forgerock.openidm.sync.impl.SyncOperation.performAction(SyncOperation.java:570)
      at org.forgerock.openidm.sync.impl.SourceSyncOperation.sync(SourceSyncOperation.java:81)
      at org.forgerock.openidm.sync.impl.SourceRecon.recon(SourceRecon.java:68)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:54)
      at org.forgerock.openidm.sync.impl.ReconTask.call(ReconTask.java:24)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.forgerock.openidm.sync.SynchronizationException: Must be a single value.
      at org.forgerock.openidm.sync.impl.SyncOperation.updateTargetObject(SyncOperation.java:849)
      at org.forgerock.openidm.sync.impl.SyncOperation.performAction(SyncOperation.java:516)
      ... 10 more
      Caused by: org.forgerock.json.resource.InternalServerErrorException: Must be a single value.
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:626)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleUpdate(ObjectClassRequestHandler.java:156)
      at org.forgerock.json.resource.Router.handleUpdate(Router.java:347)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:144)
      at org.forgerock.openidm.filter.ScriptedFilter$6.apply(ScriptedFilter.java:141)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:182)
      at org.forgerock.openidm.filter.ScriptedFilter.filterUpdate(ScriptedFilter.java:140)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:222)
      at org.forgerock.openidm.audit.filter.AuditFilter$7.apply(AuditFilter.java:219)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
      at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:247)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:218)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$4.filterUpdate(ServletConnectionFactory.java:475)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
      at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
      at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
      at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
      at org.forgerock.json.resource.InternalConnection.updateAsync(InternalConnection.java:92)
      at org.forgerock.json.resource.AbstractAsynchronousConnection.update(AbstractAsynchronousConnection.java:103)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$1$1.update(ServletConnectionFactory.java:257)
      at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
      at org.forgerock.openidm.sync.impl.SyncOperation.updateTargetObject(SyncOperation.java:841)
      ... 11 more
      Caused by: java.lang.IllegalArgumentException: Must be a single value.
      at org.identityconnectors.framework.common.objects.Attribute.<init>(Attribute.java:111)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:191)
      at org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:80)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.getDeletedAttributes(ObjectClassResourceProvider.java:638)
      at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleUpdate(ObjectClassResourceProvider.java:602)
      ... 53 more
      

        Attachments

          Activity

            People

            • Assignee:
              mark.offutt Mark Offutt [X] (Inactive)
              Reporter:
              jakub.janoska Jakub Janoska [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: