<div dir="ltr">Hi Takashi,<div><br></div><div>when a user upload images which is a member , The image will be set to private.</div><div><br></div><div>This is what he is asking for access to make it public,  The above rule applies for only public images</div><div><br></div><div>regards</div><div>Adivya Singh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 14, 2022 at 10:54 AM Takashi Kajinami <<a href="mailto:tkajinam@redhat.com">tkajinam@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Glance has a separate policy rule (publicize_image) for creating/updating public images.,<br></div><div>and you should define that policy rule instead of modify_image.</div><div><br></div><div><a href="https://docs.openstack.org/glance/xena/admin/policies.html" target="_blank">https://docs.openstack.org/glance/xena/admin/policies.html</a></div><div>~~~</div><div><code><span>publicize_image</span></code> - Create or update public images</div><div>~~~</div><div><br></div><div>AFAIK The modify_image policy defaults to rule:default and is allowed for any users</div><div>as long as the target image is owned by that user.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 14, 2022 at 2:01 PM Adivya Singh <<a href="mailto:adivya1.singh@gmail.com" target="_blank">adivya1.singh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> Hi Brian,</div><div><br></div><div>Please find the response</div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>1> i am using Xena release version 24.0.1<br></div><div><br></div><div>Now the scenario is line below, my customer wants to have their login access on setting up the properties of an image to the public. now what i did is</div><div><br></div><div>1> i created a role in openstack using the admin credential name as "user"</div><div>2> i assigned that user to a role user.</div><div>3> i assigned those user to those project id, which they want to access as a user role</div><div><br></div><div>Then i went to Glance container which is controller by lxc and made a policy.yaml file as below</div><div><br></div><div>root@aio1-glance-container-724aa778:/etc/glance# cat policy.yaml<br><br> "modify_image": "role:user"<br><br></div><div>then i went to utility container and try to set the properties of a image using openstack command</div><div><br></div><div>openstack image set --public <image id></div><div><br></div><div>and then i got this error</div><div><br></div><div>HTTP 403 Forbidden: You are not authorized to complete publicize_image action.<br></div><div><br></div><div>Even when i am trying the upload image with this user , i get the above error only</div><div><br></div><div>export OS_ENDPOINT_TYPE=internalURL<br>export OS_INTERFACE=internalURL<br>export OS_USERNAME=adsingh<br>export OS_PASSWORD='adsingh'<br>export OS_PROJECT_NAME=adsingh<br>export OS_TENANT_NAME=adsingh<br>export OS_AUTH_TYPE=password<br>export OS_AUTH_URL=https://<Internal IP of horizon>:5000/v3<br>export OS_NO_CACHE=1<br>export OS_USER_DOMAIN_NAME=Default<br>export OS_PROJECT_DOMAIN_NAME=Default<br>export OS_REGION_NAME=RegionOne</div><div><br></div><div>Regards</div><div>Adivya Singh<br><br></div><div><br></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 6:41 PM Alan Bishop <<a href="mailto:abishop@redhat.com" target="_blank">abishop@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 13, 2022 at 6:00 AM Brian Rosmaita <<a href="mailto:rosmaita.fossdev@gmail.com" target="_blank">rosmaita.fossdev@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/13/22 8:29 AM, Adivya Singh wrote:<br>
> hi Team,<br>
> <br>
> Any thoughts on this<br>
<br>
H Adivya,<br>
<br>
Please supply some more information, for example:<br>
<br>
- which openstack release you are using<br>
- the full API request you are making to modify the image<br>
- the full API response you receive<br>
- whether the user with "role:user" is in the same project that owns the <br>
image<br>
- debug level log extract for this call if you have it<br>
- anything else that could be relevant, for example, have you modified <br>
any other policies, and if so, what values are you using now?<br></blockquote><div><br></div><div>Also bear in mind that the default policy_file name is "policy.yaml" (not .json). You either</div><div>need to provide a policy.yaml file, or override the policy_file setting if you really want to</div><div>use policy.json.</div><div><br></div><div>Alan<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
cheers,<br>
brian<br>
<br>
> <br>
> Regards<br>
> Adivya Singh<br>
> <br>
> On Sat, Jun 11, 2022 at 12:40 AM Adivya Singh <<a href="mailto:adivya1.singh@gmail.com" target="_blank">adivya1.singh@gmail.com</a> <br>
> <mailto:<a href="mailto:adivya1.singh@gmail.com" target="_blank">adivya1.singh@gmail.com</a>>> wrote:<br>
> <br>
>     Hi Team,<br>
> <br>
>     I have a use case where I have to give a user restriction on<br>
>     updating the image properties as a member.<br>
> <br>
>     I have created a policy Json file and give the modify_image rule to<br>
>     the particular role, but still it is not working<br>
> <br>
>     "modify_image": "role:user", This role is created in OpenStack.<br>
> <br>
>     but still it is failing while updating properties with a<br>
>     particular user assigned to a role as "access denied" and<br>
>     unauthorized access<br>
> <br>
>     Regards<br>
>     Adivya Singh<br>
> <br>
<br>
<br>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>