<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=gb2312">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@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:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:微软雅黑;
        panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
        {font-family:"\@微软雅黑";
        panose-1:2 11 5 3 2 2 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"纯文本 Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:"Calibri",sans-serif;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:宋体;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML 预设格式 Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.Char
        {mso-style-name:"纯文本 Char";
        mso-style-priority:99;
        mso-style-link:纯文本;
        font-family:"Calibri",sans-serif;}
span.HTMLChar
        {mso-style-name:"HTML 预设格式 Char";
        mso-style-priority:99;
        mso-style-link:"HTML 预设格式";
        font-family:宋体;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:585460105;
        mso-list-type:hybrid;
        mso-list-template-ids:-1399662390 1638924336 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:宋体;
        mso-bidi-font-family:"Courier New";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:42.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:63.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F06C;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:84.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:105.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F06C;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:147.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:168.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:189.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:957757087;
        mso-list-type:hybrid;
        mso-list-template-ids:-1544022836 -2021368046 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:18.0pt;
        text-indent:-18.0pt;
        font-family:Wingdings;
        mso-fareast-font-family:宋体;
        mso-bidi-font-family:"Courier New";}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:42.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:63.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F06C;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:84.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:105.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:126.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F06C;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:147.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F06E;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:168.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F075;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:189.0pt;
        text-indent:-21.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="ZH-CN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-US">> > On 8/15/2019 1:09 AM, </span><span style="font-family:宋体">崔恒香</span><span lang="EN-US"> wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > This is my problem with placement rest api.(Token and endpoint were
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > OK)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> >  </span><span lang="EN-US" style="font-family:"Courier New"">       </span><span lang="EN-US"> {"errors": [{"status": 403,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> >  </span><span lang="EN-US" style="font-family:"Courier New"">                        </span><span lang="EN-US"> "title": "Forbidden",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > "detail": "Access was denied to this resource.\n\n Policy does not
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > allow placement:resource_providers:list to be performed.</span><span lang="EN-US" style="font-family:"Courier New""> </span><span lang="EN-US"> ",<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> >  </span><span lang="EN-US" style="font-family:"Courier New"">                        </span><span lang="EN-US"> "request_id":
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > "req-5b409f22-7741-4948-be6f-ea28c2896a3f"<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> >  </span><span lang="EN-US" style="font-family:"Courier New"">                       </span><span lang="EN-US"> }]}<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> On 8/16/2019 3:24 PM, Matt Riedemann wrote:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> This doesn't give much information. Does the token have the admin role in it? Has the placement:resource_providers:list
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> policy rule been changed from the default (rule:admin_api)?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">As Matt said, you should  check you policy limit for your request user, it</span><span lang="EN-US" style="font-family:"Courier New"">’</span><span lang="EN-US">s default role is
</span><span lang="EN-US" style="font-family:"Courier New"">“</span><span lang="EN-US">rule:admin_api</span><span lang="EN-US" style="font-family:"Courier New"">”</span><span lang="EN-US"> [1]. If your authenticated user is not admin, then the 403 error is
 normal.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">[1] <a href="https://github.com/openstack/placement/blob/master/placement/handlers/resource_provider.py#L178">
https://github.com/openstack/placement/blob/master/placement/handlers/resource_provider.py#L178</a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">      <a href="https://github.com/openstack/placement/blob/master/placement/policies/resource_provider.py#L51">
https://github.com/openstack/placement/blob/master/placement/policies/resource_provider.py#L51</a><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify:inter-ideograph"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"微软雅黑",sans-serif">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"微软雅黑",sans-serif">
</span><span style="font-size:11.0pt;font-family:"微软雅黑",sans-serif">崔恒香<span lang="EN-US"> [mailto:chx769467092@163.com]
<br>
</span><b>发送时间<span lang="EN-US">:</span></b><span lang="EN-US"> 2019</span>年<span lang="EN-US">8</span>月<span lang="EN-US">15</span>日<span lang="EN-US"> 13:21<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> openstack-discuss@lists.openstack.org<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> [lists.openstack.org</span>代发<span lang="EN-US">][question][placement][rest api][403]<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">This is my problem with placement rest api.(Token and endpoint were OK)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">        {"errors": [{"status": 403,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">                         "title": "Forbidden",
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">                         "detail": "Access was denied to this resource.\n\n Policy does not allow placement:resource_providers:list to be performed. 
 ", <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">                         "request_id": "req-5b409f22-7741-4948-be6f-ea28c2896a3f"<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">                        }]}<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Cuihx<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p><span lang="EN-US"> <o:p></o:p></span></p>
</div>
</body>
</html>