This file is indexed.

/usr/share/doc/python-oslo.policy-doc/html/admin/policy-yaml-file.html is in python-oslo.policy-doc 1.33.1-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>

    <title>OpenStack Docs: The policy.yaml file</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Bootstrap CSS -->
<link href="../_static/css/bootstrap.min.css" rel="stylesheet">

<!-- Pygments CSS -->
<link href="../_static/css/native.css" rel="stylesheet">

<!-- Fonts -->
<link href="../_static/css/font-awesome.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="../_static/css/combined.css" rel="stylesheet">
  

  </head>
  <body>

<!-- SOURCE_FILE: https://git.openstack.org/cgit/openstack/oslo.policy/tree/doc/source/admin/policy-yaml-file.rst -->

 <script type="text/javascript">
    (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
                (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
        e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
    })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

    _st('install','aDn5L_vgZ2yzRcE893kK','2.0.0');
</script>
<nav class="navbar navbar-default" role="navigation">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button class="navbar-toggle" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="brand-wrapper">
        <a class="navbar-brand" href="index.html"></a>
      </div>
    </div>
  </div>
  <!-- /.container -->
</nav>
    <div class="container docs-book-wrapper">
      <div class="row">
        <div class="col-lg-9 col-md-8 col-sm-8 col-lg-push-3 col-md-push-4 col-sm-push-4">
<div class="row">
  <div class="col-lg-8">
      <h2>The policy.yaml file</h2>
    
  </div>
  <div class="docs-actions">
    
    <a href="index.html"><i class="fa fa-angle-double-left" data-toggle="tooltip" data-placement="top" title="Previous: Administering Applications that use oslo.policy"></i></a>
    
    
    <a href="policy-json-file.html"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: The policy.json file"></i></a>
    
    <a id="logABugLink1" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a>
    
  </div>
</div>
          <div class="row docs-byline">
            <div class="docs-updated">updated: 2018-01-26 10:48</div>
          </div>
          <div class="row">
            <div class="col-lg-12">
              <div class="docs-body">

  <div class="section" id="the-policy-yaml-file">
