heat/heat/tests/policy
Pavlo Shchelokovskyy 454a7b0ec1 Add resource_type-specific policies
Heat's `policy.json` now can contain policies of the following schema:

  "resource_types:<resource_type>": "rule"

This will allow cloud admins to control resource access utilizing
user roles, names, tenants and any other oslo.policy-supported rules.

Basic usage is to facilitate fail-early for stacks with resources
that a given user will not be able to actually create
due to role restrictions.

Default policy is 'allow to everyone' (who has passed previous policy
checks on REST API layer).

Resource types that the user will not be able to use due to
resources policy restrictions are hidden from `resource-type-list`.

Current operations that are prohibited if the user
does not pass policy check for a particular "forbidden" resource:
- show resource type for forbidden resource type
- show resource template for forbidden resource type
- create a stack containing a forbidden resource
- delete a stack containing a forbidden resource
- update a stack that already has a forbidden resource
- update a stack initroducing a new forbidden resource
- restore a stack snapshot to a stack that currently has forbidden
  resource
Not yet prohibited, need to be fixed:
- restore a stack snapshot that will create a forbidden resource

As first step (and for testing purposes) OS::Nova::Flavor is forbidden
to create for non-admin users. Simple functional test using this
resource is added.

Change-Id: I337306c4f1624552a2631e0ffbb43f0d3102813d
Implements blueprint conditional-resource-exposure
2015-08-25 15:37:26 +03:00
..
check_admin.json Add check_is_admin to common.policy.Enforcer 2013-11-27 22:30:59 +00:00
deny_stack_user.json heat api : Add policy.json authorization to cloudwatch API 2013-02-07 10:22:14 +00:00
notallowed.json Add initial code to support policy.json implementation 2013-02-05 19:38:49 +00:00
resources.json Add resource_type-specific policies 2015-08-25 15:37:26 +03:00