[AAA-53] Updates to users endpoint using HTTP PUT do not work Created: 20/Jul/15  Updated: 21/Mar/19  Resolved: 20/Jul/15

Status: Resolved
Project: aaa
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Ryan Goulding Assignee: Ryan Goulding
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4024

 Description   

Updates to a user account do not occur. An example is shown below:

[ryan@awesomeo assembly]$ curl -u admin:admin http://localhost:8181/auth/v1/users
{"users":[

{"userid":1,"name":"admin","description":"admin user","enabled":true,"email":"","password":"**********"}

,

{"userid":2,"name":"user","description":"user user","enabled":true,"email":"","password":"**********"}

]}
[ryan@awesomeo assembly]$ cat user.json
{
"name":"admin",
"description":"admin user account",
"enabled":"true",
"email:admin@admin.com",
"password":"foobar"
}
[ryan@awesomeo assembly]$ curl -X PUT -H "Content-Type: application/json" --data-binary @./user.json http://localhost:8181/auth/v1/users/1
[ryan@awesomeo assembly]$ curl -u admin:admin http://localhost:8181/auth/v1/users
{"users":[

{"userid":1,"name":"admin","description":"admin user","enabled":true,"email":"","password":"**********"}

,

{"userid":2,"name":"user","description":"user user","enabled":true,"email":"","password":"**********"}

]}



 Comments   
Comment by Ryan Goulding [ 20/Jul/15 ]

[ryan@awesomeo assembly]$ curl -X PUT -H "Content-Type: application/json" --data-binary @./user.json http://localhost:8181/auth/v1/users/1

should be

[ryan@awesomeo assembly]$ curl -u admin:admin -X PUT -H "Content-Type: application/json" --data-binary @./user.json http://localhost:8181/auth/v1/users/1

This was a typo. I reverified by hand that this is broken.

Comment by Ryan Goulding [ 20/Jul/15 ]

user.json needs "key":"value" setup for email, so this was just a case of bad input. However, the error reporting is non-existent so this could be an area for improvement.

Generated at Wed Feb 07 19:08:30 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.