Bug 1852447 - User can list other tenant's and admin's export locations
Summary: User can list other tenant's and admin's export locations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-manila-tests-tempest
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z13
: 13.0 (Queens)
Assignee: Goutham Pacha Ravi
QA Contact: lkuchlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-30 12:42 UTC by lkuchlan
Modified: 2020-10-28 18:27 UTC (History)
5 users (show)

Fixed In Version: python-manila-tests-tempest-1.1.0-1.el7ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 18:26:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1654598 0 None None None 2020-06-30 12:43:03 UTC
Launchpad 1655427 0 None None None 2020-07-01 00:59:28 UTC
OpenStack gerrit 710661 0 None MERGED Fix export location negative tests 2021-02-16 11:49:51 UTC
OpenStack gerrit 714181 0 None MERGED Fix export locations tests 2021-02-16 11:49:51 UTC
OpenStack gerrit 715687 0 None MERGED Enforce policy checks for share export locations 2021-02-16 11:49:51 UTC
Red Hat Product Errata RHBA-2020:4387 0 None None None 2020-10-28 18:27:16 UTC

Description lkuchlan 2020-06-30 12:42:06 UTC
Description of problem:
Currently, the share export locations API is allowing any tenant to obtain export locations of any tenant's share.

See the below URL:

http://172.24.47.101:8786/v2/64350ec996cb4d91bfaa728fd7199313/shares/e93eb079-58fb-4758-9d95-a9a645b0250a/export_locations

64350ec996cb4d91bfaa728fd7199313: this is a non-admin tenant ID

e93eb079-58fb-4758-9d95-a9a645b0250a: this is an admin's share ID

This is because the API layer of the share export locations controller is going directly to the database to obtain the export locations of the supplied share ID.

The ownership check is performed at the Share/API layer, which is not invoked in this workflow.

Most surprisingly of all, the tempest tests:

- test_export_locations.ExportLocationsTest.test_list_share_export_locations_by_member
- test_export_locations.ExportLocationsTest.test_get_share_export_location_by_member

... should not be passing at all (and should be negative tests), as they are testing if a non-admin tenant is able to obtain and list export locations of a share created by the admin_client used by tempest.

Comment 2 Goutham Pacha Ravi 2020-08-25 21:56:52 UTC
Moving this to POST because the fixes indicated:  https://review.opendev.org/714181 and https://review.opendev.org/710661 have merged upstream, and the manila tests package has been tagged on RDO: https://review.rdoproject.org/r/#/c/28654/

This should be part of the next downstream import into RHOSP

Comment 19 errata-xmlrpc 2020-10-28 18:26:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 13 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4387


Note You need to log in before you can comment on or make changes to this bug.