Bug 1866229 - Impersonate normal user doesn't hide menus requiring cluster admin permission
Summary: Impersonate normal user doesn't hide menus requiring cluster admin permission
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Rastislav Wagner
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-05 06:34 UTC by Yanping Zhang
Modified: 2020-10-27 16:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:24:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
menus (69.92 KB, image/png)
2020-08-05 06:34 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6339 0 None closed Bug 1866229: Pass impersonate info to GQL init message payload 2021-02-18 06:58:12 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:25:07 UTC

Description Yanping Zhang 2020-08-05 06:34:37 UTC
Created attachment 1710473 [details]
menus

Description of problem:
Cluster admin login console, on the user list page, impersonate a normal user, check left menus, those menus requiring cluster admin role are not hidden to normal user.

Version-Release number of selected component (if applicable):
4.6.0-0.nightly-2020-08-03-143208

How reproducible:
Always

Steps to Reproduce:
1.Cluster admin login console, on user list page, impersonate a normal user, check left menus
2.
3.

Actual results:
1. Menus like "Compute", "Administration" are not hidden for normal user.

Expected results:
2. Should hidden those menus which normal user have no right to access.

Additional info:

Comment 1 Cyril 2020-08-11 14:50:24 UTC
I think the change in the API implementation from REST to GraphQL caused this bug. The GraphQL `SelfSubjectAccessReview` endpoint is returning property `allowed:true` for user impersonation action. This should be `allowed: false` based on my finding from the previous REST API implementation.

Comment 3 Jakub Hadvig 2020-08-11 15:28:26 UTC
Based on info from the https://bugzilla.redhat.com/show_bug.cgi?id=1866229#c1 assigning the issue to Rastislav since he was working on the implementation.

Comment 7 Yanping Zhang 2020-08-21 07:30:59 UTC
Checked on ocp 4.6 cluster with payload 4.6.0-0.nightly-2020-08-20-174655.
Now impersonate user will show correct menus for normal user, cluster admin menus will be hidden.
The bug is fixed.

Comment 9 errata-xmlrpc 2020-10-27 16:24:53 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 (OpenShift Container Platform 4.6 GA Images), 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:4196


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