Bug 847354 - rct cat-cert tool should not report "None" for entitlement OIDS that are missing/null
Summary: rct cat-cert tool should not report "None" for entitlement OIDS that are miss...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: beta
: 5.9
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-08-10 16:54 UTC by John Sefler
Modified: 2013-01-08 03:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2013-01-08 03:58:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description John Sefler 2012-08-10 16:54:32 UTC
Description of problem:
String attribute values that are null/nil are being reported as "None" in the rct cat-cert report.  This is not good since a string value of "None" can actually be a real meaningful value (e.g. Service Level: "None").  Instead, no value should be reported.

Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# rpm -q subscription-manager
subscription-manager-1.0.13-1.git.14.28f8917.el5


How reproducible:


Steps to Reproduce:
Inspecting an example test entitlement...........
[root@jsefler-rhel59 ~]# openssl x509 -text -in /etc/pki/entitlement/8289962660374939515.pem
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            73:0b:dd:1e:14:e6:87:7b
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: CN=jsefler-f14-candlepin.usersys.redhat.com, C=US, L=Raleigh
        Validity
            Not Before: Aug  9 15:08:25 2012 GMT
            Not After : Aug 25 15:08:25 2012 GMT
        Subject: CN=8a90f81d38fe6a3e0139115181bd26db
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
                    00:9e:f8:b5:ff:23:94:f8:45:65:9f:49:63:90:4d:
                    98:45:85:48:ea:9a:23:db:eb:3b:18:23:34:48:f7:
                    bd:cf:c5:f0:79:ab:ee:a7:43:82:79:68:c0:ad:6e:
                    cb:8d
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            Netscape Cert Type: 
                SSL Client, S/MIME
            X509v3 Key Usage: 
                Digital Signature, Key Encipherment, Data Encipherment
            X509v3 Authority Key Identifier: 
                keyid:BB:AC:16:38:9A:D3:7D:76:0B:5F:6C:6A:A3:98:2F:FA:7B:96:A1:7D
                DirName:/CN=jsefler-f14-candlepin.usersys.redhat.com/C=US/L=Raleigh
                serial:8F:44:E3:A3:41:85:00:78

            X509v3 Subject Key Identifier: 
                9A:CF:96:66:3C:73:C3:30:B0:EB:E4:90:18:D5:3F:34:EE:9F:FC:3E
            X509v3 Extended Key Usage: 
                TLS Web Client Authentication
            1.3.6.1.4.1.2312.9.4.1: 
                ."Subscription with UltiMAte support
            1.3.6.1.4.1.2312.9.4.2: 
                . 8a90f81d38fe6a3e01391114477b238c
            1.3.6.1.4.1.2312.9.4.3: 
                ..UltiMAte-support-product-1
            1.3.6.1.4.1.2312.9.4.5: 
                ..20
            1.3.6.1.4.1.2312.9.4.6: 
                ..2012-08-09T15:08:25Z
            1.3.6.1.4.1.2312.9.4.7: 
                ..2012-08-25T15:08:25Z
            1.3.6.1.4.1.2312.9.4.12: 
                ..5
            1.3.6.1.4.1.2312.9.4.10: 
                .
1292004036
            1.3.6.1.4.1.2312.9.4.13: 
                ..639977788
            1.3.6.1.4.1.2312.9.4.14: 
                ..0
            1.3.6.1.4.1.2312.9.4.15: 
                ..UltiMAte
            1.3.6.1.4.1.2312.9.4.11: 
                ..1
            1.3.6.1.4.1.2312.9.5.1: 
                .$f41e8cd2-a80b-4416-90de-9a782c99956d
    Signature Algorithm: sha1WithRSAEncryption
        6d:aa:e1:19:76:ae:07:54:94:57:f6:cf:1f:71:80:35:f0:4d:
        73:8c:d3:f8:5d:3c:06:64:09:39:b8:8b:cd:ac:97:46:b8:ac:
        ce:30:d6:6a:7f:8a:7f:68:99:2a:9c:5d:f0:92:cd:c1:f9:7d:
        47:2d
-----BEGIN CERTIFICATE-----
MIIFDzCCBHigAwIBAgIIcwvdHhTmh3swDQYJKoZIhvcNAQEFBQAwUjExMC8GA1UE
a2q3ZZlGa5jKkYK3kDHAsW737540L4GHGJMhl0OSbCm9FDJSQtcVhMsu7PJnhk0d
7h+dYR4/tvoLbzlbNXOM0/hdPAZkCTm4i82sl0a4rM4w1mp/in9omSqcXfCSzcH5
fUct
-----END CERTIFICATE-----


[root@jsefler-rhel59 ~]# rct cat-cert /etc/pki/entitlement/8289962660374939515.pem

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/entitlement/8289962660374939515.pem
	Version: 1.0
	Serial: 8289962660374939515
	Start Date: 2012-08-09 15:08:25+00:00
	End Date: 2012-08-25 15:08:25+00:00

Subject:
	CN: 8a90f81d38fe6a3e0139115181bd26db


