Bug 643432 - Inconsistent behavior when importing a cert and then registering
Summary: Inconsistent behavior when importing a cert and then registering
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Shwetha Kallesh
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 738066 756082
TreeView+ depends on / blocked
 
Reported: 2010-10-15 15:17 UTC by Jeff Weiss
Modified: 2014-11-09 22:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No Documentation Required
Clone Of:
Environment:
Last Closed: 2012-06-20 12:56:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Quantity of available subscriptions after importing the cert (100.03 KB, image/png)
2012-03-22 11:02 UTC, Shwetha Kallesh
no flags Details
Quantity of available subscriptions before importing the cert (99.16 KB, image/png)
2012-03-22 11:09 UTC, Shwetha Kallesh
no flags Details
the product doesnot show up in all available tab (93.02 KB, image/png)
2012-03-29 08:16 UTC, Shwetha Kallesh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Description Jeff Weiss 2010-10-15 15:17:08 UTC
Description of problem:
(in the gui) If you import a cert (taken from a cp server) and then register to that cp server, and try to subscribe to that pool, nothing happens.  It still shows up in the available list.  It should not show as available but not let you subscribe to it.

Version-Release number of selected component (if applicable):
0.92-1

How reproducible:
always

Steps to Reproduce:
1. Register to cp on-prem server.  Subscribe to RHEL Workstation.
2. Copy the cert from /etc/pki/entitlements/product to /tmp
3. Unregister.
4. Import the cert from /tmp
5. Register
6. Click Add.  Select RHEL Workstation
  
Actual results:
Nothing happens, you can keep going back to "Add" and selecting RHEL Workstation and subscribing to it, but it will keep showing that you're subscribed on that main panel, but still available on the Add panel.

Expected results:
This pool should not be considered available.  Or if it is, subscribing to it should remove it from the available list.

Additional info:

Comment 1 Jeff Weiss 2010-10-15 15:22:24 UTC
You can unsubscribe from RHEL Workstation, and subscribe to it.  It *STILL* shows up on the available list after that, but sm-gui throws an appropriate error if you try to subscribe a 2nd time.  It shouldn't be on the available list though.

Comment 7 Chris Duryee 2012-01-30 16:39:48 UTC
I tested this against a 6.2 install (sub-mgr 0.96.17) and it appears to work. I'm not able to subscribe to products that I'm already subscribed to, I would assume this is a filtering bug that has been fixed already in a previous commit.

Marking as MODIFIED for QE to verify. Note that I had to concatenate the copied pem and the -key file together in order for the import to succeed, but the steps other than that were the same as indicated in comment #1.

Comment 11 Shwetha Kallesh 2012-03-22 11:02:47 UTC
Created attachment 571962 [details]
Quantity of available subscriptions after importing the cert

Comment 12 Shwetha Kallesh 2012-03-22 11:09:41 UTC
Created attachment 571963 [details]
Quantity of available subscriptions before importing the cert

Comment 13 Shwetha Kallesh 2012-03-22 11:12:53 UTC
Moving back to new as the product still shows up in the available list even after importing.

RPM used:

[root@skallesh entitlement]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-migration-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-firstboot-0.99.10-1.git.85.057ca98.el6.x86_64
subscription-manager-0.99.10-1.git.85.057ca98.el6.x86_64

Comment 14 Chris Duryee 2012-03-23 18:06:07 UTC
Shwetha,

In the screenshot, the "have no overlap with existing subscriptions" checkbox is unchecked, which would make the extra subscription show up.

Here are the steps I used to attempt to repro the bug:

* subscribe to something
* copy the entitlement cert to /tmp (cert + key concatenated)
* unsubscribe
* import the copied cert, which automatically applies it to my system
* look at the all available subscriptions tab, the subscription for the product that was imported should not show up since it was already covered by the import in the previous step.

Moving back to MODIFIED, let me know if the steps above don't work, or if I'm not reproducing the bug correctly.

Comment 16 Shwetha Kallesh 2012-03-29 08:16:16 UTC
Created attachment 573567 [details]
the product doesnot show up in all available tab

Verified...

RPM used:

[root@skallesh entitlement]# rpm -qa | grep subscription-manager
subscription-manager-debuginfo-0.99.12-1.el6.x86_64
subscription-manager-firstboot-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-migration-data-1.12.1.2-1.git.0.9e244c8.el6.noarch
subscription-manager-gnome-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-migration-0.99.12-1.git.5.5f0e228.el6.x86_64
subscription-manager-0.99.12-1.git.5.5f0e228.el6.x86_64

     
[root@skallesh entitlement]# ll
total 8
-rw-------. 1 root root 1675 Mar 29 13:30 538756090038514596-key.pem
-rw-r--r--. 1 root root 3244 Mar 29 13:30 538756090038514596.pem
[root@skallesh entitlement]# cat 538756090038514596.pem >> new.pem
[root@skallesh entitlement]# cat 538756090038514596-key.pem >> new.pem 

[root@skallesh entitlement]# mv new.pem /etc/pki/tmp/

[root@skallesh entitlement]# subscription-manager unsubscribe --all
[root@skallesh entitlement]# subscription-manager import --certificate=/etc/pki/tmp/new.pem
Successfully imported certificate new.pem

Comment 17 James Laska 2012-05-22 19:58:12 UTC
HASH(0x1cc8e0d0)

Comment 19 Bryan Kearney 2012-05-22 20:09:31 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
s

Comment 20 Bryan Kearney 2012-05-23 17:18:10 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-s+No Documentation Required

Comment 22 errata-xmlrpc 2012-06-20 12:56:00 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/RHBA-2012-0804.html


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