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

Unable to update Agent profile using REST

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 6.5.2, 6.0.1, 7.0.0, 5.5.2
    • Component/s: rest
    • Labels:
    • Sprint:
      AM Sustaining Sprint 62, AM Sustaining Sprint 63
    • Story Points:
      3
    • Needs backport:
      No
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      No (add reasons in the comment)

      Description

      Bug description

      Attempting to update an agent profile using REST results in error 500.

      How to reproduce the issue

      1. Deploy AM 5.5.1, embedded config and user store.
      2. Use a curl authenticate command to obtain an admin user token.
      3. Create an agent profile (e.g. curl -k -X POST -d @/opt/forgerock/ZD39308_agent_update.json --header "Content-Type: application/json" --header "iPlanetDirectoryPro:<token>" https://openam.amtest2.com:8443/access/json/realms/subscribers/agents?_action=create) with a json file that includes some attributes for profile.attribute.mapping and more than 5 logout urls, e.g:
        1.  
          "com.sun.identity.agents.config.profile.attribute.mapping[sn]":"[sn]",
          "com.sun.identity.agents.config.profile.attribute.mapping[givenname]":"[givenname]",
          "com.sun.identity.agents.config.profile.attribute.mapping[uid]":"[uid]",
          "com.sun.identity.agents.config.profile.attribute.mapping[mail]":"[mail]
          
        1.  
          "com.sun.identity.agents.config.agent.logout.url[6]":"http://www.example.com/test1.html",
          "com.sun.identity.agents.config.agent.logout.url[5]":"http://www.example.com/test2.html",
          "com.sun.identity.agents.config.agent.logout.url[4]":"http://www.example.com/test3.html",
          "com.sun.identity.agents.config.agent.logout.url[4]":"http://www.example.com/test4.html",
          "com.sun.identity.agents.config.agent.logout.url[3]":"http://www.example.com/test5.html",
          "com.sun.identity.agents.config.agent.logout.url[2]":"http://www.example.com/test6.html",
          "com.sun.identity.agents.config.agent.logout.url[2]":"http://www.example.com/test7.html",
          "com.sun.identity.agents.config.agent.logout.url[1]":"http://www.example.com/test8.html",
          "com.sun.identity.agents.config.agent.logout.url[0]":"http://www.example.com/test9.html"
          

           

      1. Attempt to update the agent profile using the same json, e.g: curl -k -X PUT -d @/opt/forgerock/ZD39308_agent_update.json --header "Content-Type: application/json" --header "iPlanetDirectoryPro:<token>" https://openam.amtest2.com:8443/access/json/realms/subscribers/agents/testagent1
      Expected behaviour
      Succeeds
      Current behaviour
      Returns error 500.
      
      In the debug logs, this contained the following error:
      Message:The attribute name com.sun.identity.agents.config.profile.attribute.mapping[givenname] does not match the service schema
      
      Removing this attribute from the json file and repeating the update then resulted in an error for the following:
      com.sun.identity.agents.config.agent.logout.url[5]

      Work around

      None

      Code analysis

        Attachments

          Activity

            People

            • Assignee:
              lawrence.yarham Lawrence Yarham
              Reporter:
              lawrence.yarham Lawrence Yarham
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: