Felipe Monteiro | 443d39c | 2018-04-08 17:05:33 -0400 | [diff] [blame^] | 1 | .. _patrole-field-guide: |
Felipe Monteiro | f9ace2b | 2018-02-27 09:43:51 -0500 | [diff] [blame] | 2 | |
Felipe Monteiro | 443d39c | 2018-04-08 17:05:33 -0400 | [diff] [blame^] | 3 | ============================ |
| 4 | Patrole Field Guide Overview |
| 5 | ============================ |
Felipe Monteiro | f9ace2b | 2018-02-27 09:43:51 -0500 | [diff] [blame] | 6 | |
| 7 | Testing Scope |
| 8 | ============= |
| 9 | |
| 10 | Patrole testing scope is strictly confined to Role-Based Access Control |
| 11 | (RBAC). In OpenStack, ``oslo.policy`` is the RBAC library used by all |
| 12 | major services. Thus, Patrole is concerned with validating that public API |
| 13 | endpoints are correctly using ``oslo.policy`` for authorization. |
| 14 | |
| 15 | In other words, all tests in Patrole are RBAC tests. |
| 16 | |
Felipe Monteiro | 443d39c | 2018-04-08 17:05:33 -0400 | [diff] [blame^] | 17 | :ref:`rbac_field_guide` |
| 18 | ======================= |
| 19 | |
| 20 | RBAC tests are `Tempest`_-like API tests plus Patrole's |
| 21 | :ref:`rbac-validation`. All Patrole tests are RBAC validation tests for the |
| 22 | OpenStack API. |
| 23 | |
| 24 | .. _Tempest: https://docs.openstack.org/tempest/latest/ |
| 25 | |
Felipe Monteiro | f9ace2b | 2018-02-27 09:43:51 -0500 | [diff] [blame] | 26 | Stable Tests |
| 27 | ============ |
| 28 | |
| 29 | In the discussion below, "correct" means that a test is consistent with |
| 30 | a service's API-to-policy mapping and "stable" means that a test should |
| 31 | require minimal maintenance for the supported releases. |
| 32 | |
| 33 | Present |
| 34 | ------- |
| 35 | |
| 36 | During the Queens release, a `governance spec`_ was pushed to support policy |
| 37 | in code, which documents the mapping between APIs and each of their policies. |
| 38 | |
| 39 | This documentation is an important prerequisite for ensuring that Patrole |
| 40 | tests for a given service are correct. This mapping can be referenced to |
| 41 | confirm that Patrole's assumed mapping for a test is correct. For |
| 42 | example, Nova has implemented policy in code which can be used to verify |
| 43 | that Patrole's Nova RBAC tests use the same mapping. |
| 44 | |
| 45 | If a given service does not have policy in code, this implies that it is |
| 46 | *more likely* that the RBAC tests for that service are inconsistent with the |
| 47 | *intended* policy mapping. Until that service implements policy in code, it |
| 48 | is difficult for Patrole maintainers to verify that tests for that service |
| 49 | are correct. |
| 50 | |
| 51 | Future |
| 52 | ------ |
| 53 | |
| 54 | Once all services that Patrole tests have implemented policy in code -- |
| 55 | and once Patrole has updated all its tests in accordance with the policy in |
| 56 | code documentation -- then Patrole tests can guaranteed to be stable. |
| 57 | |
| 58 | This stability will be denoted with a 1.0 version release. |
| 59 | |
| 60 | .. _governance spec: https://governance.openstack.org/tc/goals/queens/policy-in-code.html |