← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1473848] [NEW] create_region_with_id miss the schema validation

 

Public bug reported:

When I am debugging the code for the proposed fixing of bug #1468597,
#1466872 [1], I found some testcases failure, they are
`test_create_region_with_duplicate_id`,
`test_create_region_with_matching_ids` and `test_create_region_with_id`.

After digging into the code, I found when the region is created with id
provided is not given schema validation at all, this is beasue  region
reference data is not passed as dict, see [2], but validator expect the
reference data is in kwargs [3] which is common usage when it's resource
is request with restful API.

So, the region creation with id given missed the schema validation.


[1] https://review.openstack.org/#/c/195903/
[2] https://github.com/openstack/keystone/blob/master/keystone/catalog/controllers.py#L173
[3] https://github.com/openstack/keystone/blob/master/keystone/common/validation/__init__.py#L34-L35

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1473848

Title:
  create_region_with_id miss the schema validation

Status in Keystone:
  New

Bug description:
  When I am debugging the code for the proposed fixing of bug #1468597,
  #1466872 [1], I found some testcases failure, they are
  `test_create_region_with_duplicate_id`,
  `test_create_region_with_matching_ids` and
  `test_create_region_with_id`.

  After digging into the code, I found when the region is created with
  id provided is not given schema validation at all, this is beasue
  region reference data is not passed as dict, see [2], but validator
  expect the reference data is in kwargs [3] which is common usage when
  it's resource is request with restful API.

  So, the region creation with id given missed the schema validation.


  [1] https://review.openstack.org/#/c/195903/
  [2] https://github.com/openstack/keystone/blob/master/keystone/catalog/controllers.py#L173
  [3] https://github.com/openstack/keystone/blob/master/keystone/common/validation/__init__.py#L34-L35

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1473848/+subscriptions


Follow ups