-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 5.5.1, 6.0.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4
-
Fix Version/s: None
-
Component/s: API descriptor, rest
-
Labels:
-
Support Ticket IDs:
Bug description
When you use the REST API to create a WebAgent for the property "cdssoRootUri" like this
curl -vX PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-API-Version: resource=1.0, protocol=2.1' -H "iPlanetDirectoryPro: $(echo $token)" -d '{"cdssoRootUrl": ["http://abc"]}' "$AMURL/j[son/realms/root/realm-config/agents/WebAgent/test"
The response should the cdssoRootUrl value to be "http://abc". However on later updates, the issue is that although update is successful the REST response for cdssoRootUrl has a non-URL shown.
{ "cdssoRootUrl": { "inherited": false, "value": [ "agentRootURL=http://abc/"
How to reproduce the issue
- Delete the web agent /test
- Run the above put multiple times (the first time this is a CREATE and later runs will be an UPDATE)
- The first time the response return the correct cdSSORootUrl without agentRootURL= prefix to the URL
- The next update, we notice the response returns
{ "cdssoRootUrl": { "inherited": false, "value": [ "agentRootURL=http://abc/" <------- // agentRootURL=
Expected behaviour
The API should at least be consistent. For ease of API, the agentRootURL= should not be appended since it would confused one when displaying the result. So even if internally it needs to be stored as such, the REST response should not show this
Current behaviour
The Response appends "agentRootURL=" to the cdssoRootUrl
Work around
Can be ignored as the internal code will always add "agentRootURL"
SMSAbstractAgentProvider's updateInstance could be used to return a sanitised version w/o agentRootURL (or even on the query) doing the opposite of addAgentRootUrl (to transform) the data.
It is known that due to these, the XUI side also does these trick (see ) to workaround this behaviour.OPENAM-12459