blob: ba06c4232b55063b08eaa027dfdb111f5c3b649c [file] [log] [blame]
Felipe Monteiro443d39c2018-04-08 17:05:33 -04001.. _patrole-field-guide:
Felipe Monteirof9ace2b2018-02-27 09:43:51 -05002
Felipe Monteiro443d39c2018-04-08 17:05:33 -04003============================
4Patrole Field Guide Overview
5============================
Felipe Monteirof9ace2b2018-02-27 09:43:51 -05006
7Testing Scope
8=============
9
10Patrole testing scope is strictly confined to Role-Based Access Control
11(RBAC). In OpenStack, ``oslo.policy`` is the RBAC library used by all
12major services. Thus, Patrole is concerned with validating that public API
13endpoints are correctly using ``oslo.policy`` for authorization.
14
15In other words, all tests in Patrole are RBAC tests.
16
Felipe Monteiro443d39c2018-04-08 17:05:33 -040017:ref:`rbac_field_guide`
18=======================
19
20RBAC tests are `Tempest`_-like API tests plus Patrole's
21:ref:`rbac-validation`. All Patrole tests are RBAC validation tests for the
22OpenStack API.
23
24.. _Tempest: https://docs.openstack.org/tempest/latest/
25
Felipe Monteirof9ace2b2018-02-27 09:43:51 -050026Stable Tests
27============
28
29In the discussion below, "correct" means that a test is consistent with
30a service's API-to-policy mapping and "stable" means that a test should
31require minimal maintenance for the supported releases.
32
33Present
34-------
35
36During the Queens release, a `governance spec`_ was pushed to support policy
37in code, which documents the mapping between APIs and each of their policies.
38
39This documentation is an important prerequisite for ensuring that Patrole
40tests for a given service are correct. This mapping can be referenced to
41confirm that Patrole's assumed mapping for a test is correct. For
42example, Nova has implemented policy in code which can be used to verify
43that Patrole's Nova RBAC tests use the same mapping.
44
45If 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
48is difficult for Patrole maintainers to verify that tests for that service
49are correct.
50
51Future
52------
53
54Once all services that Patrole tests have implemented policy in code --
55and once Patrole has updated all its tests in accordance with the policy in
56code documentation -- then Patrole tests can guaranteed to be stable.
57
58This 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