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

Patch ADD operation on system adds value to single-valued attribute

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • OpenIDM 4.5.0, OpenIDM 5.0.0
    • OpenIDM 5.0.0
    • OpenIDM
      5.0.0-SNAPSHOT (revision: 1f66c8c), LDAP connector
      1.4.1.2 rev.73349ffff896b1613b2bbaaf0437248cb700032f, LDAP connector 1.4.2.0-SNAPSHOT rev.4ca635f076f41425a46b98cce1202093500689bb,
      OpenDJ 3.5.0 Build 20160711133456

    Description

      Patch operation add should not be able to add value to single-valued attribute on system OpenDJ. Description is set as string in provisioner file.

      Curl command

      curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '[{"operation":"add","field":"/description","value":"Test"}]' --request PATCH "http://localhost:8080/openidm/system/ldap/account/uid=b_1472806057,ou=people,dc=example,dc=com"
      
      {"code":500,"reason":"Internal Server Error","message":"The description attribute is not single value attribute."}
      

      Provisioner schema

      "description" : {
          "type" : "string",
          "nativeName" : "description",
          "nativeType" : "string"
      },
      

      Ldap search - before

      ./ldapsearch --bindDN 'cn=Directory Manager' --bindPassword password --hostname localhost --port 4444 --useSSL -b ou=people,dc=example,dc=com uid=b_1473067528
      
      dn: uid=b_1473067528,ou=people,dc=example,dc=com
      objectClass: person
      objectClass: inetOrgPerson
      objectClass: organizationalPerson
      objectClass: top
      mail: mail@test.com
      givenName: b_1473067528
      uid: b_1473067528
      description: Foo
      cn: b_1473067528
      sn: b_1473067528
      telephoneNumber: 123456789
      

      Ldap search - after

      ./ldapsearch --bindDN 'cn=Directory Manager' --bindPassword password --hostname localhost --port 4444 --useSSL -b ou=people,dc=example,dc=com uid=b_1473067528
      
      dn: uid=b_1473067528,ou=people,dc=example,dc=com
      objectClass: person
      objectClass: inetOrgPerson
      objectClass: organizationalPerson
      objectClass: top
      mail: mail@test.com
      givenName: b_1473067528
      uid: b_1473067528
      description: Foo
      description: Test
      cn: b_1473067528
      sn: b_1473067528
      telephoneNumber: 123456789
      

      Attachments

        Issue Links

          Activity

            People

              alin Alin Brici
              michal.orlik@profiq.cz Michal Orlik
              Michal Orlik Michal Orlik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: