<div dir="ltr"><div>As long as there's some way to get the *declarative* policy from the system (as a data file or as an API call) that sounds fine.  But I'm dubious that it will be easy to keep the API call that returns the declarative policy in sync with the actual code that implements that policy.<br><br></div>Tim<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 1:53 PM, Doug Hellmann <span dir="ltr"><<a href="mailto:doug@doughellmann.com" target="_blank">doug@doughellmann.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Excerpts from Sean Dague's message of 2015-06-03 13:34:11 -0400:<br>
<div><div class="h5">> On 06/03/2015 12:10 PM, Tim Hinrichs wrote:<br>
> > I definitely buy the idea of layering policies on top of each other.<br>
> > But I'd worry about the long-term feasibility of putting default<br>
> > policies into code mainly because it ensures we'll never be able to<br>
> > provide any tools that help users (or other services like Horizon) know<br>
> > what the effective policy actually is.  In contrast, if the code is just<br>
> > an implementation of the API, and there is some (or perhaps several)<br>
> > declarative description(s) of which of those APis are permitted to be<br>
> > executed by whom, we can build tools to analyze those policies.  Two<br>
> > thoughts.<br>
> ><br>
> > 1) If the goal is to provide warnings to the user about questionable API<br>
> > policy choices, I'd suggest adding policy-analysis functionality to say<br>
> > oslo_policy.  The policy-analysis code would take 2 inputs: (i) the<br>
> > policy and (ii) a list of policy properties, and would generate a<br>
> > warning if any of the properties are true for the given policy.   Then<br>
> > each project could provide a file that describes which policy properties<br>
> > are questionable, and anyone wanting to see the warnings run the<br>
> > functionality on that project's policy and the project's policy property<br>
> > file.<br>
> ><br>
> > It would definitely help me if we saw a handful of examples of the<br>
> > warnings we'd want to generate.<br>
><br>
> WARN: "server create permissions have been restricted from the default,<br>
> this may impede operation and interoperability of your OpenStack<br>
> installation"<br>
><br>
> > 2) If the goal is to provide sensible defaults so the system functions<br>
> > if there's no policy.json (or a dynamic policy cached from Keystone),<br>
> > why not create a default_policy.json file and use that whenever<br>
> > policy.json doesn't exist (or more precisely to use policy.json to<br>
> > override default_policy.json in some reasonable way).<br>
><br>
> Because it's still a file, living in /etc. Files living in etc are<br>
> things people feel they can modify. They are also things that don't<br>
> always get deployed correctly with code deploys. People might not<br>
> realize that default_policy.json is super important to be updated every<br>
> time the code is rolled out.<br>
<br>
</div></div>It doesn't have to live in /etc, though. It could be packaged in the<br>
nova code namespace as a data file, and accessed from there.<br>
<span class="HOEnZb"><font color="#888888"><br>
Doug<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>