yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #50311
[Bug 1579014] [NEW] "name" field is not validated properly for endpoint creation
Public bug reported:
In open-stack doc, for endpoint creation it is mentioned only
"region_id" and "enabled" fields are optional. If we don't mention
"region_id" field also,it will show it as "null" in response body.
http://developer.openstack.org/api-ref-identity-v3.html
But in creation of endpoint, "name" field is not validated. The endpoint
is created even without "name" field. If this is the expected behavior,
it should have mentioned as "optional" in open-stack doc.
Case 1: The "name" field is missing and returns response body without name field.
------
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/e0b29542cf5a49f19e6c22a39506c088"}, "url": "<url>",
"region": "regionOne", "enabled": true, "interface": "public",
"service_id": "a64f07375af641bc9dfc925d2dae55d6", "id":
"e0b29542cf5a49f19e6c22a39506c088"}}
Case 2: The "name" field is misspelt as "nme" but response body is returned with same.
------
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"nme": "endpointOne",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/fe5065ee0cf6450a9a73e8b6e9e09b5e"}, "url": "<url>",
"region": "regionOne", "enabled": true, "nme": "endpointOne",
"interface": "public", "service_id": "a64f07375af641bc9dfc925d2dae55d6",
"id": "fe5065ee0cf6450a9a73e8b6e9e09b5e"}}
Case 3:
------
It is accepting any other extra-fields except the field with name "extra" and not including it in response body.
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"extra": "endpointOne",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/cf15299f69774d7d822ad706a5ccda78"}, "url": "<url>",
"region": "regionOne", "enabled": true, "interface": "public",
"service_id": "a64f07375af641bc9dfc925d2dae55d6", "id":
"cf15299f69774d7d822ad706a5ccda78"}}
** Affects: keystone
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1579014
Title:
"name" field is not validated properly for endpoint creation
Status in OpenStack Identity (keystone):
New
Bug description:
In open-stack doc, for endpoint creation it is mentioned only
"region_id" and "enabled" fields are optional. If we don't mention
"region_id" field also,it will show it as "null" in response body.
http://developer.openstack.org/api-ref-identity-v3.html
But in creation of endpoint, "name" field is not validated. The
endpoint is created even without "name" field. If this is the expected
behavior, it should have mentioned as "optional" in open-stack doc.
Case 1: The "name" field is missing and returns response body without name field.
------
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/e0b29542cf5a49f19e6c22a39506c088"}, "url":
"<url>", "region": "regionOne", "enabled": true, "interface":
"public", "service_id": "a64f07375af641bc9dfc925d2dae55d6", "id":
"e0b29542cf5a49f19e6c22a39506c088"}}
Case 2: The "name" field is misspelt as "nme" but response body is returned with same.
------
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"nme": "endpointOne",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/fe5065ee0cf6450a9a73e8b6e9e09b5e"}, "url":
"<url>", "region": "regionOne", "enabled": true, "nme": "endpointOne",
"interface": "public", "service_id":
"a64f07375af641bc9dfc925d2dae55d6", "id":
"fe5065ee0cf6450a9a73e8b6e9e09b5e"}}
Case 3:
------
It is accepting any other extra-fields except the field with name "extra" and not including it in response body.
curl -i -k -X POST -H "Content-Type: application/json" -H "X-AUTH-TOKEN:$token" <url>/v3/endpoints -d '
{
"endpoint": {
"interface": "public",
"extra": "endpointOne",
"region":"regionOne",
"url": "<url>",
"service_id": "a64f07375af641bc9dfc925d2dae55d6"
}
}'
HTTP/1.1 201 Created
{"endpoint": {"region_id": "regionOne", "links": {"self":
"<url>/v3/endpoints/cf15299f69774d7d822ad706a5ccda78"}, "url":
"<url>", "region": "regionOne", "enabled": true, "interface":
"public", "service_id": "a64f07375af641bc9dfc925d2dae55d6", "id":
"cf15299f69774d7d822ad706a5ccda78"}}
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1579014/+subscriptions
Follow ups