Bug 878191 - CLI system remove_deletion fails calling candlepin proxy
CLI system remove_deletion fails calling candlepin proxy
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Jordan OMara
Og Maciel
:
Depends On:
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-11-19 15:10 EST by Tom McKay
Modified: 2014-11-09 17:56 EST (History)
7 users (show)

See Also:
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 14:19:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom McKay 2012-11-19 15:10:16 EST
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 13:19:13 EST
https://github.com/Katello/katello/pull/1264
Comment 3 Og Maciel 2013-01-14 15:47:34 EST
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 15:56:55 EST
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 15:57:36 EST
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 14:19:48 EST
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

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