yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #28498
[Bug 1294356] Re: improper validation allows for 500 during create role
This is now fixed by json shema, for the invalid data it now returns 400
error
Here is the test result:
curl -g -i -X POST http://10.0.2.15:35357/v2.0/OS-KSADM/roles -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <token>" -d '{"role": {"role": "name"}}'
HTTP/1.1 400 Bad Request
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 105
Date: Sun, 15 Feb 2015 05:12:50 GMT
{"error": {"message": "Name field is required and cannot be empty",
"code": 400, "title": "Bad Request"}}
** Changed in: keystone
Status: Triaged => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1294356
Title:
improper validation allows for 500 during create role
Status in OpenStack Identity (Keystone):
Invalid
Bug description:
Improper validation allows for requests to cause 500s.
POST /v2.0/OS-KSADM/roles HTTP/1.1
Host: 10.127.101.67:35357
Content-Length: 22
Content-Type: application/json
Accept-Encoding: gzip, deflate, compress
Accept: */*
X-Auth-Token:
User-Agent: python-requests/2.2.1 CPython/2.7.4 Linux/3.13.0-17-generic
{
"role": "name"
}
HTTP/1.1 500 Internal Server Error
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 189
Date: Tue, 18 Mar 2014 19:36:05 GMT
{"error": {"message": "An unexpected error prevented the server from
fulfilling your request. 'unicode' object has no attribute
'iteritems'", "code": 500, "title": "Internal Server Error"}}
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1294356/+subscriptions
References