Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-13564

REST API for realm-config/agents/WebAgent treats cdssoUrl differently



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1, 6.0.0,,,,
    • Fix Version/s: None
    • Component/s: API descriptor, rest
    • Labels:
    • Rank:
    • 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": [


      How to reproduce the issue

      1. Delete the web agent /test
      2. Run the above put multiple times (the first time this is a CREATE and later runs will be an UPDATE)
      3. The first time the response return the correct cdSSORootUrl without agentRootURL= prefix to the URL
      4. 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 OPENAM-12459) to workaround this behaviour.




            Unassigned Unassigned
            chee-weng.chea C-Weng C
            0 Vote for this issue
            4 Start watching this issue