<h1>The policy.yaml file<a class="headerlink" href="#the-policy-yaml-file" title="Permalink to this headline"></a></h1>
<p>Each OpenStack service, Identity, Compute, Networking, and so on, has its
own role-based access policies. They determine which user can access
which objects in which way, and are defined in the service’s
<code class="docutils literal"><span class="pre">policy.yaml</span></code> file.</p>
<p>Whenever an API call to an OpenStack service is made, the service’s
policy engine uses the appropriate policy definitions to determine if
the call can be accepted. Any changes to <code class="docutils literal"><span class="pre">policy.yaml</span></code> are effective
immediately, which allows new policies to be implemented while the
service is running.</p>
<p>A <code class="docutils literal"><span class="pre">policy.yaml</span></code> file is a text file in YAML (YAML Ain’t Markup Language)
format. Each policy is defined by a one-line statement in the
form <code class="docutils literal"><span class="pre">&quot;&lt;target&gt;&quot;</span> <span class="pre">:</span> <span class="pre">&quot;&lt;rule&gt;&quot;</span></code>.</p>
<p>The policy target, also named “action”, represents an API call like
“start an instance” or “attach a volume”.</p>
<p>Action names are usually qualified. For example, the Compute service features
API calls to list instances, volumes, and networks. In
<code class="docutils literal"><span class="pre">/etc/nova/policy.yaml</span></code>, these APIs are represented by
<code class="docutils literal"><span class="pre">compute:get_all</span></code>, <code class="docutils literal"><span class="pre">volume:get_all</span></code>, and <code class="docutils literal"><span class="pre">network:get_all</span></code>,
respectively.</p>
<p>The mapping between API calls and actions is not generally documented.</p>
<p>The policy rule determines under which circumstances the API call is
permitted. Usually this involves the user who makes the call (hereafter
named the “API user”) and often the object on which the API call
operates. A typical rule checks if the API user is the object’s owner.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p><strong>Modifying the policy</strong></p>
<p class="last">While recipes for editing <code class="docutils literal"><span class="pre">policy.yaml</span></code> files are found on blogs,
modifying the policy can have unexpected side effects and is not
encouraged.</p>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<p>A simple rule might look like this:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;compute:get_all&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;&quot;</span>
</pre></div>
</div>
<p>The target is <code class="docutils literal"><span class="pre">&quot;compute:get_all&quot;</span></code>, the “list all instances” API of the
Compute service. The rule is an empty string meaning “always”. This
policy allows anybody to list instances.</p>
<p>You can also decline permission to use an API:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;compute:shelve&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;!&quot;</span>
</pre></div>
</div>
<p>The exclamation mark stands for “never” or “nobody”, which effectively
disables the Compute API “shelve an instance”.</p>
<p>Many APIs can only be called by administrators. This can be expressed by
the rule <code class="docutils literal"><span class="pre">&quot;role:admin&quot;</span></code>. The following policy ensures that only
administrators can create new users in the Identity database:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;identity:create_user&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;role:admin&quot;</span>
</pre></div>
</div>
<p>You can limit APIs to any role. For example, the Orchestration service
defines a role named <code class="docutils literal"><span class="pre">heat_stack_user</span></code>. Whoever has this role is not
allowed to create stacks:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;stacks:create&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;not</span><span class="nv"> </span><span class="s">role:heat_stack_user&quot;</span>
</pre></div>
</div>
<p>This rule makes use of the boolean operator <code class="docutils literal"><span class="pre">not</span></code>. More complex rules
can be built using operators <code class="docutils literal"><span class="pre">and</span></code>, <code class="docutils literal"><span class="pre">or</span></code>, and parentheses.</p>
<p>You can define aliases for rules:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;deny_stack_user&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;not</span><span class="nv"> </span><span class="s">role:heat_stack_user&quot;</span>
</pre></div>
</div>
<p>The policy engine understands that <code class="docutils literal"><span class="pre">&quot;deny_stack_user&quot;</span></code> is not an API
and consequently interprets it as an alias. The stack creation policy
above can then be written as:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;stacks:create&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;rule:deny_stack_user&quot;</span>
</pre></div>
</div>
<p>This is taken verbatim from <code class="docutils literal"><span class="pre">/etc/heat/policy.yaml</span></code>.</p>
<p>Rules can compare API attributes to object attributes. For example:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;os_compute_api:servers:start&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;project_id:%(project_id)s&quot;</span>
</pre></div>
</div>
<p>states that only the owner of an instance can start it up. The
<code class="docutils literal"><span class="pre">project_id</span></code> string before the colon is an API attribute, namely the project
ID of the API user. It is compared with the project ID of the object (in
this case, an instance). More precisely, it is compared with the
<code class="docutils literal"><span class="pre">project_id</span></code> field of that object in the database. If the two values are
equal, permission is granted.</p>
<p>An administrator always has permission to call APIs. This is how
<code class="docutils literal"><span class="pre">/etc/keystone/policy.yaml</span></code> makes this policy explicit:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;admin_required&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;role:admin</span><span class="nv"> </span><span class="s">or</span><span class="nv"> </span><span class="s">is_admin:1&quot;</span>
<span class="s">&quot;owner&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;user_id:%(user_id)s&quot;</span>
<span class="s">&quot;admin_or_owner&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;rule:admin_required</span><span class="nv"> </span><span class="s">or</span><span class="nv"> </span><span class="s">rule:owner&quot;</span>
<span class="s">&quot;identity:change_password&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;rule:admin_or_owner&quot;</span>
</pre></div>
</div>
<p>The first line defines an alias for “user is an admin user”. The
<code class="docutils literal"><span class="pre">is_admin</span></code> flag is only used when setting up the Identity service for
the first time. It indicates that the user has admin privileges granted
by the service token (<code class="docutils literal"><span class="pre">--os-token</span></code> parameter of the <code class="docutils literal"><span class="pre">keystone</span></code>
command line client).</p>
<p>The second line creates an alias for “user owns the object” by comparing
the API’s user ID with the object’s user ID.</p>
<p>Line 3 defines a third alias <code class="docutils literal"><span class="pre">admin_or_owner</span></code>, combining the two first
aliases with the Boolean operator <code class="docutils literal"><span class="pre">or</span></code>.</p>
<p>Line 4 sets up the policy that a password can only be modified by its
owner or an admin user.</p>
<p>As a final example, let’s examine a more complex rule:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;identity:ec2_delete_credential&quot;</span><span class="p p-Indicator">:</span> <span class="s">&quot;rule:admin_required</span><span class="nv"> </span><span class="s">or</span>
             <span class="s">(rule:owner</span><span class="nv"> </span><span class="s">and</span><span class="nv"> </span><span class="s">user_id:%(target.credential.user_id)s)&quot;</span>
