keystone  18.0.0
About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (maintained release).
  Fossies Dox: keystone-18.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

policies.inc
Go to the documentation of this file.
1 .. -*- rst -*-
2 
3 ==========
4  Policies
5 ==========
6 
7 .. warning::
8 
9  The ``policies`` API is deprecated. Keystone is not a policy management
10  service. Do not use this.
11 
12 A policy is an arbitrarily serialized policy engine rule set to be
13 consumed by a remote service.
14 
15 You encode policy rule sets into a blob that remote services can
16 consume. To do so, set ``type`` to ``application/json`` and specify
17 policy rules as JSON strings in a ``blob``. For example:
18 
19 ::
20 
21  {
22  "blob":{
23  "foobar_user":[
24  "role:compute-user"
25  ]
26  }
27  }
28 
29 
30 Create policy
31 =============
32 
33 .. rest_method:: POST /v3/policies
34 
35 Creates a policy.
36 
37 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/policies``
38 
39 Request
40 -------
41 
42 Parameters
43 ~~~~~~~~~~
44 
45 .. rest_parameters:: parameters.yaml
46 
47  - policy: policy
48  - type: policy_type
49  - blob: policy_blob_str
50 
51 Example
52 ~~~~~~~
53 
54 .. literalinclude:: ./samples/admin/policy-create-request.json
55  :language: javascript
56 
57 Response
58 --------
59 
60 Parameters
61 ~~~~~~~~~~
62 
63 .. rest_parameters:: parameters.yaml
64 
65  - links: policy_links
66  - blob: policy_blob_str
67  - policy: policy
68  - type: policy_type
69  - id: policy_id
70 
71 Status Codes
72 ~~~~~~~~~~~~
73 
74 .. rest_status_code:: success status.yaml
75 
76  - 201
77 
78 .. rest_status_code:: error status.yaml
79 
80  - 400
81  - 401
82  - 403
83  - 404
84  - 405
85  - 409
86  - 413
87  - 415
88  - 503
89 
90 List policies
91 =============
92 
93 .. rest_method:: GET /v3/policies
94 
95 Lists policies.
96 
97 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/policies``
98 
99 Request
100 -------
101 
102 Parameters
103 ~~~~~~~~~~
104 
105 .. rest_parameters:: parameters.yaml
106 
107  - type: policy_type_query
108 
109 Response
110 --------
111 
112 Parameters
113 ~~~~~~~~~~
114 
115 .. rest_parameters:: parameters.yaml
116 
117  - links: policy_links
118  - blob: policy_blob_obj
119  - policies: policies
120  - type: policy_type
121  - id: policy_id
122 
123 Status Codes
124 ~~~~~~~~~~~~
125 
126 .. rest_status_code:: success status.yaml
127 
128  - 200
129 
130 .. rest_status_code:: error status.yaml
131 
132  - 400
133  - 401
134  - 403
135  - 404
136  - 405
137  - 413
138  - 503
139 
140 Example
141 ~~~~~~~
142 
143 .. literalinclude:: ./samples/admin/policies-list-response.json
144  :language: javascript
145 
146 
147 Show policy details
148 ===================
149 
150 .. rest_method:: GET /v3/policies/{policy_id}
151 
152 Shows details for a policy.
153 
154 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/policy``
155 
156 Request
157 -------
158 
159 Parameters
160 ~~~~~~~~~~
161 
162 .. rest_parameters:: parameters.yaml
163 
164  - policy_id: policy_id_path
165 
166 Response
167 --------
168 
169 Parameters
170 ~~~~~~~~~~
171 
172 .. rest_parameters:: parameters.yaml
173 
174  - links: policy_links
175  - blob: policy_blob_obj
176  - policy: policy
177  - type: policy_type
178  - id: policy_id
179 
180 Status Codes
181 ~~~~~~~~~~~~
182 
183 .. rest_status_code:: success status.yaml
184 
185  - 200
186 
187 .. rest_status_code:: error status.yaml
188 
189  - 400
190  - 401
191  - 403
192  - 404
193  - 405
194  - 413
195  - 503
196 
197 Example
198 ~~~~~~~
199 
200 .. literalinclude:: ./samples/admin/policy-show-response.json
201  :language: javascript
202 
203 
204 Update policy
205 =============
206 
207 .. rest_method:: PATCH /v3/policies/{policy_id}
208 
209 Updates a policy.
210 
211 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/policy``
212 
213 Request
214 -------
215 
216 Parameters
217 ~~~~~~~~~~
218 
219 .. rest_parameters:: parameters.yaml
220 
221  - policy_id: policy_id_path
222  - policy: policy
223  - type: policy_type
224  - blob: policy_blob_obj
225 
226 Example
227 ~~~~~~~
228 
229 .. literalinclude:: ./samples/admin/policy-update-request.json
230  :language: javascript
231 
232 Response
233 --------
234 
235 Parameters
236 ~~~~~~~~~~
237 
238 .. rest_parameters:: parameters.yaml
239 
240  - links: policy_links
241  - blob: policy_blob_obj
242  - policy: policy
243  - type: policy_type
244  - id: policy_id
245 
246 Status Codes
247 ~~~~~~~~~~~~
248 
249 .. rest_status_code:: success status.yaml
250 
251  - 200
252 
253 .. rest_status_code:: error status.yaml
254 
255  - 400
256  - 401
257  - 403
258  - 404
259  - 405
260  - 409
261  - 413
262  - 415
263  - 503
264 
265 Example
266 ~~~~~~~
267 
268 .. literalinclude:: ./samples/admin/policy-update-response.json
269  :language: javascript
270 
271 
272 Delete policy
273 =============
274 
275 .. rest_method:: DELETE /v3/policies/{policy_id}
276 
277 Deletes a policy.
278 
279 Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/policy``
280 
281 Request
282 -------
283 
284 Parameters
285 ~~~~~~~~~~
286 
287 .. rest_parameters:: parameters.yaml
288 
289  - policy_id: policy_id_path
290 
291 Response
292 --------
293 
294 Status Codes
295 ~~~~~~~~~~~~
296 
297 .. rest_status_code:: success status.yaml
298 
299  - 204
300 
301 .. rest_status_code:: error status.yaml
302 
303  - 400
304  - 401
305  - 403
306  - 404
307  - 405
308  - 409
309  - 413
310  - 415
311  - 503
keystone.common.policies.base.rules
list rules
Definition: base.py:63