Order:
	Name: Subscription with UltiMAte support
	Number: 8a90f81d38fe6a3e01391114477b238c
	SKU: UltiMAte-support-product-1
	Contract: 1292004036
	Account: 639977788
	Service Level: UltiMAte
	Service Type: None        <====== MISSING OID 1.3.6.1.4.1.2312.9.4.16
	Quantity: 20
	Quantity Used: 1
	Socket Limit: None        <====== MISSING OID 1.3.6.1.4.1.2312.9.4.9
	Virt Limit: None          <====== MISSING OID 1.3.6.1.4.1.2312.9.4.8
	Virt Only: False
	Subscription: None        <====== MISSING OID 1.3.6.1.4.1.2312.9.4.4
	Stacking ID: None         <====== MISSING OID 1.3.6.1.4.1.2312.9.4.17
	Warning Period: 5
	Provides Management: 0


  
Actual results:
see above

Expected results:
Order:
	Name: Subscription with UltiMAte support
	Number: 8a90f81d38fe6a3e01391114477b238c
	SKU: UltiMAte-support-product-1
	Contract: 1292004036
	Account: 639977788
	Service Level: UltiMAte
	Service Type:                <====== THIS IS A MORE ACCURATE REPORT
	Quantity: 20
	Quantity Used: 1
	Socket Limit:                <====== THIS IS A MORE ACCURATE REPORT
	Virt Limit:                  <====== THIS IS A MORE ACCURATE REPORT
	Virt Only: False
	Subscription:                <====== THIS IS A MORE ACCURATE REPORT
	Stacking ID:                 <====== THIS IS A MORE ACCURATE REPORT
	Warning Period: 5
	Provides Management: 0




Additional info:
  Reference similar bug 842170

Comment 1 RHEL Program Management 2012-08-10 16:57:01 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Bryan Kearney 2012-08-17 17:32:02 UTC
Do you want 


Service Type: None 
Service Type:
Service Type: <<NOT SET>>

Comment 3 John Sefler 2012-08-17 18:01:01 UTC
I prefer what's behind door #2...

Service Type:

This is consistent with the way subscription-manager list --installed --consumed --avail reports null/nil data

Comment 4 Bryan Kearney 2012-08-30 13:16:47 UTC
fixed in master at 7dcac798a8e42111feaa52638cfaa26b33b6a177

Comment 7 John Sefler 2012-08-31 19:29:59 UTC
Verifying Version...
[root@jsefler-59client ~]# rpm -q subscription-manager
subscription-manager-1.0.17-1.el5


[root@jsefler-59client ~]# openssl x509 -text -in /etc/pki/entitlement/1505443952365066404.pem  | grep None -B1
            1.3.6.1.4.1.2312.9.4.15: 
                ..None
            1.3.6.1.4.1.2312.9.4.16: 
                ..None

^^^ OBSERVE THAT IN THIS ENTITLEMENT, THE supportLevel AND supportType ARE ACTUALLY "None"


[root@jsefler-59client ~]# rct cat-cert /etc/pki/entitlement/1505443952365066404.pem 

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/entitlement/1505443952365066404.pem
	Version: 1.0
	Serial: 1505443952365066404
	Start Date: 2011-10-05 04:00:00+00:00
	End Date: 2022-01-01 04:59:59+00:00

Subject:
	CN: 8a99f9843973b59b01397e0d6a401693

Product:
	ID: 92
	Name: Red Hat Enterprise Linux Scalable File System (for RHEL Server)
	Version: 
	Arch: x86_64
	Tags: 
Product:
	ID: 180
	Name: Red Hat Beta
	Version: 
	Arch: ia64,ppc,ppc64,s390,s390x,x86,x86_64
	Tags: 
Product:
	ID: 85
	Name: Red Hat Enterprise Linux Load Balancer (for RHEL Server)
	Version: 
	Arch: x86,x86_64
	Tags: 
Product:
	ID: 83
	Name: Red Hat Enterprise Linux High Availability (for RHEL Server)
	Version: 
	Arch: ia64,ppc,ppc64,x86,x86_64
	Tags: 
Product:
	ID: 71
	Name: Red Hat Enterprise Linux Workstation
	Version: 
	Arch: x86,x86_64
	Tags: 
Product:
	ID: 69
	Name: Red Hat Enterprise Linux Server
	Version: 
	Arch: x86,ia64,x86_64
	Tags: 
Product:
	ID: 90
	Name: Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
	Version: 
	Arch: ia64,ppc,ppc64,x86,x86_64
	Tags: 

Order:
	Name: Red Hat Employee Subscription
	Number: 2252587
	SKU: SYS0395
	Contract: 2596950
	Account: 477931
	Service Level: None    <========= VERIFIED, ACTUAL OID VALUE IS "None"
	Service Type: None     <========= VERIFIED, ACTUAL OID VALUE IS "None"
	Quantity: 1
	Quantity Used: 1
	Socket Limit: 128
	Virt Limit:            <========= VERIFIED, A NULL VALUE IS LEFT BLANK
	Virt Only: 1
	Subscription:          <========= VERIFIED, A NULL VALUE IS LEFT BLANK
	Stacking ID:           <========= VERIFIED, A NULL VALUE IS LEFT BLANK
	Warning Period: 0
	Provides Management: 0

Content:
	Name: Red Hat Enterprise Linux 5 Server Beta (Debug RPMs)
	Label: rhel-5-server-beta-debug-rpms
	Vendor: Red Hat
	URL: /content/beta/rhel/server/5/$releasever/$basearch/debug
	GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
	Enabled: False
	Expires: 86400
	Required Tags: rhel-5-server

<..CUTTING OFF REST OF OUTPUT...>

Comment 9 errata-xmlrpc 2013-01-08 03:58:37 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-2013-0033.html


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