</pre></div>
</div>
<p>This rule determines who can use the Identity API “delete EC2
credential”. Here, boolean operators and parentheses combine three
simpler rules. <code class="docutils literal"><span class="pre">admin_required</span></code> and <code class="docutils literal"><span class="pre">owner</span></code> are the same aliases as
in the previous example. <code class="docutils literal"><span class="pre">user_id:%(target.credential.user_id)s</span></code>
compares the API user with the user ID of the credential object
associated with the target.</p>
</div>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline"></a></h2>
<p>A <code class="docutils literal"><span class="pre">policy.yaml</span></code> file consists of policies and aliases of the form
<code class="docutils literal"><span class="pre">target:rule</span></code> or <code class="docutils literal"><span class="pre">alias:definition</span></code>, separated by commas and
enclosed in curly braces:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;alias</span><span class="nv"> </span><span class="s">1&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;definition</span><span class="nv"> </span><span class="s">1&quot;</span>
<span class="s">&quot;alias</span><span class="nv"> </span><span class="s">2&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;definition</span><span class="nv"> </span><span class="s">2&quot;</span>
<span class="l l-Scalar l-Scalar-Plain">....</span>
<span class="s">&quot;target</span><span class="nv"> </span><span class="s">1&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;rule</span><span class="nv"> </span><span class="s">1&quot;</span>
<span class="s">&quot;target</span><span class="nv"> </span><span class="s">2&quot;</span> <span class="p p-Indicator">:</span> <span class="s">&quot;rule</span><span class="nv"> </span><span class="s">2&quot;</span>
<span class="l l-Scalar l-Scalar-Plain">....</span>
</pre></div>
</div>
<p>Targets are APIs and are written <code class="docutils literal"><span class="pre">&quot;service:API&quot;</span></code> or simply <code class="docutils literal"><span class="pre">&quot;API&quot;</span></code>.
For example, <code class="docutils literal"><span class="pre">&quot;compute:create&quot;</span></code> or <code class="docutils literal"><span class="pre">&quot;add_image&quot;</span></code>.</p>
<p>Rules determine whether the API call is allowed.</p>
<p>Rules can be:</p>
<ul class="simple">
<li>Always true. The action is always permitted. This can be written as
<code class="docutils literal"><span class="pre">&quot;&quot;</span></code> (empty string), <code class="docutils literal"><span class="pre">[]</span></code>, or <code class="docutils literal"><span class="pre">&quot;&#64;&quot;</span></code>.</li>
<li>Always false. The action is never permitted. Written as <code class="docutils literal"><span class="pre">&quot;!&quot;</span></code>.</li>
<li>A special check</li>
<li>A comparison of two values</li>
<li>Boolean expressions based on simpler rules</li>
</ul>
<p>Special checks are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">&lt;role&gt;:&lt;role</span> <span class="pre">name&gt;</span></code>, a test whether the API credentials contain
this role.</li>
<li><code class="docutils literal"><span class="pre">&lt;rule&gt;:&lt;rule</span> <span class="pre">name&gt;</span></code>, the definition of an alias.</li>
<li><code class="docutils literal"><span class="pre">http:&lt;target</span> <span class="pre">URL&gt;</span></code>, which delegates the check to a remote server.
The API is authorized when the server returns True.</li>
</ul>
<p>Developers can define additional special checks.</p>
<p>Two values are compared in the following way:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="s">&quot;value1</span><span class="nv"> </span><span class="s">:</span><span class="nv"> </span><span class="s">value2&quot;</span>
</pre></div>
</div>
<p>Possible values are:</p>
<ul class="simple">
<li>Constants: Strings, numbers, <code class="docutils literal"><span class="pre">true</span></code>, <code class="docutils literal"><span class="pre">false</span></code></li>
<li>API attributes</li>
<li>Target object attributes</li>
<li>The flag <code class="docutils literal"><span class="pre">is_admin</span></code></li>
</ul>
<p>API attributes can be <code class="docutils literal"><span class="pre">project_id</span></code>, <code class="docutils literal"><span class="pre">user_id</span></code> or <code class="docutils literal"><span class="pre">domain_id</span></code>.</p>
<p>Target object attributes are fields from the object description in the
database. For example in the case of the <code class="docutils literal"><span class="pre">&quot;compute:start&quot;</span></code> API, the
object is the instance to be started. The policy for starting instances
could use the <code class="docutils literal"><span class="pre">%(project_id)s</span></code> attribute, that is the project that
owns the instance. The trailing <code class="docutils literal"><span class="pre">s</span></code> indicates this is a string.</p>
<p><code class="docutils literal"><span class="pre">is_admin</span></code> indicates that administrative privileges are granted via
the admin token mechanism (the <code class="docutils literal"><span class="pre">--os-token</span></code> option of the <code class="docutils literal"><span class="pre">keystone</span></code>
command). The admin token allows initialisation of the Identity database
before the admin role exists.</p>
<p>The alias construct exists for convenience. An alias is short name for a
complex or hard to understand rule. It is defined in the same way as a
policy:</p>
<div class="highlight-yaml"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">alias name</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">alias definition</span>
</pre></div>
</div>
<p>Once an alias is defined, use the <code class="docutils literal"><span class="pre">rule</span></code> keyword to use it in a policy
rule.</p>
</div>
</div>


              </div>
            </div>
          </div>
          <div class="docs-actions">
          
            <a href="index.html"><i class="fa fa-angle-double-left" data-toggle="tooltip" data-placement="top" title="Previous: Administering Applications that use oslo.policy"></i></a>
          
          
            <a href="policy-json-file.html"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: The policy.json file"></i></a>
          
            <a id="logABugLink3" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a>
          
          </div>
          <div class="row docs-byline bottom">
            <div class="docs-updated">updated: 2018-01-26 10:48</div>
          </div>
          <div class="row">
            <div class="col-lg-8 col-md-8 col-sm-8 docs-license">
