Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1126840

Summary: Models should ensure the authorization of associated objects before associating them to the model
Product: Red Hat Satellite Reporter: Eric Helms <ehelms>
Component: Users & RolesAssignee: Eric Helms <ehelms>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bkearney, cwelton, ehelms, mhulan, mmccune, omaciel, tbrisker
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Security, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6760
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:44:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Helms 2014-08-05 12:23:41 UTC
While this issue is systematic, I'll provide an example using domains and subnets to illustrate the problem.

As an admin:
1. Create a new domain: "example.org"
2. Create a User: "testuser"
3. Create a new Role: "Subnets Role"
4. Add a Filter to the Role with - Type: Subnets, Permissions: create_subnets, view_subnets

As testuser:

curl -u testuser:testuser -X POST -d '{"name": "subnet1", "network": "255.168.192.1", "mask": "255.255.255.0", "domains": [{"id": 1}]}' -H "Content-Type: application/json" http://10.13.129.41:3000/api/v2/subnets

Comment 1 Eric Helms 2014-08-05 12:23:42 UTC
Created from redmine issue http://projects.theforeman.org/issues/6760

Comment 2 Eric Helms 2014-08-05 12:23:44 UTC
Upstream bug assigned to ehelms

Comment 5 Bryan Kearney 2015-08-25 17:59:55 UTC
Upstream bug component is Users & Roles

Comment 8 Kurt Seifried 2017-03-07 03:56:12 UTC
Is this a hardening issue? It appears not directly exploitable, correct?

Comment 9 Bryan Kearney 2017-03-08 14:28:09 UTC
I will defer to eric, but I think you need to be authenticated to exploit this.

Comment 10 Kurt Seifried 2017-03-29 02:35:28 UTC
Mar 28 16:28:38 <ehelms>        it could let them associate an object to another object when they only had access to object A, there are protections in place in some cases, this is a kind of harden it at the model layer to prevent it vs the controller layer

So I'm going to go with hardening unless a clear avenue of exploitation comes to light.

Comment 11 Eric Helms 2017-10-19 14:14:42 UTC
Brad is correct, and I agree with Kurt's assessment of hardening.

Comment 18 Bryan Kearney 2018-09-04 17:44:52 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.