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 737563

Summary: Subscription Manager fails permissions on accessing subscriptions
Product: Red Hat Satellite Reporter: Bryan Kearney <bkearney>
Component: katello-agentAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: gkhachik, lzap, mkoci
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 17:56:43 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:
Bug Depends On:    
Bug Blocks: 747354    

Description Bryan Kearney 2011-09-12 14:58:40 UTC
Steps to reproduce:

1) Register the machine against katello
2) execute: ./subscription-manager list --available
3) The server will show this failure:

Started GET "/katello//api/consumers/af6d0339-f424-498e-adb4-69f29068c049/owner" for 10.11.228.61 at Mon Sep 12 11:13:22 -0400 2011
  Processing by Api::CandlepinProxiesController#get as JSON
  Parameters: {"id"=>"af6d0339-f424-498e-adb4-69f29068c049"}
Completed   in 1ms
  Processing by FailedAuthenticationController#unauthenticated_api as JSON
  Parameters: {"auth_username"=>"\005\253\"", "id"=>"af6d0339-f424-498e-adb4-69f29068c049", "auth_password"=>"[FILTERED]"}
Request is unauthenticated_api for 127.0.0.1
Completed 401 Unauthorized in 0ms

Comment 1 Lukas Zapletal 2011-09-13 08:58:39 UTC
Hmmm it worked for me.

Started GET "/api/consumers/bda2f6ed-5548-4022-8086-f159a51bf1d7/owner" for 127.0.0.1 at Tue Sep 13 10:36:49 +0200 2011
  Processing by Api::CandlepinProxiesController#get as JSON
  Parameters: {"id"=>"bda2f6ed-5548-4022-8086-f159a51bf1d7"}
Setting locale: en
Setting current user thread-local variable to bda2f6ed-5548-4022-8086-f159a51bf1d7
Sending GET request to Candlepin: /consumers/bda2f6ed-5548-4022-8086-f159a51bf1d7/owner
Rendered text template (0.0ms)
Setting current user thread-local variable to nil
Completed 200 OK in 272ms (Views: 1.6ms | ActiveRecord: 0.0ms)

But I got different error regarding update and then https://bugzilla.redhat.com/show_bug.cgi?id=737841. Working on them all. Looks like serious issue in our protection code once we switched over to the improved model. Nobody did test rhsm.

Comment 2 Lukas Zapletal 2011-09-13 09:01:40 UTC
Correcting the incorrect product on this BZ. Bugzilla changed it for me. I did not touch it. Is this a bug? ;-)

Comment 3 Lukas Zapletal 2011-09-13 11:03:20 UTC
Bryan I am not able to reproduce this. Could you send me the backtrace if you run into this issue again? I refactored way we check permissions for rhsm, now I am working on tests.

I am interested in the candlepin error log as well. I wonder how is possible you got 401. It is probably not from Katello, but from candlepin. Katello act as proxy in this request.

Comment 4 Lukas Zapletal 2011-09-13 15:17:09 UTC
I guess this has been fixed with

d738b1d 737563 - Subscription Manager fails permissions on accessing subscriptions

Please re-test and provide me full katello/candlepin logs when you encounter this again.

Comment 5 Lukas Zapletal 2011-09-14 14:50:10 UTC
This should be really fixed now.

Comment 6 Lukas Zapletal 2012-01-20 11:54:11 UTC
This is fixed.

Comment 8 Garik Khachikyan 2012-02-15 12:38:02 UTC
# VERIFIED

no issues since a while on subscription-manager list --available

checked recently (again) on:
---

katello-0.1.237-1.git.7.752d8de.el6.noarch
katello-cli-0.1.54-1.git.79.17c365f.el6.noarch
candlepin-0.5.17-1.el6.noarch
pulp-0.0.265-1.el6.noarch