-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 12.0.0, 12.0.2, 12.0.3
-
Component/s: rest
-
Labels:
-
Sprint:AM Sustaining Sprint 13
-
Support Ticket IDs:
A call to json/agents/?_action=create does not do a case insensitive check on agent names when looking for one that already exists.
To reproduce, create an Agent with:
curl \ --request POST \ --cookie "iPlanetDirectoryPro=$IPLANET" \ --header "Content-Type: application/json" \ --data \ '{ "username":"test", "realm":"/", "agenttype":["WebAgent"], "serverurl":"http://openam.example.com:8080/openam", "agenturl":"http://agent.example.com:80", "userpassword":"cangetin" }' \ $METHOD://$HOST:$PORT/openam/json/agents/?_action=create
Calling the same command again returns:
{"code":409,"reason":"Conflict","message":"Resource already exists"}
Changing the case on the username ("username":"Test"), then calling again returns a different result:
{"code":400,"reason":"Bad Request","message":"Resource cannot be created: Plug-in com.sun.identity.idm.plugins.internal.AgentsRepo: Unable to create agent."}