<a href="https://creativecommons.org/licenses/by/3.0/">
 <img src="../_static/images/docs/license.png" alt="Creative Commons Attribution 3.0 License"/>
</a>
<p>
 Except where otherwise noted, this document is licensed under
 <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons
 Attribution 3.0 License</a>. See all <a href="http://www.openstack.org/legal">
 OpenStack Legal Documents</a>.
</p>
            </div>
            <div class="col-lg-4 col-md-4 col-sm-4 docs-actions-wrapper">
            <!-- ID buglinkbottom added so that pre-filled doc bugs
                 are sent to Launchpad projects related to the
                 document -->
              <a href="#" id="logABugLink2" class="docs-footer-actions"><i class="fa fa-bug"></i> found an error? report a bug</a>
              <a href="http://ask.openstack.org" class="docs-footer-actions"><i class="fa fa-question-circle"></i> questions?</a>
            </div>
          </div>
        </div>
<div class="col-lg-3 col-md-4 col-sm-4 col-lg-pull-9 col-md-pull-8 col-sm-pull-8 docs-sidebar">
  <div class="btn-group docs-sidebar-releases">
    <button onclick="location.href='/'" class="btn docs-sidebar-home" data-toggle="tooltip" data-placement="top" title="Docs Home"><i class="fa fa-arrow-circle-o-left"></i></button>
