Bug 878191 - CLI system remove_deletion fails calling candlepin proxy
Summary: CLI system remove_deletion fails calling candlepin proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Jordan OMara
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks: sam12-tracker
TreeView+ depends on / blocked
 
Reported: 2012-11-19 20:10 UTC by Tom McKay
Modified: 2014-11-09 22:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
CLI's 'system remove_deletion' no longer fails.
Clone Of:
Environment:
Last Closed: 2013-02-21 19:19:48 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 875609 0 unspecified CLOSED Could not find ESX/Hyper-V host on SAM WebUI 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2013:0544 0 normal SHIPPED_LIVE Important: Subscription Asset Manager 1.2 update 2013-02-26 04:08:04 UTC

Internal Links: 875609

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


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