Bug 2055589 - Templates are not shown in VM creation wizard but shown in Templates page for non-privileged user
Summary: Templates are not shown in VM creation wizard but shown in Templates page for...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.z
Assignee: Matan Schatzman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On: 2102302
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-17 10:12 UTC by Leon Kladnitsky
Modified: 2022-08-08 02:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-08 02:45:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
templates display inconsistency (5.94 MB, video/mp4)
2022-02-17 10:12 UTC, Leon Kladnitsky
no flags Details

Description Leon Kladnitsky 2022-02-17 10:12:45 UTC
Created attachment 1861648 [details]
templates display inconsistency

Description of problem: 
Non-priviledged user can't select template in VM creation wizard, despite granted view role

Version-Release number of selected component (if applicable): 
4.10

How reproducible:
100%

Steps to Reproduce:
1. Allow acess to cluster for non-privileged user by applying the htpasswd idp:
https://github.com/openshift/console/blob/e4bd0786eb9232be1c2ea2194ae58f59a8be3f4d/test-prow-e2e.sh#L52
2. Grant non-privileged user view role to 'openshift', 'openshift-virtualization-os-images' and 'default' namespaces
$ oc adm policy add-role-to-user view test -n openshift
>> clusterrole.rbac.authorization.k8s.io/view added: "test"
$ oc adm policy add-role-to-user view test -n openshift-virtualization-os-images
>> clusterrole.rbac.authorization.k8s.io/view added: "test"
$ oc adm policy add-role-to-user view test -n default
>> clusterrole.rbac.authorization.k8s.io/view added: "test"

3. Login as test/test, switch to Admin Perspective
4. Open Virtualization -> Templates 
The templates are accessible, Create VM buttons work, VM can be created
5. Open Virtualization -> Virtual Machines, click 'Create virtual machine' button or 'Create' -> 'With wizard'

Actual results:
Templates are not available, Error message appears:
templates.template.openshift.io is forbidden: User "test" cannot list resource "templates" in API group "template.openshift.io" at the cluster scope

Expected results:
Templates are listed, wizard can continue

Additional info:

Comment 2 Guohua Ouyang 2022-08-08 02:45:26 UTC
This is not a bug of 4.10.z anymore, close it.


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