Bug 1340932 - [z-stream clone 3.6.8] It's possible to remove inherited permissions from Everyone's group
Summary: [z-stream clone 3.6.8] It's possible to remove inherited permissions from Eve...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-3.6.8
: ---
Assignee: Ondra Machacek
QA Contact: Gonza
URL:
Whiteboard:
Depends On: 1302034
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-30 18:44 UTC by Martin Perina
Modified: 2016-07-27 14:12 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1302034
Environment:
Last Closed: 2016-07-27 14:12:02 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1507 0 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager (rhevm) bug fix 3.6.8 2016-07-27 18:10:22 UTC
oVirt gerrit 55107 0 None MERGED engine: don't allow removal of inherited perms via rest 2020-09-15 22:44:44 UTC
oVirt gerrit 55882 0 None MERGED aaa: fix group's permissions removal 2020-09-15 22:44:44 UTC
oVirt gerrit 58355 0 ovirt-engine-3.6 MERGED engine: don't allow removal of inherited perms via rest 2020-09-15 22:44:46 UTC
oVirt gerrit 58357 0 ovirt-engine-3.6 MERGED aaa: fix group's permissions removal 2020-09-15 22:44:44 UTC

Description Martin Perina 2016-05-30 18:44:36 UTC
+++ This bug was initially created as a clone of Bug #1302034 +++

Description of problem:
It's possible to remove inhertied permissions from Everyone's group.
If for example user will inherit UserTemplateBasedVm role on Blank template.
Then if he check in webadmin this inhertited permission, he can't remove it,
but if he try to remove this inherited permission via REST it's removed successfully
and also removed from Everyone's group.

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

How reproducible:
always

Steps to Reproduce:
1. Add external user to system.
2. Remove some of the inhertied permissions from Everyone group from user
$ curl -X DELETE -H "Content-type: application/xml" -k -u admin@internal:password $URL/users/1905239d-0c8a-48bb-b454-f24915a128f7/permissions/00000004-0004-0004-0004-000000000355

Actual results:
It's successfully deleted. Also from Everyone group

Expected results:
Inherited permissions from group shouldn't be possible to remove.
Or could be, but don't remove it from group as well.

Additional info:

--- Additional comment from Juan Hernández on 2016-01-26 10:54:23 EST ---

The API doesn't perform this kind of check, it just forwards the request from the caller to the backend. If deleting these permissions shouldn't be allowed then the backend should reject the operation and respond to the API with the appropriate error message.

Comment 1 Martin Perina 2016-05-31 12:31:35 UTC
Retargeting to 3.6.8 as we missed today's last normal 3.6.7 build

Comment 2 Gonza 2016-07-13 10:18:29 UTC
Verified with:
rhevm-4.0.0.5-0.1.el7ev.noarch

# curl -X DELETE -H "Content-type: application/xml" -k -u admin@internal:pass $URL/users/e18a0c55-567f-4419-a6df-1c03c944b3e7/permissions/00000017-0017-0017-0017-000000000229
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>[Cannot remove inherited permission]</detail>
    <reason>Operation Failed</reason>
</fault>

Comment 4 errata-xmlrpc 2016-07-27 14:12:02 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://rhn.redhat.com/errata/RHBA-2016-1507.html


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