Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1384035 - Create permissions do not check filter limits
Summary: Create permissions do not check filter limits
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Marek Hulan
QA Contact: Jitendra Yejare
URL:
Whiteboard:
: 1410929 1501127 (view as bug list)
Depends On:
Blocks: 1316897 1373844
TreeView+ depends on / blocked
 
Reported: 2016-10-12 12:06 UTC by Jitendra Yejare
Modified: 2021-12-10 14:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Satellite 6.4 introduces tighter restrictions around resource filter limitations. In previous versions of Satellite, the search query applied incorrect permissions to resources, which allowed users to perform tasks that were not permitted. This is now fixed.
Clone Of:
Environment:
Last Closed: 2018-10-16 19:28:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16884 0 None None None 2016-10-12 12:28:39 UTC

Description Jitendra Yejare 2016-10-12 12:06:13 UTC
Description of problem:
The user is able to create resource in taxonomies which were not added/associated to resource filter of role.

Version-Release number of selected component (if applicable):
Satellite 6.3 snap 3.0

How reproducible:
Always

Steps to Reproduce:
1. Create role with Organization A and Location A taxonomies.
2. Create a filter for resource type for which taxonomies can be applied and without overriding it.
e.g Domain Filter
3. Create a new user with different taxonomies than above role. Suppose Organization B and Location B.
4. Assign the role to user.
6. Login with new user.
5. Attempt to create a domain(or any resource type filter added in role) in user taxonomies(which are not the same as filter taxonomies).


Actual results:
1. Create permission is not honoring the resourse filter limits.
2. The resource is created in the user associated taxonomies which are not permitted by resource filter.

Expected results:
1.Create permissions should check filter limits.
2. The resource should not be created by user in taxonomies to which filter doesn't gives permission.
3. Some informative message should be displayed for unable to create resource due to no permissions from resource filter end.

Additional info:

Comment 1 Marek Hulan 2016-10-12 12:28:37 UTC
Created redmine issue http://projects.theforeman.org/issues/16884 from this bug

Comment 3 Bryan Kearney 2016-11-03 08:20:39 UTC
Upstream bug assigned to mhulan

Comment 4 Bryan Kearney 2016-11-03 08:20:41 UTC
Upstream bug assigned to mhulan

Comment 5 Marek Hulan 2017-01-09 09:48:43 UTC
*** Bug 1410929 has been marked as a duplicate of this bug. ***

Comment 9 Satellite Program 2017-07-20 16:02:35 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16884 has been resolved.

Comment 10 Jitendra Yejare 2017-08-17 12:54:18 UTC
This bug appears in latest Satellite 6.3 Snap 11. We want this to be added in recent snaps asap as creating something outside permissions seems malfunctioning and security concern as well.

Comment 12 Jitendra Yejare 2017-09-07 07:55:49 UTC
Even view permission from Hammer are not checking filter limits.

One of my user neither have permission for suppose Org B nor from its associated role, but still, the user can list products, domains, etc in Org B.

Comment 13 Jitendra Yejare 2017-09-07 07:56:22 UTC
Should I create a new Bug for comment 12 behavior ?

Comment 14 Marek Hulan 2017-09-11 09:37:07 UTC
No, hammer does not have any permission checks in it, permissions are checked on server side in API controllers so that's the same issue.

Comment 15 Marek Hulan 2017-10-12 07:26:15 UTC
*** Bug 1501127 has been marked as a duplicate of this bug. ***

Comment 18 Jitendra Yejare 2018-08-01 15:12:42 UTC
Verified !

@ Satellite 6.4 snap 14 - CLI and API


Steps:

1. Create role with Organization A and Location A taxonomies.
2. Create a filter for resource type for which taxonomies can be applied and without overriding it.
e.g Domain Filter
3. Create a new user with different taxonomies than above role. Suppose Organization B and Location B.
4. Assign the role to user.
6. Login with new user.
5. Attempt to create a domain(or any resource type filter added in role) in user taxonomies(which are not the same as filter taxonomies).


Observation:

1.Create permissions is checking filter limits.
2. The resource is not being created by user in taxonomies to which filter/role doesn't gives permission.
3. The error message is displayed for unable to create resource due to no permissions from resource filter end.
Thats is : 
Invalid organizations selection, you must select at least one of yours and have 'assign_organizations' permission.
and
Invalid locations selection, you must select at least one of yours and have 'assign_locations' permission.

Comment 19 Bryan Kearney 2018-10-16 19:28:34 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://access.redhat.com/errata/RHSA-2018:2927


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