<button href="#" type="button" data-toggle="dropdown" class="btn docs-sidebar-release-select">OpenStack Documentation<i class="fa fa-caret-down"></i></button>
    <ul class="dropdown-menu docs-sidebar-dropdown" role="menu" aria-labelledby="dLabel">
      <li role="presentation" class="dropdown-header">Guides</li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#install-guides">Install Guides</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#user-guides">User Guides</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#configuration-guides">Configuration Guides</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#ops-and-admin-guides">Operations and Administration Guides</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#api-guides">API Guides</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/index.html#contributor-guides">Contributor Guides</a></li>
      <li role="presentation" class="dropdown-header">Languages</li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/de/">Deutsch (German)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/fr/">Français (French)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/id/">Bahasa Indonesia (Indonesian)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/it/">Italiano (Italian)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/ja/">日本語 (Japanese)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/ko_KR/">한국어 (Korean)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/pt_BR/">Português (Portuguese)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/tr_TR/">Türkçe (Türkiye)</a></li>
      <li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.openstack.org/zh_CN/">简体中文 (Simplified Chinese)</a></li>
    </ul>
  </div>
  <div class="docs-sidebar-toc">
    <div class="docs-sidebar-section" id="table-of-contents">
      <a href="../index.html" class="docs-sidebar-section-title"><h4>oslo.policy </h4></a>
      <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../install/index.html">Installation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administering Applications that use oslo.policy</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">The policy.yaml file</a></li>
<li class="toctree-l2"><a class="reference internal" href="policy-json-file.html">The policy.json file</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cli/index.html">Command Line Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">Using oslo.policy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../reference/index.html">oslo.policy API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../contributor/index.html">Contributing</a></li>
</ul>

    </div>

  <div class="docs-sidebar-toc">
    <div class="docs-sidebar-section" id="local-table-of-contents">
      <h4 class="docs-sidebar-section-title">Page Contents</h4>
      <ul>
<li><a class="reference internal" href="#">The policy.yaml file</a><ul>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#syntax">Syntax</a></li>
</ul>
</li>
</ul>

    </div>
  </div>
  </div>
</div>
      </div>
    </div>
