cinder/cinder/api/contrib
TommyLike 7391070474 Add missing 'target_obj' when perform policy check
Generally, we have to pass target object to ``authorize``
when enforce policy check,  but this is ignored during
our develop and review process for a long time, and the
potential issue is anyone can handle the target resource
as ``authorize`` will always succeed if rule is defined
``admin_or_owner`` [1]. Luckily, for most of those APIs
this security concern is protected by our database access
code [2] that only project scope resource is allowed.

However, there is one API that do have security issue when
administrator change the rule into "admin_or_owner".

1. "volume reset_status", which cinder will update the
resource directly in the database, procedure to reproduce
bug is described on the launchpad.

This patch intends to correct most of cases which can be
easily figured out in case of future code changes.

[1]:
73e6e3c147/cinder/context.py (L206)
[2]:
73e6e3c147/cinder/db/sqlalchemy/api.py (L3058)
[3]:
73e6e3c147/cinder/api/contrib/admin_actions.py (L161)

Partial-Bug: #1714858
Change-Id: I351b3ddf8dfe29da8d854d4038d64ca7be17390f
2018-03-19 19:02:00 +08:00
..
__init__.py Use oslo.log instead of oslo-incubator 2015-03-11 21:45:04 -05:00
admin_actions.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
availability_zones.py Remove XML API 2016-04-21 16:05:29 +00:00
backups.py Support cross AZ backups 2018-02-23 11:35:42 +01:00
capabilities.py Use constants for cinder-volume 2017-12-29 09:05:08 +08:00
cgsnapshots.py Deprecate CG APIs 2017-12-22 06:33:27 -08:00
consistencygroups.py Deprecate CG APIs 2017-12-22 06:33:27 -08:00
extended_services.py Remove XML API 2016-04-21 16:05:29 +00:00
extended_snapshot_attributes.py Use soft authorize for 'extended_snapshot_attributes' policy 2018-03-16 10:21:28 +08:00
hosts.py Deprecate Cinder Hosts API/Extension 2018-02-07 11:44:27 -07:00
image_create.py Remove XML API 2016-04-21 16:05:29 +00:00
qos_specs_manage.py V3 jsonschema validation: qos-specs 2018-03-13 14:18:17 +05:30
quota_classes.py [policy in code] Add support for qos and quota resources 2017-10-12 14:22:40 +08:00
quotas.py Remove skip_validation_flag to False by default 2017-12-06 07:08:17 -05:00
resource_common_manage.py Use constants for microversion values 2017-09-22 08:15:56 -05:00
scheduler_hints.py Remove unused logging import and LOG global var 2016-05-20 17:17:38 +08:00
scheduler_stats.py [policy in code] Add support for service, limits 2017-10-12 15:08:34 +08:00
services.py [sytle] use http code constant instead of int 2018-03-13 11:03:52 +08:00
snapshot_actions.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
snapshot_manage.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
snapshot_unmanage.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
types_extra_specs.py Fix: request-id missing in volume action's response header. 2018-01-26 19:37:14 +05:30
types_manage.py Fix combination of parameters for update APIs 2018-01-18 14:19:13 +05:30
used_limits.py [policy in code] Add support for service, limits 2017-10-12 15:08:34 +08:00
volume_actions.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
volume_encryption_metadata.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
volume_host_attribute.py [policy in code] Add support for volume, volume type resources 2017-10-17 09:54:28 +08:00
volume_image_metadata.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
volume_manage.py Try Fetching value from 'cluster' when raise exception 2017-11-20 23:05:53 +08:00
volume_mig_status_attribute.py [policy in code] Add support for volume, volume type resources 2017-10-17 09:54:28 +08:00
volume_tenant_attribute.py [policy in code] Add support for volume, volume type resources 2017-10-17 09:54:28 +08:00
volume_transfer.py Remove log translations 2017-03-19 14:59:57 +00:00
volume_type_access.py V3 jsonschema validation: volume_type_access 2018-01-22 12:43:46 +05:30
volume_type_encryption.py [policy in code] Add support for volume, volume type resources 2017-10-17 09:54:28 +08:00
volume_unmanage.py Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00