Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 878191

Summary: CLI system remove_deletion fails calling candlepin proxy
Product: [Retired] Subscription Asset Manager Reporter: Tom McKay <tomckay>
Component: katelloAssignee: Jordan OMara <jomara>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.2CC: adprice, athomas, bkearney, cpelland, huiwang, jomara, omaciel
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
CLI's 'system remove_deletion' no longer fails.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 19:19:48 UTC Type: Bug
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: 816564    

Description Tom McKay 2012-11-19 20:10:16 UTC
While attempting to remove a system deletion record, the wrong user credentials are being checked.

$ katello system remove_deletion --uuid=host2
User admin is not allowed to access api/candlepin_proxies/delete

Looking at the code it appears that katello is only expecting subscription-manager to access this API, and not standard admin users.

Comment 1 Jordan OMara 2012-12-17 18:19:13 UTC
https://github.com/Katello/katello/pull/1264

Comment 3 Og Maciel 2013-01-14 20:47:34 UTC
sam> system list --org 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb
------------------------------------------------------------------------------------------------------------------------
                             Systems List For Org [ 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb ]

Name                          Uuid                                 Environment Service Level 
------------------------------------------------------------------------------------------------------------------------
qeclient01.xxx.yyy.zzz 6dd89eb8-6250-492f-8e03-1e05536fde68 Dev Env                   
qeclient02.xxx.yyy.zzz 2b3b151a-b587-4c7e-be20-d2c142024e97 Dev Env                   
qeclient04.xxx.yyy.zzz 3ba2b501-096a-4255-829c-38a00bde6d67 Dev Env                   
qeclient03.xxx.yyy.zzz 24af9558-75e8-4f13-a3ab-c0c9062a85fe Dev Env                   
qeclient08.xxx.yyy.zzz c1e99aea-19c5-4b87-b575-cb1977bedc24 Dev Env                   
qeclient09.xxx.yyy.zzz dfea705a-d131-40d7-81ef-d69963169d36 Dev Env                   
sam> system remove_ --org 'São Paulo'
remove_custom_info  remove_deletion     
sam> system remove_deletion --org 'São Paulo' --uuid 2b3b151a-b587-4c7e-be20-d2c142024e97
Usage:   <options> system remove_deletion <options>

headpin: error: no such option: --org
sam> system remove_deletion --uuid 2b3b151a-b587-4c7e-be20-d2c142024e97
{"displayMessage":"Deletion record for hypervisor 2b3b151a-b587-4c7e-be20-d2c142024e97 not found."}

Comment 4 Og Maciel 2013-01-14 20:56:55 UTC
sam> system list --org 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb
------------------------------------------------------------------------------------------------------------------------
                             Systems List For Org [ 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb ]

Name                          Uuid                                 Environment Service Level 
------------------------------------------------------------------------------------------------------------------------
qeclient01.xxx.yyy.zzz 6dd89eb8-6250-492f-8e03-1e05536fde68 Dev Env                   
qeclient02.xxx.yyy.zzz 2b3b151a-b587-4c7e-be20-d2c142024e97 Dev Env                   
qeclient04.xxx.yyy.zzz 3ba2b501-096a-4255-829c-38a00bde6d67 Dev Env                   
qeclient03.xxx.yyy.zzz 24af9558-75e8-4f13-a3ab-c0c9062a85fe Dev Env                   
qeclient08.xxx.yyy.zzz c1e99aea-19c5-4b87-b575-cb1977bedc24 Dev Env                   
qeclient09.xxx.yyy.zzz dfea705a-d131-40d7-81ef-d69963169d36 Dev Env


then, from web ui I deleted the qeclient02 system

sam> system remove_deletion --uuid 2b3b151a-b587-4c7e-be20-d2c142024e97
Successfully removed deletion record for hypervisor with uuid [ 2b3b151a-b587-4c7e-be20-d2c142024e97 ]
sam> system list --org 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb
------------------------------------------------------------------------------------------------------------------------
                             Systems List For Org [ 9b8f7e32-b818-4d49-854a-7cf3abf1b3fb ]

Name                          Uuid                                 Environment Service Level 
------------------------------------------------------------------------------------------------------------------------
qeclient01.xxx.yyy.zzz 6dd89eb8-6250-492f-8e03-1e05536fde68 Dev Env                   
qeclient04.xxx.yyy.zzz 3ba2b501-096a-4255-829c-38a00bde6d67 Dev Env                   
qeclient03.xxx.yyy.zzz 24af9558-75e8-4f13-a3ab-c0c9062a85fe Dev Env                   
qeclient08.xxx.yyy.zzz c1e99aea-19c5-4b87-b575-cb1977bedc24 Dev Env                   
qeclient09.xxx.yyy.zzz dfea705a-d131-40d7-81ef-d69963169d36 Dev Env

Comment 5 Og Maciel 2013-01-14 20:57:36 UTC
Verified:

* candlepin-0.7.23-1.el6_3.noarch
* candlepin-tomcat6-0.7.23-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-11h.el6_3.noarch
* katello-cli-common-1.2.1-11h.el6_3.noarch
* katello-common-1.2.1-12h.el6_3.noarch
* katello-configure-1.2.3-1h.el6_3.noarch
* katello-glue-candlepin-1.2.1-12h.el6_3.noarch
* katello-headpin-1.2.1-12h.el6_3.noarch
* katello-headpin-all-1.2.1-12h.el6_3.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28-1.el6_3.noarch
* thumbslug-selinux-0.0.28-1.el6_3.noarch

Comment 7 errata-xmlrpc 2013-02-21 19:19:48 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.

http://rhn.redhat.com/errata/RHSA-2013-0544.html