[OPENIDM-10945] Policy Validation fails on Multiple Passwords sample Created: 16/May/18 Updated: 17/May/18 Resolved: 17/May/18 |
|
Status: | Closed |
Project: | OpenIDM |
Component/s: | None |
Affects Version/s: | 6.5.0 |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Katie Gonzalez | Assignee: | Brendan Miller |
Resolution: | Not a defect | Votes: | 0 |
Labels: | Samples, documentation, policy | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() |
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 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"}]}}
|
Comments |
Comment by Laurent Bristiel [X] (Inactive) [ 17/May/18 ] |
Is that a bug? |
Comment by Lana Frost [ 17/May/18 ] |
I think you're right - the policy validation is failing as expected because (from the docs):
So the password that you supply here must pass policy validation for ldapPassword too, which is:
|