Commit Graph

13 Commits

Author SHA1 Message Date
Felipe Monteiro fb1a2d5bbe Remove murano default policy.json
This commit removes the murano default policy.json file from
etc/murano and references to it in murano's devstack plugin.
(References to the policy.json in muranodashboard remain
the same).

This commit specifically:
  - removes the default policy.json
  - removes references to it in devstack plugin
  - adds base rules to murano.common.policies.__init__ because
    they are the last rules to be included
  - updates base admin_api rule to is_admin:True from
    is_admin:1 (because the latter was causing issues)
  - updates Murano policy documentation

Partially Implements: blueprint policy-in-code
Depends-On: Ia372983d2bd1010cd19f04061f3276ed16e9c1c9
Change-Id: I1a8581a559e4333a74d56a5bdce7e6d1f117907d
2017-06-16 03:07:49 +00:00
Felipe Monteiro 640f926092 Policy in code for actions/static actions
This commit implements policy in code for (static) actions
API. The default rules for the (static) actions API were
removed from the policy.json and moved into code under
`murano.common.policies.action`.

This commit specifically:
  - Moves policy actions related to the (static) actions
    API from the policy.json into code.
  - Documents the API information and paths associated with
    each actions-related policy.

Partially Implements: blueprint policy-in-code
Change-Id: Ia372983d2bd1010cd19f04061f3276ed16e9c1c9
2017-06-14 19:25:04 +01:00
Felipe Monteiro 12024a7ae2 Policy in code for categories
This commit implements policy in code for categories
API. The default rules for the categories API were
removed from the policy.json and moved into code under
murano.common.policies.category.

This commit specifically:
  - Moves policy actions related to the categories
    API from the policy.json into code.
  - Documents the API information and paths associated with
    each category-related policy.

Partially Implements: blueprint policy-in-code
Change-Id: I7171369650d7d55ed44154481d03d48153f3640a
2017-06-09 18:11:16 +01:00
Felipe Monteiro 5a06c48d02 Policy in code for deployments
This commit implements policy in code for deployments
API. The default rules for the deployments API were
removed from the policy.json and moved into code under
murano.common.policies.deployment.

This commit specifically:
  - Moves policy actions related to the deployments
    API from the policy.json into code.
  - Documents the API information and paths associated with
    each deployment-related policy.

Partially Implements: blueprint policy-in-code
Change-Id: I246261b6df4b5225b67499c89281b942013007ed
2017-06-07 19:25:48 +00:00
Felipe Monteiro 7a01e294ff Policy in code for packages
This commit implements policy in code for packages
API. The default rules for the packages API were
removed from the policy.json and moved into code under
murano.common.policies.env_template.

This commit specifically:
  - Moves policy actions related to the packages
    API from the policy.json into code.
  - Documents the API information and paths associated with
    each package policy.

Partially Implements: blueprint policy-in-code
Change-Id: I9a091606bec7c74ce7cf53fd327a2a40c6b9c364
2017-06-06 14:02:00 +01:00
Felipe Monteiro f8c346230c Policy in code for environment templates
This commit implements policy in code for the environment templates
API. The default rules for the environment templates API were
removed from the policy.json and moved into code under
murano.common.policies.env_template.

This commit specifically:
  - Moves policy actions related to the environment templates
    API from the policy.json into code.
  - Documents the API information and paths associated with
    each environment template policy.
  - Updates the ``create_environment`` policy action documentation
    in murano.common.policies.environment to include API
    /v1/templates/{env_template_id}/create-environment
    which enforces this policy as well.

Partially Implements: blueprint policy-in-code
Change-Id: I715f4b0a61fd4404e20b88736a9a4c86fc038b55
2017-06-02 17:16:03 +01:00
Felipe Monteiro 5b01f9464b Policy in code
This patch introduces the beginning implementation for registering
default policy rules in code. Default rules are defined under
murano.common.policies. Each API's policies are defined in a
sub-folder under that path and __init__.py contains all the
default policies in code which are registered in the ``init``
enforcer function in murano/common/policy.py.

The default rules for the environments API was removed from the
policy.json and moved into code under
murano.common.policies.environment. This can be gradually done
for the rest of the APIs in follow-up patches.

This commit does the following:
  - Creates the ``policies`` module that contains all the default
    policies in code.
  - Adds the base policy rules into code (the admin_api,
    context_is_admin, and default rules).
  - Adds the environment default policy module with default
    policy rules for the environments API.

Partially Implements: blueprint policy-in-code

Change-Id: Iebf2c60d1d31b73829fad189ada7ceee28e714bd
2017-05-31 15:20:18 +00:00
Felipe Monteiro c30c27fb0c Allows fetching of deployments from all environments.
Adds new endpoint /deployments to Murano, to enable
Murano Dashboard to get all deployments for all environments.
This is needed in order to improve log browsing for
deployments, which calls for creating a new view in which
all deployments across all environments can be viewed.

Also made deployment unit tests more robust.

Partially-implements: blueprint improve-deployment-log-browsing
Change-Id: I1b6a313af1a0c4aa57bd4e6f51da92b396b35165
2017-01-16 12:00:33 -05:00
Filip Blaha ed4c44d521 Allows congress to fetch environments from all tenants
Adds request param all_tenants allowing listing environments from all tenants.
Congress data source needs populate its tables by data from all tenants.
Similar machansim uses nova to allow list servers from all tenants.

Partially implements: blueprint murano-api-all-tenants-search

Change-Id: I842292720a475992a137c1e4715873a059ec605c
2015-07-09 12:47:38 +02:00
Ekaterina Chernova 4732a4dec5 Update default policy settings
Also, there were some issues with policy:
* 'publicize_image' instead of 'publicize_package';
* corresponding actions have different names;
* user could not upload packages by default;
* user could mark package public/unpublic;
* user could delete pablic packages.

Change-Id: I5459016a4e7401b58fcb343e40d0047a4959b7df
Closes-Bug: #1439240
Closes-Bug: #1436289
2015-04-09 13:57:34 +00:00
Ekaterina Chernova 2c23f73e72 Implement category management API
Adds new API calls, responsible for add,
browse and delete categories.

Implements blueprint enable-category-management

Change-Id: I9da0680cfa244ef225be0706a54f492644c0dcba
2015-03-06 12:36:08 +03:00
Ekaterina Chernova d82b74b62f Update API policy
* Set admin rule for a several API calls and remove direct check in code
* Now admin can configure policy.json and enable package management for regular users
* Update common policy module

Closes-Bug: #1412868

Change-Id: I8d0725b613564529d32a5acef289f4822f32915c
2015-03-02 15:28:14 +03:00
Steve McLellan 185dd9305a Add policy checks to API
Adds ability for deploy-time auth checks to allow/disallow
functionality, in line with other openstack projects.

Includes update of code in openstack/common, which is why the
patchset is so large. oslo-incubator changeset is May 27th
caed79d8239679cb74476bb0d9e5011b4fcc39da.

Implements blueprint policy-checks-in-api

Change-Id: I67a431dcc74f0a77ed48b7a489136d5008773cea
2014-06-11 13:37:41 -05:00