Bug 1302034

Summary: It's possible to remove inherited permissions from Everyone's group
Product: [oVirt] ovirt-engine Reporter: Ondra Machacek <omachace>
Component: Backend.CoreAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Gonza <grafuls>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.6.3CC: bugs, mperina, ncredi, oourfali, sbonazzo
Target Milestone: ovirt-4.0.0-betaKeywords: Automation
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
mperina: devel_ack+
pnovotny: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1340932 (view as bug list) Environment:
Last Closed: 2016-07-05 07:38:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1340932    

Description Ondra Machacek 2016-01-26 15:20:27 UTC
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:

Comment 1 Juan Hernández 2016-01-26 15:54:23 UTC
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 2 Gonza 2016-06-21 09:59:41 UTC
Verified with:
rhevm-4.0.0.5-0.1.el7ev.noarch

Comment 3 Sandro Bonazzola 2016-07-05 07:38:35 UTC
oVirt 4.0.0 has been released, closing current release.