blob: f7cb182f02407bf61159399deaab8667c03ea3f0 [file] [log] [blame]
Felipe Monteiroc8ec1f62017-11-15 08:32:56 +00001.. _rbac-utils:
2
Felipe Monteiro144ec1e2017-12-26 17:38:11 +00003RBAC Utils Module
4=================
Felipe Monteiroc8ec1f62017-11-15 08:32:56 +00005
6Overview
7--------
8
9Patrole manipulates the ``os_primary`` `Tempest credentials`_, which are the
10primary set of Tempest credentials. It is necessary to use the same credentials
11across the entire test setup/test execution/test teardown workflow
12because otherwise 400-level errors will be thrown by OpenStack services.
13
14This is because many services check the request context's project scope -- and
15in very rare cases, user scope. However, each set of Tempest credentials (via
16`dynamic credentials`_) is allocated its own distinct project. For example, the
17``os_admin`` and ``os_primary`` credentials each have a distinct project,
18meaning that it is not always possible for the ``os_primary`` credentials to
19access resources created by the ``os_admin`` credentials.
20
21The only foolproof solution is to manipulate the role for the same set of
22credentials, rather than using distinct credentials for setup/teardown
23and test execution, respectively. This is especially true when considering
24custom policy rule definitions, which can be arbitrarily complex.
25
Felipe Monteiroc8ec1f62017-11-15 08:32:56 +000026Implementation
27--------------
28
Felipe Monteiro47c43cb2018-11-05 17:15:30 +000029:py:mod:`RBAC Utils Module <patrole_tempest_plugin.rbac_utils>`
Felipe Monteiro26b7e092018-07-27 22:15:27 +010030
31.. _Tempest credentials: https://docs.openstack.org/tempest/latest/library/credential_providers.html
32.. _dynamic credentials: https://docs.openstack.org/tempest/latest/configuration.html#dynamic-credentials
33