<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
tt
{mso-style-priority:99;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1633947296;
mso-list-type:hybrid;
mso-list-template-ids:1801106182 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The work described below has been completed with a few changes from the original description. This change is for nova only.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The require_admin_context has been removed in cases where it overrode the policy set in policy.json<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Error handling has been cleaned up. All calls should return an HTTP 403 when a policy check fails.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">A number of apis which were grouped together under a single policy have been broken out so more granular policies can be defined.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The default rule still exists. Blank rules in the policy.json still default to true. This was done to maintain backward compatibility.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The change is
<a href="https://review.openstack.org/#/c/32762">https://review.openstack.org/#/c/32762</a> It still needs one more core reviewer to approve it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Michael J Fork [mailto:mjfork@us.ibm.com]
<br>
<b>Sent:</b> Wednesday, May 01, 2013 3:57 PM<br>
<b>To:</b> OpenStack Development Mailing List<br>
<b>Subject:</b> Re: [openstack-dev] view-only use case but APIs are admin-only<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><tt><span style="font-size:10.0pt">"Bak, Ed (HPCS Fort Collins)" <ed.bak2@hp.com> wrote on 04/25/2013 12:58:07 PM:</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
<tt>> From: "Bak, Ed (HPCS Fort Collins)" <ed.bak2@hp.com></tt></span><br>
<tt><span style="font-size:10.0pt">> To: OpenStack Development Mailing List <openstack-dev@lists.openstack.org>,
</span></tt><br>
<tt><span style="font-size:10.0pt">> Date: 04/25/2013 03:18 PM</span></tt><br>
<tt><span style="font-size:10.0pt">> Subject: Re: [openstack-dev] view-only use case but APIs are admin-only</span></tt><br>
<tt><span style="font-size:10.0pt">> </span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>> We also have a need for various explicit roles which we can’t put in</tt><br>
<tt>> place because of this issue. I have also noticed cases where </tt><br>
<tt>> certain rules aren’t granular enough and several places where an </tt><br>
<tt>> incorrect policy returns an HTTP 500 instead of an HTTP 403. I’m </tt><br>
<tt>> willing to fix all of this but I would like some buy in on a </tt><br>
<tt>> solution before I submit the code in order to minimize rework. I </tt><br>
<tt>> can turn this discussion into a blueprint if that is more </tt><br>
<tt>> appropriate. I would like to propose the following;</tt></span><br>
<tt><span style="font-size:10.0pt">> </span></tt><br>
<tt><span style="font-size:10.0pt">> 1. Remove the require_admin_context everywhere. Access to
</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>> actions will then only be controlled through roles specified through</tt><br>
<tt>> policy.json.</tt></span><br>
<tt><span style="font-size:10.0pt">> 2. Fix the cases where a single rule can apply to multiple
</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>> actions. In most cases the groupings make sense, but making things </tt><br>
<tt>> as granular as possible will allow everyone to define rules and </tt><br>
<tt>> roles in the most flexible way possible.</tt></span><br>
<tt><span style="font-size:10.0pt">> 3. Fix the error handling so that invalid permissions always
</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>> return a 403.</tt></span><br>
<tt><span style="font-size:10.0pt">> 4. Remove the concept of a default rule. In order to avoid
</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>> inadvertently opening up any current admin only functions, the </tt><br>
<tt>> default behavior when a rule is not specified should be a failure ( </tt><br>
<tt>> or maybe require admin in this case ).</tt></span><br>
<br>
<tt><span style="font-size:10.0pt">+1 to all these proposals (and to turning this into a blueprint). </span></tt><br>
<br>
<tt><span style="font-size:10.0pt">Just for clarity, are you talking about fixing Nova only or across all the projects?</span></tt><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Architect, OpenStack Development<br>
IBM Systems & Technology Group</span><o:p></o:p></p>
</div>
</body>
</html>