Bug 1859460 - Cannot create KubeVirt VM as a normal user
Summary: Cannot create KubeVirt VM as a normal user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ovirt-4.4.2
: 4.4.2
Assignee: Lucia Jelinkova
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-22 08:13 UTC by Lucia Jelinkova
Modified: 2022-07-09 12:58 UTC (History)
7 users (show)

Fixed In Version: rhv-4.4.2-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-23 16:11:41 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-37445 0 None None None 2022-07-09 12:58:54 UTC
Red Hat Product Errata RHSA-2020:3807 0 None None None 2020-09-23 16:12:11 UTC
oVirt gerrit 110421 0 master MERGED engine: add permissions for KubeVirt templates 2020-10-22 09:48:44 UTC

Description Lucia Jelinkova 2020-07-22 08:13:10 UTC
Description of problem:
It is not possible to create a KubeVirt VM with other than SuperUser permissions.

Steps to Reproduce:
1. create a user account and grant the following permissions: DataCenterAdmin, VmCreator, UserVmManager, UserTemplateBasedVm
2. create a new VM from a KubeVirt template

Actual results: User does not have permissions to create a VM.


Expected results: The VM should be created.


Additional info:
I think there are 2 problems here:
1. when creating a template from KubeVirt, no permissions are added to the db. For normal templates, the UserTemplateBasedVm is granted for everyone
2. when calculating the permissions for an entity, it is checked not only for the entity itself but also for the parent. However, the check for templates is based on the assumption that there is an image associated with the template. That is not the case so the template does not have any parent found (https://github.com/oVirt/ovirt-engine/blob/b502501fc127044d6cacc7363317add5e21e1092/packaging/dbscripts/create_functions.sql#L251)

Comment 6 Pavol Brilla 2020-08-27 13:05:28 UTC
Steps to Reproduce:
1. create a user account (test) and grant the following permissions: DataCenterAdmin, VmCreator, UserVmManager, UserTemplateBasedVm
2. create a new VM from a KubeVirt template ( PVC were already provided from ocp side )


Verified on Software Version:4.4.2.2-0.3.el8ev

Comment 10 errata-xmlrpc 2020-09-23 16:11:41 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 (Moderate: Red Hat Virtualization security, bug fix, and enhancement update), 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/RHSA-2020:3807


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