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

Policy Validation fails on Multiple Passwords sample

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 6.5.0
    • Fix Version/s: None
    • Component/s: None

      Description

       

      Policy validation is failing for the multiple passwords sample. The policy.json (attached) for the sample states:

       

      {
          "policyId" : "at-least-X-capitals",
          "params" : {
              "numCaps" : 1
          }
      },
      {
          "policyId" : "at-least-X-numbers",
          "params" : {
              "numNums" : 1
          }
      }
      

      But the managed.json (attached)managed.json has separate policies for "ldapPassword" and "ldap2Password" so the password for the curl command in the sample should cover both ldap passwords.

      The following error occurs when creating a user with "password" : "Passw0rd". If I use "password" : "Passw0rD1" it works.

       

      curl \
       --header "X-OpenIDM-Username: openidm-admin" \
       --header "X-OpenIDM-Password: openidm-admin" \
       --header "Content-Type: application/json" \
       --request PUT \
       --data '{
         "userName": "jdoe",
         "givenName": "John",
         "sn" : "Doe",
         "displayName" : "John Doe",
         "mail" : "john.doe@example.com",
         "password" : "Passw0rd"
       }' \
       "http://localhost:8080/openidm/managed/user/jdoe" {"code":403,"reason":"Forbidden","message":"Policy validation failed","detail":{"result":false,"failedPolicyRequirements":[{"policyRequirements":[{"params":{"numCaps":2},"policyRequirement":"AT_LEAST_X_CAPITAL_LETTERS"}],"property":"ldapPassword"},{"policyRequirements":[{"params":{"numNums":2},"policyRequirement":"AT_LEAST_X_NUMBERS"}],"property":"ldap2Password"}]}}

       

       

        Attachments

        1. managed.json
          41 kB
          Katie Gonzalez
        2. policy.json
          2 kB
          Katie Gonzalez

          Activity

            People

            • Assignee:
              brmiller Brendan Miller
              Reporter:
              katie.gonzalez Katie Gonzalez
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: