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

embedded DJ explicit mapping does not allow empty valued properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: Module - Repository DS
    • Labels:
    • Environment:
      OpenIDM: 7.0.0-SNAPSHOT 55394c2 with embedded_dj explicit mapping
    • Target Version/s:
    • Story Points:
      1

      Description

      The gender attribute is defined as:

      the attribute is defined as:
      attributeTypes: ( 1.3.6.1.4.1.36733.2.3.1.520
        NAME 'fr-idm-gender'
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
        ORDERING caseIgnoreOrderingMatch
        X-ORIGIN 'OpenIDM DSRepoService' 
      

      the mapping in repo.ds.json is:

                          "gender": {
                              "ldapAttribute": "fr-idm-gender",
                              "type": "simple"
                          },
      

      When we try to create user with gender as empty string, the DS throws error.

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "rsutter", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user", "gender": ""}' --request PUT "http://localhost:8080/openidm/managed/user/ricksutter"
      
      Response Content:
      {"code":400,"reason":"Bad Request","message":"Invalid Attribute Syntax: Entry "uid=ricksutter,ou=user,ou=managed,dc=openidm,dc=forgerock,dc=com" contains a value "" for attribute fr-idm-gender that is invalid according to the syntax for that attribute: The operation attempted to assign a zero-length value to an attribute with the directory string syntax"}
      

      With JDBC repos the test is green.

      To run automated test:
      config.cfg: repo_type = embedded_dj_explicit_table

      ./run-pybot.py -t scripted_action_can_update_property -s .on_managed_users -n openidm

        Attachments

          Activity

            People

            • Assignee:
              jason Jason Lemay
              Reporter:
              Ladislav.Folta Ladislav Folta
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: