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.
Description of problem:
>>
Unable to create a new repository as any non-admin user within the Web UI. When we click the create repository button it throws error "You are not authorized to perform this action" .
The page does load but does not populate the "Type" drop down.
The same user is able to create a repository using the hammer cli tool.
Version-Release number of selected component (if applicable):
6.2.1
Steps to Reproduce:
>>
1. Create a non-admin user and assign role with filter "Resource type: Product and repositories"
# hammer role filters --name testrole
----|----------------------|--------|------------|----------|---------------------------------------------------------------------------------
ID | RESOURCE TYPE | SEARCH | UNLIMITED? | ROLE | PERMISSIONS
----|----------------------|--------|------------|----------|---------------------------------------------------------------------------------
167 | (Miscellaneous) | none | yes | testrole | access_dashboard
169 | Katello::Product | none | no | testrole | view_products, create_products, edit_products, destroy_products, sync_product...
----|----------------------|--------|------------|----------|---------------------------------------------------------------------------------
2. Try to login with non-admin user and create custom repository from Satellite webui >> Content >> Products >> Select product >> Select repository tab >> Create Repository
Actual results:
>> Getting error "You are not authorized to perform this action." in satellite webui whilst creating repository.
Expected results:
>> Should able to create repository in Satellite webui with non-admin user.
Additional info:
>>
Able to create repository with hammer command:-
[root@satellite ~]# hammer -u test -p password repository create --name newrepo --content-type 'yum' --product prod1 --organization-id 1
Repository created
================
Logs generated when try to create repository with hammer command:-
production.log
---------------------------
2016-09-08 16:42:26 [app] [I] Started GET "/katello/api/organizations/1/products?name=prod1" for ::1 at 2016-09-08 16:42:26 -0400
2016-09-08 16:42:26 [app] [I] Processing by Katello::Api::V2::ProductsController#index as JSON
2016-09-08 16:42:26 [app] [I] Parameters: {"name"=>"prod1", "api_version"=>"v2", "organization_id"=>"1", "product"=>{}}
2016-09-08 16:42:26 [app] [I] Authorized user test(test test)
2016-09-08 16:42:26 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/views/katello/api/v2/products/index.json.rabl within katello/api/v2/layouts/collection (31.5ms)
2016-09-08 16:42:26 [app] [I] Completed 200 OK in 95ms (Views: 29.7ms | ActiveRecord: 21.0ms)
2016-09-08 16:42:26 [app] [I] Started POST "/katello/api/repositories" for ::1 at 2016-09-08 16:42:26 -0400
2016-09-08 16:42:26 [app] [I] Processing by Katello::Api::V2::RepositoriesController#create as JSON
2016-09-08 16:42:26 [app] [I] Parameters: {"name"=>"newrepo2", "product_id"=>147, "content_type"=>"yum", "api_version"=>"v2", "repository"=>{"name"=>"newrepo2", "content_type"=>"yum", "product_id"=>147}}
2016-09-08 16:42:26 [app] [I] Authorized user test(test test)
2016-09-08 16:42:28 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/views/katello/api/v2/repositories/show.json.rabl within katello/api/v2/layouts/resource (32.8ms)
2016-09-08 16:42:28 [app] [I] Completed 200 OK in 2146ms (Views: 27.7ms | ActiveRecord: 57.5ms)
---------------------------
Access denied log generated when try to create repository from Web UI:-
production.log
---------------------------
2016-09-08 16:43:22 [app] [I] Started GET "/api/v2/settings?search=name+%3D+default_download_policy" for 192.168.100.1 at 2016-09-08 16:43:22 -0400
2016-09-08 16:43:22 [app] [I] Processing by Api::V2::SettingsController#index as JSON
2016-09-08 16:43:22 [app] [I] Parameters: {"search"=>"name = default_download_policy", "apiv"=>"v2"}
2016-09-08 16:43:22 [app] [I] Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (0.7ms)
2016-09-08 16:43:22 [app] [I] Filter chain halted as :authorize rendered or redirected
2016-09-08 16:43:22 [app] [I] Completed 403 Forbidden in 12ms (Views: 1.6ms | ActiveRecord: 1.5ms)
2016-09-08 16:43:22 [app] [I] Started GET "/katello/api/v2/repositories/repository_types?creatable=true&organization_id=1" for 192.168.100.1 at 2016-09-08 16:43:22 -0400
2016-09-08 16:43:22 [app] [I] Processing by Katello::Api::V2::RepositoriesController#repository_types as JSON
2016-09-08 16:43:22 [app] [I] Parameters: {"creatable"=>"true", "organization_id"=>"1", "api_version"=>"v2"}
2016-09-08 16:43:22 [app] [I] Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (1.0ms)
2016-09-08 16:43:22 [app] [I] Filter chain halted as :authorize rendered or redirected
2016-09-08 16:43:22 [app] [I] Completed 403 Forbidden in 20ms (Views: 2.6ms | ActiveRecord: 2.7ms)
2016-09-08 16:43:22 [app] [I] Started GET "/katello/api/v2/gpg_keys?full_result=true&organization_id=1" for 192.168.100.1 at 2016-09-08 16:43:22 -0400
2016-09-08 16:43:22 [app] [I] Processing by Katello::Api::V2::GpgKeysController#index as JSON
2016-09-08 16:43:22 [app] [I] Parameters: {"full_result"=>"true", "organization_id"=>"1", "api_version"=>"v2"}
2016-09-08 16:43:22 [app] [I] Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (0.7ms)
2016-09-08 16:43:22 [app] [I] Filter chain halted as :authorize rendered or redirected
2016-09-08 16:43:22 [app] [I] Completed 403 Forbidden in 22ms (Views: 1.8ms | ActiveRecord: 2.8ms)
---------------------------
Looking at the failure, its actually completely unrelated to this issue.
When you create a user and don't give them an email address, the user is prompted to enter one when they login. They will not be able to do anything with the app until they provide it.
I'm seeing a couple of issues with this 'feature':
1) its not currently telling the user they need to enter the email address
2) clicking on any bastion pages without entering the email address leads to the error you see in comment #33.
I think both of these issues are new (separate bzs).
In Renzo's case, after entering an email address for that user, i am able to navigate to products and create a repository. Moving back to ON_QA
Comment 36Renzo Nuccitelli
2017-03-31 12:11:11 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/RHBA-2017:1191