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

IDM presents a string value for a boolean property with external DJ repo explicit user mapping

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.0.0.3
    • Fix Version/s: None
    • Component/s: Module - Repository DS
    • Labels:
    • Target Version/s:
    • Support Ticket IDs:
    • Zendesk ID:
      38500

      Description

      To reproduce this issue,

      1. Set up IDM 6.0.0.3, DS 6.0.0, external DJ repo, explicit mapping for managed user

      2. Add a boolean property, for example fr-idm-testProperty1, in 99-openidm.ldif

      attributeTypes: ( 1.3.6.1.4.1.36733.2.3.1.101 NAME 'fr-idm-testProperty1'
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 EQUALITY booleanMatch SINGLE-VALUE X-ORIGIN 'OpenIDM DSRepoService' )
      objectClasses: ( 1.3.6.1.4.1.36733.2.3.2.7 NAME 'fr-idm-managed-user-explicit' SUP inetOrgPerson
          MAY ( fr-idm-accountStatus $ fr-idm-password $ pwdCheckQuality $ pwdMinLength $ pwdExpireWarning $ fr-idm-role $ fr-idm-effectiveRole
          $ fr-idm-effectiveAssignment $ fr-idm-kbaInfo $ fr-idm-lastSync $ fr-idm-preferences
          $ fr-idm-consentedMapping $ fr-idm-testProperty1fr-idm-testProperty1) X-ORIGIN 'OpenIDM DSRepoService' ) 
      

      3. Add testProperty1 to repo.ds.json

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

      4. Add testProperty1 to managed user

                          "testProperty1" : {
                              "title" : "My Testing Property for boolean type",
                              "type" : "boolean",
                              "viewable" : true,
                              "searchable" : false,
                              "userEditable" : true
                          }
      

      5. Create a new user, retrieve the user, the testProperty1 is displayed as "true" instead of true

      {
          "_id": "aafcfbab-c0a7-46b7-9692-e3c3268cc2cf",
          "_rev": "000000001434b2bf",
      ...
          "testProperty1": "true",
          "effectiveRoles": [],
          "effectiveAssignments": []
      }
      

      6. Insert a logger statement in onRetrieve script hook to print the typeof testProperty1 and run REST GET openidm/managed/user?_queryFilter=userName+eq+'test1'&executeOnRetrieve=true, we get

      [19] Mar 27, 2019 10:15:06.389 AM org.forgerock.openidm.script.scope.FunctionFactory$1 call
      SEVERE: onRetrieve object.testProperty1 is : string
      

      This issue is not seen on embedded DJ repo with explicit user mapping. Running the same test with embedded DJ, we get

              {
                  "_id": "14653d7b-3466-420c-b5eb-79e394b13b0f",
                  "_rev": "00000000c024b104",
                  "userName": "test4",
                  "accountStatus": "active",
                  "givenName": "test4",
                  ...
                  "testProperty1": false,
                  "effectiveRoles": [],
                  "effectiveAssignments": []
              }
      
      [101] Mar 27, 2019 10:20:52.336 AM org.forgerock.openidm.script.scope.FunctionFactory$1 call
      SEVERE: onRetrieve: testProperty1 type is boolean
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              patrickdiligent patrick diligent
              Reporter:
              yinyan.cao Yinyan Cao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: