Bug 1450961 - SSUI: Restricted user(tag) can see service items list(but cannot open or order them)
Summary: SSUI: Restricted user(tag) can see service items list(but cannot open or orde...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - Service
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Allen W
QA Contact: Ruslana Babyuk
URL:
Whiteboard: ssui:tag
Depends On:
Blocks: 1451078
TreeView+ depends on / blocked
 
Reported: 2017-05-15 13:07 UTC by Ruslana Babyuk
Modified: 2018-03-06 14:49 UTC (History)
6 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1451078 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:49:48 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ruslana Babyuk 2017-05-15 13:07:00 UTC
Description of problem:
Service items are visible for tag restricted user

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

How reproducible:
100%

Steps to Reproduce:
1. Create role1(without restriction)
2. Create group1 with role1 and any tag
3. Create user1 and assign group1
4. Create catalog and service item (mark "Display in catalog" checkbox)
5. Login to SSUI as user1
6. Open Service Catalog tab

Actual results:
Service item is visible for restricted user

Expected results:
Service item should not be visible for restricted user, in this case only tagged items should be visible for user

Additional info:
User cannot open or order visible services

Comment 2 Allen W 2017-05-15 13:46:04 UTC
If user1 is being assigned group1, which is assigned an unrestricted role, wouldn't user1 seeing the service item be the expected behavior?  
Oh or is the restricted user, user2?  What are the restrictions placed on this user?

Comment 3 Ruslana Babyuk 2017-05-15 13:54:58 UTC
(In reply to Allen W from comment #2)
> If user1 is being assigned group1, which is assigned an unrestricted role,
> wouldn't user1 seeing the service item be the expected behavior?  
> Oh or is the restricted user, user2?  What are the restrictions placed on
> this user?

Please assign tag to group1, and if any service doesn't have the same tag as group1, user should not see any services.

You can check it on my appliance https://10.8.199.14 
with user: user1, password:111
I have 4 service items created and none of them have the tag assigned.

Comment 4 Allen W 2017-05-15 13:58:40 UTC
A VM! the best gift of all, thanks will check it out!

Comment 5 Allen W 2017-05-15 16:22:52 UTC
Having a real tough time understanding this one, any chance we could do a bluejeans session?   Looking at Access Control, don't see any groups or users, are these LDAP records?  Not able to see what tag is assigned to group1.  Also I see no services in the SUI for the user1 account you posted, 4 service catalogs, but no services.

Comment 6 Ruslana Babyuk 2017-05-15 16:39:52 UTC
(In reply to Allen W from comment #5)
> Having a real tough time understanding this one, any chance we could do a
> bluejeans session?   Looking at Access Control, don't see any groups or
> users, are these LDAP records?  Not able to see what tag is assigned to
> group1.  Also I see no services in the SUI for the user1 account you posted,
> 4 service catalogs, but no services.

Lets do bluejeans session: https://bluejeans.com/u/rbabyuk/
I am there already

Comment 7 Allen W 2017-05-15 17:15:14 UTC
Good news bad news on this.  

The bad news is, if a user, without appropriate tag to view a service template(s), queries the service_catalogs endpoint, they can see EVERYTHING!!!!!! (this is an api hiccup tho).  Quick steps to reproduce in the context of this bz, checkout: `https://10.8.199.14/api/service_templates` with (user1 - 111) nothing! Yay! Now checkout `https://10.8.199.14/api/service_catalogs?expand=resources,service_templates` same user/creds SEE STUFF that service_template stuff, no bueno :(


The good news is, there is already a fix out there, a merged pr that just has to be backported to resolve this issue `https://github.com/ManageIQ/manageiq-ui-service/pull/741`  It goes back to using the service_templates endpoint.

SO POWERS THAT BE.  You decide, do we backport? save the day?


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