Bug 923197

Summary: [user-portal] User has insufficient permissions on url /domain/domain_id/users
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engine-userportalAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: high Docs Contact:
Priority: medium    
Version: 3.2.0CC: acathrow, bazulay, bdagan, ecohen, iheim, jkt, lpeer, oourfali, oramraz, Rhev-m-bugs, yeylon, yzaslavs
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 1019461    

Description Ondra Machacek 2013-03-19 12:13:27 UTC
Description of problem:
User don't have access to /domain/domain_id/users url.

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

How reproducible:
always

Steps to Reproduce:
1. Add UserVmManager permissions on cluster to user1.
2. As user1 access url /domain/domain_id/users url (filter=True)
  
Actual results:
<fault>
<reason>Operation Failed</reason>
<detail>
query execution failed due to insufficient permissions.
</detail>
</fault>

Expected results:
User can see all users in domain, or only users which are already added to system?

Additional info:

Comment 1 Michael Pasternak 2013-03-24 10:33:03 UTC
(In reply to comment #0)
> Description of problem:
> User don't have access to /domain/domain_id/users url.
> 
> Version-Release number of selected component (if applicable):
> sf10
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. Add UserVmManager permissions on cluster to user1.
> 2. As user1 access url /domain/domain_id/users url (filter=True)
>   
> Actual results:
> <fault>
> <reason>Operation Failed</reason>
> <detail>
> query execution failed due to insufficient permissions.
> </detail>
> </fault>
> 
> Expected results:
> User can see all users in domain, or only users which are already added to
> system?
> 

why do you think user should be able to see all other users in the system?

Comment 2 Ondra Machacek 2013-03-24 20:18:10 UTC
(In reply to comment #1)
> why do you think user should be able to see all other users in the system?

If user has manipulate_permission action group, he also should view users when he want to add them permissions.

Comment 3 Michael Pasternak 2013-03-25 07:04:08 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > why do you think user should be able to see all other users in the system?
> 
> If user has manipulate_permission action group, he also should view users
> when he want to add them permissions.

view users true, but existent users in /api/users, but not domain users
in /domain/domain_id/users as manipulate_permission not equal to add_users, 
i.e manipulate_permission means changing permissions for existent users in the
system

Comment 4 Ondra Machacek 2013-03-25 12:00:31 UTC
Well in UserPortal user can see all users in other domains but it is buggy( bug 923191 ) - so yes, maybe user should not see all other users in domains, but it should be removed also from UserPortal.

User also can't see all added users in /api/users, if user access to /api/users/ response is only one user itself. But he can see all added users in system, accessing them directly via id like: /api/users/$user_id. So if user should see all added users(except admin users?) under /api/users - i will open new bz for it.

Comment 5 Oved Ourfali 2013-03-27 11:54:41 UTC
Similar bug is bug 923100. It talked about the UI.
There, we currently show all users, and allow you to add permissions to a user even if it isn't added as an oVirt user.

I think that through the API, we should only allow "users" to see the existent users, and not all the domain users. 

I think that it should be done in the UI as well in the future (I guess it is a bigger fix). Maybe only in the user portal, as in the admin portal we would probably want to make it easier, allowing to add a user and grant him different permissions, in the same time.

Yair - what are your thoughts about that?

Comment 6 Barak 2013-03-27 13:54:18 UTC
per comment #5 looks like the behaviour should be fixed in the user portal.

Simon ?

Comment 7 Yair Zaslavsky 2013-04-07 06:35:21 UTC
(In reply to comment #5)
> Similar bug is bug 923100. It talked about the UI.
> There, we currently show all users, and allow you to add permissions to a
> user even if it isn't added as an oVirt user.
> 
> I think that through the API, we should only allow "users" to see the
> existent users, and not all the domain users. 
> 
> I think that it should be done in the UI as well in the future (I guess it
> is a bigger fix). Maybe only in the user portal, as in the admin portal we
> would probably want to make it easier, allowing to add a user and grant him
> different permissions, in the same time.
> 
> Yair - what are your thoughts about that?

Oved - sounds reasonable to me, I don't see any reason why at User portal we should see all domain users, and not just the ones that were added by the webadmin.

Comment 11 Ondra Machacek 2013-09-03 09:44:30 UTC
User in userportal can now see only users which were added to system,
he can't see users from domain, which was not added. Verified is12.

Comment 12 Ravi Nori 2014-01-08 21:10:31 UTC
*** Bug 923191 has been marked as a duplicate of this bug. ***

Comment 13 Itamar Heim 2014-01-21 22:32:54 UTC
Closing - RHEV 3.3 Released

Comment 14 Itamar Heim 2014-01-21 22:32:57 UTC
Closing - RHEV 3.3 Released