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 757775 - RBAC: user with "Register System" permission cannot register with RHSM
Summary: RBAC: user with "Register System" permission cannot register with RHSM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Infrastructure
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers 766906 768390
TreeView+ depends on / blocked
 
Reported: 2011-11-28 16:59 UTC by Jeff Weiss
Modified: 2019-09-26 13:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 00:32:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Weiss 2011-11-28 16:59:08 UTC
Description of problem:
If you grant a user the "register system" permission, and he only knows the *name* of the environment he wishes to register to, he cannot register.  The API to look up the ID of the environment is off-limits.

Version-Release number of selected component (if applicable):
katello-0.1.115-1.git.4.fc070ec.el6.x86_64

How reproducible:


Steps to Reproduce:
1. Create a role with perm Global/Organizations/Register System only, and assign a user to only this role
2. Try to register with RHSM (or at a lower level, try to look up the ID of the environment via the API)
3.
  
Actual results:
cannot register

Expected results:
register succeeds

Additional info:

[root@katello-test-rhel6-1 ca]# subscription-manager register --username user-perm-1322498127482 --password password --org ACME_Corporation --env Development
User user-perm-1322498127482 is not allowed to access api/environments/index

Started GET "/katello//api/organizations/ACME_Corporation/environments?name=Development" for 10.16.120.31 at Mon Nov 28 11:35:45 -0500 2011
  Processing by Api::EnvironmentsController#index as JSON
  Parameters: {"name"=>"Development", "organization_id"=>"ACME_Corporation"}
Errors::SecurityViolation: User user-perm-1322498127482 is not allowed to access api/environments/index
/usr/share/katello/lib/authorization_rules.rb:31:in `authorize'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:448:in `_run__856191886__process_action__199225275__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_2122'
/usr/share/katello/lib/util/threadsession.rb:79:in `thread_locals'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_2122'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:441:in `_run__856191886__process_action__199225275__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `send'

Comment 1 Lukas Zapletal 2012-01-20 12:53:57 UTC
[root@ofed ~]# subscription-manager register --username register_system --password register_system --org ACME_Corporation --env env
The system has been registered with id: 3b384ad5-1ff2-4aac-8fbd-663d006f353d 

[root@ofed ~]# rpm -q katello
katello-0.1.187-1.git.1.2d46557.el6.noarch

2d46557 757775 - allowing rhsm to register systems

Comment 3 Jeff Weiss 2012-02-09 21:34:11 UTC
Blocked, cannot test

Comment 4 Jeff Weiss 2012-02-09 21:34:52 UTC
Oops wrong bug, ignore last comment

Comment 5 Corey Welton 2012-02-22 19:08:52 UTC
QA Verified, now able to register a system via RHSM using an account which has only "Register System" permissions.


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