<footer>
  <div class="container">
    <div class="row footer-links">
      <div class="col-lg-2 col-sm-2">
        <h3>OpenStack</h3>
        <ul>
          <li><a href="http://openstack.org/projects/">Projects</a></li>
          <li><a href="http://openstack.org/projects/openstack-security/">OpenStack Security</a></li>
          <li><a href="http://openstack.org/projects/openstack-faq/">Common Questions</a></li>
          <li><a href="http://openstack.org/blog/">Blog</a></li>
          <li><a href="http://openstack.org/news/">News</a></li>
        </ul>
      </div>
      <div class="col-lg-2 col-sm-2">
        <h3>Community</h3>
        <ul>
          <li><a href="http://openstack.org/community/">User Groups</a></li>
          <li><a href="http://openstack.org/community/events/">Events</a></li>
          <li><a href="http://openstack.org/community/jobs/">Jobs</a></li>
          <li><a href="http://openstack.org/foundation/companies/">Companies</a></li>
          <li><a href="http://docs.openstack.org/infra/manual/developers.html">Contribute</a></li>
        </ul>
      </div>
      <div class="col-lg-2 col-sm-2">
        <h3>Documentation</h3>
        <ul>
          <li><a href="http://docs.openstack.org">OpenStack Manuals</a></li>
          <li><a href="http://openstack.org/software/start/">Getting Started</a></li>
          <li><a href="http://developer.openstack.org">API Documentation</a></li>
          <li><a href="https://wiki.openstack.org">Wiki</a></li>
        </ul>
      </div>
      <div class="col-lg-2 col-sm-2">
        <h3>Branding & Legal</h3>
        <ul>
          <li><a href="http://openstack.org/brand/">Logos & Guidelines</a></li>
          <li><a href="http://openstack.org/brand/openstack-trademark-policy/">Trademark Policy</a></li>
          <li><a href="http://openstack.org/privacy/">Privacy Policy</a></li>
          <li><a href="https://wiki.openstack.org/wiki/How_To_Contribute#Contributor_License_Agreement">OpenStack CLA</a></li>
        </ul>
      </div>
      <div class="col-lg-4 col-sm-4">
        <h3>Stay In Touch</h3>
        <a href="https://twitter.com/OpenStack" target="_blank" class="social-icons footer-twitter"></a>
        <a href="https://www.facebook.com/openstack" target="_blank" class="social-icons footer-facebook"></a>
        <a href="https://www.linkedin.com/company/openstack" target="_blank" class="social-icons footer-linkedin"></a>
        <a href="https://www.youtube.com/user/OpenStackFoundation" target="_blank" class="social-icons footer-youtube"></a>
        <p class="fine-print">
          The OpenStack project is provided under the
          <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>. Openstack.org is powered by
          <a href="http://rackspace.com" target="_blank">Rackspace Cloud Computing</a>.
        </p>
      </div>
    </div>
  </div>
</footer>
<!-- jQuery -->
<script type="text/javascript" src="../_static/js/jquery-3.2.1.min.js"></script>

<!-- Bootstrap JavaScript -->
<script type="text/javascript" src="../_static/js/bootstrap.min.js"></script>

<!-- The rest of the JS -->
<script type="text/javascript" src="../_static/js/navigation.js"></script>

<!-- Docs JS -->
<script type="text/javascript" src="../_static/js/docs.js"></script>

<!-- Popovers -->
<script type="text/javascript" src="../_static/js/webui-popover.js"></script>

<!-- standard sphinx include libraries, which allow search highlighting -->
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/searchtools.js"></script>

<script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        SOURCELINK_SUFFIX: '.txt',
        HAS_SOURCE:  true
      };
</script>


<!-- Javascript for page -->
<script language="JavaScript">
/* build a description of this page including SHA, source location on git repo,
   build time and the project's launchpad bug tag. Set the HREF of the bug
   buttons */

    var lineFeed = "%0A";
    var gitURL = "Source: Can't derive source file URL";

    /* there have been cases where "pagename" wasn't set; better check for it */
        /* The URL of the source file on Git is based on the giturl variable
           in conf.py, which must be manually initialized to the source file
           URL in Git.
           "pagename" is a standard sphinx parameter containing the name of
           the source file, without extension.                             */

        var sourceFile = "admin/policy-yaml-file" + ".rst";
        gitURL = "Source: https://git.openstack.org/cgit/openstack/oslo.policy/tree/doc/source" + "/" + sourceFile;

    /* gitsha, project and bug_tag rely on variables in conf.py */
    var gitSha = "SHA: unknown";
        var bugProject = "oslo.policy";
        var bugTitle = "The policy.yaml file in oslo.policy";
    var fieldTags = "";
        var useStoryboard = "";


    /* "last_updated" is the build date and time. It relies on the
       conf.py variable "html_last_updated_fmt", which should include
       year/month/day as well as hours and minutes                   */
    var buildstring = "Release:  on 2018-01-26 10:48";

    var fieldComment = encodeURI(buildstring) +
                       lineFeed + encodeURI(gitSha) +
                       lineFeed + encodeURI(gitURL) ;

    logABug(bugTitle, bugProject, fieldComment, fieldTags);
</script>

  </body>
</html>