cinder/cinder
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
..
api Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
backup Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
brick Merge "Fixes creation of mirrored volumes due to wrong type" 2017-12-16 02:30:28 +00:00
cmd Support multiple processes on Cinder Backup 2018-03-14 10:52:25 +01:00
common Avoid build system IP going into sample config 2018-03-12 15:26:59 -05:00
compute Clean out config deprecation information 2018-03-13 14:33:37 -05:00
consistencygroup Remove consistencygroups/api.py 2018-01-26 17:59:27 -05:00
db Reserve 5 migrations for DB backports 2018-02-22 11:50:41 -05:00
group Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
hacking Add contributor doc on assertEqual vs assertFalse 2017-08-30 17:50:02 +00:00
image Adding Glance method for listing image members and unit test 2018-03-15 11:25:40 -05:00
interface Handle deprecation of inspect.getargspec 2017-11-21 12:57:05 -06:00
keymgr Fix DuplicateOptError in fixed_key migration code 2018-02-02 15:49:02 +00:00
locale Imported Translations from Zanata 2018-03-01 06:39:07 +00:00
message Disallow unmanaging encrypted volumes 2017-11-29 10:43:32 -05:00
objects Merge "Fix leftovers after backup abort" 2018-03-11 01:48:44 +00:00
policies Add policy check for complete attachment API action 2018-01-24 15:48:22 +00:00
scheduler Merge "Schedule request to scheduler when manage existing snapshot" 2018-02-25 13:32:08 +00:00
tests Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
transfer Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
volume Add missing 'target_obj' when perform policy check 2018-03-19 19:02:00 +08:00
wsgi Initialize osprofiler in WSGI application 2018-01-09 14:06:34 +01:00
zonemanager Support fabric specific Cisco FC Zone Name 2018-01-25 21:14:04 -08:00
__init__.py
context.py Fix: Propagate OS global request ID 2018-01-15 22:00:27 +01:00
coordination.py Remove deprecated heartbeat options 2017-10-03 14:41:18 -05:00
exception.py Remove ExceptionInParsingArguments 2018-03-12 17:02:10 -04:00
flow_utils.py Fix logging traceback in service logs 2016-12-20 12:39:07 +05:30
i18n.py Replace http with https for doc links in cinder 2017-10-17 11:14:01 +08:00
manager.py Allow configuring tpool size 2018-03-08 15:59:29 +01:00
opts.py Merge "Support multiple processes on Cinder Backup" 2018-03-17 00:06:58 +00:00
policy.py Add cg policies and clean up old policy handling 2017-12-04 10:07:54 +08:00
quota.py Periodic task to clean expired reservation 2017-05-30 22:21:38 +08:00
quota_utils.py Add Generic Volume Group Into Quota Management 2017-05-26 01:43:23 +00:00
rpc.py Remove deprecated oslo_messaging.get_transport 2017-06-13 14:25:38 +07:00
service.py Support multiple processes on Cinder Backup 2018-03-14 10:52:25 +01:00
service_auth.py Add service_token for cinder-nova interaction 2017-12-15 12:04:23 +05:30
ssh_utils.py Stop a connections leak when freeing an SSHPool 2018-02-14 18:16:55 -06:00
test.py Allow configuring tpool size 2018-03-08 15:59:29 +01:00
utils.py Remove utils.read_file_as_root() 2018-03-02 05:29:02 -05:00
version.py