Bug 2170422

Summary: [RBAC] Incorrect code response while preforming some actions by reader user in different project
Product: Red Hat OpenStack Reporter: lkuchlan <lkuchlan>
Component: openstack-manilaAssignee: OpenStack Manila Bugzilla Bot <openstack-manila-bugs>
Status: CLOSED DUPLICATE QA Contact: vhariria
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: ccopello, gouthamr, openstack-manila-bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---Flags: gouthamr: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-21 06:42:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lkuchlan 2023-02-16 10:41:44 UTC
Description of problem:
In some share metadata operations performed on a share resource in another project by member 
and reader users, the response code is 403/Forbidden but actually it should be 404/Not Found.

Below are the problematic locations:
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_shares.py#L555
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_shares.py#L600
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_shares.py#L616
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_shares.py#L631
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_shares.py#L653
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_snapshots.py#L380
https://github.com/openstack/manila-tempest-plugin/blob/master/manila_tempest_tests/tests/rbac/test_snapshots.py#L400

Version-Release number of selected component (if applicable):
openstack-manila-12.1.3-1.20221102150724.e8cbdb7.el9ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a share with metadata.
2. By a member user who resides in a different project than the project in which the 
resource was created, try to preform a get metadata action on this share resource.

Actual results:
The error code response in 403/Forbidden

Expected results:
404/Not Found

Comment 2 lkuchlan 2023-05-21 06:42:41 UTC

*** This bug has been marked as a duplicate of bug 2208820 ***