neutron/neutron/common
Elena Ezhova dd4b77ff53 Forbid regular users to reset admin-only attrs to default values
A regular user can reset an admin-only attribute to its default
value due to the fact that a corresponding policy rule is
enforced only in the case when an attribute is present in the
target AND has a non-default value.

Added a new attribute "attributes_to_update" which contains a list
of all to-be updated attributes to the body of the target that is
passed to policy.enforce.

Changed a check for whether an attribute is explicitly set.
Now, in the case of update, the function should not pay attention
to a default value of an attribute, but check whether it was
explicitly marked as being updated.

Added unit-tests.

Conflicts:
	neutron/common/constants.py

Closes-Bug: #1357379
Related-Bug: #1338880
Change-Id: I6537bb1da5ef0d6899bc71e4e949f2c760c103c2
(cherry picked from commit 74d1093990)
2014-09-25 17:14:33 +02:00
..
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
config.py Make default nova_url use a version 2014-05-06 15:09:08 +00:00
constants.py Forbid regular users to reset admin-only attrs to default values 2014-09-25 17:14:33 +02:00
exceptions.py Perform policy checks only once on list responses 2014-09-02 21:40:05 +02:00
ipv6_utils.py Ensure ip6tables are used only if ipv6 is enabled in kernel 2014-08-22 10:42:07 +02:00
legacy.py Kill 'Skipping unknown group key: firewall_driver' log trace 2014-03-13 12:46:06 -07:00
log.py Make neutron.common.log.log print module path 2013-09-07 02:10:57 +09:00
rpc.py Avoid loading policy when processing rpc requests 2013-11-28 13:02:02 +04:00
test_lib.py Remove plugin_name_v2 and extension_manager in test_config 2014-01-06 20:02:00 +09:00
topics.py LBaaS: move agent based driver files into a separate dir 2014-02-10 12:24:27 +04:00
utils.py Common decorator for caching methods 2014-05-26 10:02:12 +02:00