<div dir="ltr">and the 'nova-policy' command was introduced at the same time.... finally found the right release notes:<div><br></div><div>ref: <a href="https://docs.openstack.org/releasenotes/nova/newton.html">https://docs.openstack.org/releasenotes/nova/newton.html</a><br><div><br></div><div><span style="color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px">The nova-policy command line is implemented as a tool to experience the under-development feature policy discovery. User can input the credentials infomation and the instance info, the tool will return a list of API which can be allowed to invoke. There isn’t any contract for the interface of the tool due to the feature still under-development.</span><br></div><div><span style="color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px"><br></span></div><div><span style="color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px">and</span></div><div><span style="color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px"><br></span></div><div><p class="gmail-first" style="line-height:1.5em;color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px">The API policy defaults are now defined in code like configuration options. Because of this, the sample policy.json file that is shipped with Nova is empty and should only be necessary if you want to override the API policy from the defaults in the code. To generate the policy file you can run:</p><div class="gmail-highlight-python" style="color:rgb(62,67,73);font-family:arial,sans-serif;font-size:14.4px"><div class="gmail-highlight" style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><pre style="overflow:auto;padding:10px;color:rgb(85,85,85);line-height:1.2em;border:1px solid rgb(198,201,203);font-size:1.1em;margin-top:1.5em;margin-bottom:1.5em"><span class="gmail-n">oslopolicy</span><span class="gmail-o" style="color:rgb(102,102,102)">-</span><span class="gmail-n">sample</span><span class="gmail-o" style="color:rgb(102,102,102)">-</span><span class="gmail-n">generator</span> <span class="gmail-o" style="color:rgb(102,102,102)">--</span><span class="gmail-n">config</span><span class="gmail-o" style="color:rgb(102,102,102)">-</span><span class="gmail-nb" style="color:rgb(0,112,32)">file</span><span class="gmail-o" style="color:rgb(102,102,102)">=</span><span class="gmail-n">etc</span><span class="gmail-o" style="color:rgb(102,102,102)">/</span><span class="gmail-n">nova</span><span class="gmail-o" style="color:rgb(102,102,102)">/</span><span class="gmail-n">nova</span><span class="gmail-o" style="color:rgb(102,102,102)">-</span><span class="gmail-n">policy</span><span class="gmail-o" style="color:rgb(102,102,102)">-</span><span class="gmail-n">generator</span><span class="gmail-o" style="color:rgb(102,102,102)">.</span><span class="gmail-n">conf</span></pre></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 3:17 PM, David Medberry <span dir="ltr"><<a href="mailto:openstack@medberry.net" target="_blank">openstack@medberry.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yep what Logan said. I'm pretty sure Sean Dague talked about this at the last Operator's mid-cycle. The "blank" policy.json just means you get the default policies. You set a value to override the defaults.<div><br></div><div>I don't see it in the Ocata relnotes but git indicates this is where it happened:</div><div><br></div><div><a href="https://github.com/openstack/nova/blob/stable/mitaka/etc/nova/policy.json" target="_blank">https://github.com/openstack/<wbr>nova/blob/stable/mitaka/etc/<wbr>nova/policy.json</a><br></div><div><a href="https://github.com/openstack/nova/blob/stable/newton/etc/nova/policy.json" target="_blank">https://github.com/openstack/<wbr>nova/blob/stable/newton/etc/<wbr>nova/policy.json</a><br></div><div><br></div><div>again, no change in behavior...</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 3:06 PM, Logan V. <span dir="ltr"><<a href="mailto:logan@protiumit.com" target="_blank">logan@protiumit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think this actually started in Newton. Yes it ships blank, however<br>
there is still a default policy implemented as before with similar<br>
defaults separating the admin and user roles. The default policy is<br>
implemented in the nova code base<br>
(<a href="https://github.com/openstack/nova/tree/stable/newton/nova/policies" rel="noreferrer" target="_blank">https://github.com/openstack/<wbr>nova/tree/stable/newton/nova/p<wbr>olicies</a>)<br>
and overrides can be provided using policy.json (which also accepts<br>
yaml despite what the file extension would lead you to believe). The<br>
difference now is that the default policy is not enumerated in a<br>
policy.json file by default. You can obtain the default policy by<br>
running<br>
oslopolicy-sample-generator --namespace nova<br>
<br>
There are also several other oslopolicy-* tools like<br>
oslopolicy-list-redundant - can be used to list policies defined in<br>
the policy.json which are redundant to the default policy<br>
oslopolicy-checker -test access against a specific policy item<br>
oslopolicy-policy-generator - dump a consolidated view of the policy<br>
(ie defaults combined with overrides) for use with ie. horizon's<br>
policy things. One thing I found with exporting this dump from nova<br>
and using it in horizon is that you must define a policy called<br>
"default" (usually set to "rule:admin_or_owner") because it is not<br>
included in the dump and it seemed to cause some odd behavior in<br>
horizon like the instances tab not showing up under the admin panel.<br>
<div><div class="m_-6745617397768285013h5"><br>
<br>
On Thu, Feb 23, 2017 at 1:52 PM, Edgar Magana <<a href="mailto:edgar.magana@workday.com" target="_blank">edgar.magana@workday.com</a>> wrote:<br>
> Am I understanding correctly that in Ocata release, the policy.json file for<br>
> NOVA is blank?<br>
><br>
> What does that mean for us (operators)? Everything will be open for<br>
> everybody for the other way around?<br>
><br>
><br>
><br>
> In any case, that sounds like an awful approach because know if we upgrade<br>
> we will need to be sure that we have a proper json file while in the past we<br>
> at least were starting from the default one.<br>
><br>
><br>
><br>
> Edgar<br>
><br>
><br>
><br>
> From: David Medberry <<a href="mailto:openstack@medberry.net" target="_blank">openstack@medberry.net</a>><br>
> Date: Thursday, February 23, 2017 at 10:45 AM<br>
> To: "<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.ope<wbr>nstack.org</a>"<br>
> <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.ope<wbr>nstack.org</a>><br>
> Subject: [Openstack-operators] Policy Updates<br>
><br>
><br>
><br>
> Nova no longer ships with a fleshed-out skeleton of all policy.json. It<br>
> ships blank.<br>
><br>
><br>
><br>
> Discussion in here on how to help operators select specific settings to<br>
> include in their policy.json via documentation.<br>
><br>
><br>
><br>
> You (as an op) may want to review and comment on this. This model is being<br>
> proposed for all openstack projects (or at least MORE openstack projects.)<br>
><br>
><br>
><br>
> <a href="https://review.openstack.org/#/c/433010" rel="noreferrer" target="_blank">https://review.openstack.org/#<wbr>/c/433010</a><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> OpenStack-operators mailing list<br>
> <a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.open<wbr>stack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-operators</a><br>
><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>