[OPENAM-9702] User service can't be created as validation for the property fails Created: 16/Sep/16  Updated: 08/Sep/17  Resolved: 01/Dec/16

Status: Resolved
Project: OpenAM
Component/s: REST-SMS
Affects Version/s: None
Fix Version/s: 14.0.0

Type: Bug Priority: Major
Reporter: Eugenia Sergueeva [X] (Inactive) Assignee: Phil Ostler [X] (Inactive)
Resolution: Fixed Votes: 0
Labels: AME, Must-Fix, TURING
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
depends on OPENAM-9727 Dynamic properties of any service are... Closed
duplicates OPENAM-9341 User Service adminDNStartingView vali... Resolved
Target Version/s:
Rank: 1|hzs4vb:
Sprint: Sprint "Baharat" 114 - Turing
QA Assignee: Filip Kubáň [X] (Inactive)
Verified Version/s:


"Administrator DN Starting View" property is marked as non required, and there is no default value for it.

However, when trying to save this service without providing this attribute, server side validation fails with the message "Data validation failed for the attribute, iplanet-am-user-admin-start-dn"

Comment by Phil Ostler [X] (Inactive) [ 15/Nov/16 ]

I've investigated this as far as I can. I've discovered the following:

  • This appeared to start failing on a commit to the UI (9b9ef95a802cd61c23eb19770403023c9a76cc54) but in-fact the UI was changed to send the correct payload (the server was accepting the incorrect payload previously)
  • The current failure is a message from the server stating that the value for attr (in the payload) adminDNStartingView is not a valid DN. There is an issue that an empty string in the payload is being taken as a value and being passed to the validator, and failing.
  • I have been unable to determine the exact location and mechanism of how the <IsOptional/> is meant to work that is against this attribute. Jaco and Ram have encountered this issue previously when working with Turing but are unable to recall exactly how this issue was resolved

Test class TestRESTSMSRealmConfigService.java is the test for the feature

Comment by Ramnishath Anaswara [X] (Inactive) [ 17/Nov/16 ]

As per the schema and template, the attribute `adminDNStartingView` is optional.

  "dynamic": {
    "defaultUserStatus": "Active",
    "preferredTimezone": null,
    "adminDNStartingView": null
"adminDNStartingView": {
          "title": "Administrator DN Starting View",
          "description": "Any valid DN for which the user has, at minimum, read access.",
          "propertyOrder": 200,
          "required": false,
          "type": "string",
          "exampleValue": ""

So the field can be completely omitted if user has not supplied a value.

The following body creates a user service without adminDNStartingView attribute.


The following body creates a user service with adminDNStartingView value explicitly set to null.

 {"dynamic":{"preferredTimezone":"US","defaultUserStatus":"Active","adminDNStartingView": null}} 
Comment by Filip Kubáň [X] (Inactive) [ 29/Nov/16 ]

Issue still exists on OpenAM 14.0.0-M7 Build eff0e96cfd (2016-November-25 16:23) - reopening

Comment by Phil Ostler [X] (Inactive) [ 30/Nov/16 ]

Filip Kubáň [X] I can successfully create the User service on master and the functional tests are confirming this also. Can you retest and if you are still seeing the issue, please post more information as to the error you are seeing + console output etc. Thanks

Comment by Filip Kubáň [X] (Inactive) [ 01/Dec/16 ]

I can create it now on M7, there must have been some other issue then, closing as fixed and verified on OpenAM 14.0.0-M7 Build eff0e96cfd (2016-November-25 16:23)

Comment by Jonathan Thomas [ 10/Jan/17 ]

Phil Ostler [X] There possibly is still some undesired behaviour in this area.
Tested on OpenAM 14.0.0-SNAPSHOT Build c640d059e5 (2017-January-10 11:32)

1) Create user service as above - with TZ setting (Service is created initially as per OPENAM-9700)
2) Then try to change the Preferred TZ - either straight away - or by navigating away and reopening service config.
3) Click save changes.

Expected outcome - service should save as Administrator DN Starting View is optional value.
Actual outcome
Data validation error message for iplanet-am-user-admin-start-dn
and bad request error displayed.

Generated at Fri Mar 05 07:50:17 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.