Bug 1727266 - Storage-admin can get but not describe pvc from other's project
Summary: Storage-admin can get but not describe pvc from other's project
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Christian Huffman
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On:
Blocks: 1741039
TreeView+ depends on / blocked
 
Reported: 2019-07-05 09:47 UTC by Liang Xia
Modified: 2019-12-18 02:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1741039 (view as bug list)
Environment:
Last Closed: 2019-10-16 06:33:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:33:19 UTC

Description Liang Xia 2019-07-05 09:47:15 UTC
Description of problem:
A user with storage-admin privilege can get pvc from other's project,
but failed to describe the pvc with below error:
Error from server (Forbidden): pods is forbidden: User "testuser-24" cannot list resource "pods" in API group "" in the namespace "3dv-k"

Version-Release number of selected component (if applicable):
4.2.0-0.nightly-2019-06-30-221852
Client Version: version.Info{Major:"4", Minor:"2+", GitVersion:"v4.2.0", GitCommit:"96d312193", GitTreeState:"clean", BuildDate:"2019-07-04T06:28:12Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.0+5ca1653", GitCommit:"5ca1653", GitTreeState:"clean", BuildDate:"2019-06-29T04:02:24Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}

How reproducible:
Always

Steps to Reproduce:
1.Login as end user, and create a pvc.
2.Login as another user with storage-admin privilege, check above pvc.

Actual results:
Storage-admin user can get the pvc, but failed to describe the pvc with below error:
Error from server (Forbidden): pods is forbidden: User "testuser-24" cannot list resource "pods" in API group "" in the namespace "3dv-k"

Expected results:
Storage-admin can also describe the pvc from other's project.

Additional info:

Comment 2 Christian Huffman 2019-07-24 13:10:02 UTC
I submitted a PR [1] to the openshift-apiserver repo to address this issue. This PR adds the get, list, and watch verbs for pod resources to the `storage-admin` role.

[1] https://github.com/openshift/openshift-apiserver/pull/10

Comment 4 Liang Xia 2019-08-14 06:06:22 UTC
Verified with 4.2.0-0.nightly-2019-08-13-183722 that storage-admin can describe pvc.

Comment 5 errata-xmlrpc 2019-10-16 06:33:09 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, 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-2019:2922


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