Bug 1663815 - [admin]Common user could not browse catalog page
Summary: [admin]Common user could not browse catalog page
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-07 07:21 UTC by Yanping Zhang
Modified: 2023-09-14 04:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-04 13:26:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RBAC error message (149.54 KB, image/png)
2019-01-28 13:14 UTC, Samuel Padgett
no flags Details

Description Yanping Zhang 2019-01-07 07:21:01 UTC
Description of problem:
Login console with common user, after create new project, click "Browse Catalog", it jumps to "Catalog"->"Developer Catalog" page, but usee could not see catalogs, error info is here:
"clusterserviceversions.operators.coreos.com is forbidden: User "yanpzhan" cannot list clusterserviceversions.operators.coreos.com at the cluster scope: no RBAC policy matched"

Version-Release number of selected component (if applicable):
registry.svc.ci.openshift.org/openshift/origin-v4.0-2019-01-06-163602@sha256   86f6104f0b2d69a5c0133fa92f2325bbc78c398ba1000f10927f3a9d3b36e792   7f8e4a1588a2   2 weeks ago     268 MB
console repo commit id: c7f598d85ba30c2a8347885d66e44d2c8be448f5


How reproducible:
Always

Steps to Reproduce:
1.Login console with common user.
2.Create new project, then click "Browse Catalog" button on project overview page.
3.

Actual results:
2. It jumps to "Catalog"->"Developer Catalog" page, but user could not see catalogs.

Expected results:
2. Common user should be able to see catalogs.

Additional info:
Cluster admin could see catalogs.

Comment 1 Alec Merdler 2019-01-16 21:09:57 UTC
This is expected behavior. "Common user" just needs a binding to the `global-operators-admin` clusterrole, which grants RBAC to interact with every Operator-provided CRD that is included in the `global-operators` OperatorGroup. 

Code: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/pkg/controller/operators/olm/operatorgroup.go#L76

Comment 2 Samuel Padgett 2019-01-16 21:39:24 UTC
This page needs to work for a normal user in a default 4.0 install. We either need to fix the out-of-the-box RBAC or change the console so the page doesn't fail on these resources.

Comment 3 Alec Merdler 2019-01-22 18:04:38 UTC
https://github.com/openshift/console/pull/1121

Comment 4 Yanping Zhang 2019-01-23 09:43:06 UTC
Cluster version is 4.0.0-0.nightly-2019-01-23-024459
console image:
registry.svc.ci.openshift.org/ocp/4.0-art-latest-2019-01-23-024459@sha256   271fd5e5d37e31b1beb4ad0921d2471055091b59adef5352f34c114e0770f246   cecead28e49e   9 hours ago     261 MB
console repo commit id: "7691a636d58a291886eec42367bae74fee49a902"

Checked on ocp 4.0 env with above version, login console with common user, in user's project, browse catalog under "Catalog"->"Developer Catalog". There is no catalog listed. It still shows error info:
clusterserviceversions.operators.coreos.com is forbidden: User "yanpzhan2" cannot list clusterserviceversions.operators.coreos.com in the namespace "prozyp1": no RBAC policy matched

Comment 5 Evan Cordell 2019-01-28 13:09:55 UTC
>  User "yanpzhan" cannot list clusterserviceversions.operators.coreos.com at the cluster scope: no RBAC policy matched"

We don't give access to list csvs at the cluster scope to common users. Shouldn't the UI only be requesting CSVs in the current project?

Comment 6 Samuel Padgett 2019-01-28 13:12:27 UTC
Evan, console has been updated to only requesting CSVs in the current project, but it's still an issue.

Comment 7 Samuel Padgett 2019-01-28 13:14:25 UTC
Created attachment 1524202 [details]
RBAC error message

Comment 8 Yanping Zhang 2019-02-26 09:58:38 UTC
4.0.0-0.nightly-2019-02-25-194625
console image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1e41c422fdc28077cb7d633b66c944ee8d2ed1fccf6b1cf5680fc2e7375aad7e
console commit id: f5ece4233a4b3b8b6c5f6a2367a9489ce9247ce0
Checked on "Catalog"->"Developer catalogs" page, normal user could see catalog items now. 
Seems the issue has been fixed, pls help to check, if so, the bug could be verified.

Comment 9 Yanping Zhang 2019-02-28 06:53:08 UTC
Pls help to check if the fix is already in and could move the bug to ON_QA, then I can verify the bug.

Comment 10 Yanping Zhang 2019-03-04 02:21:40 UTC
4.0.0-0.nightly-2019-02-28-054829
console commit id: d10fb8b637562015a0c704e72855e2d0c318783c
Checked again on ocp 4.0 env with above version info, normal user could access catalog page successfully now. 
Move the bug to Verified.

Comment 12 Red Hat Bugzilla 2023-09-14 04:44:33 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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