Bug 847354 - rct cat-cert tool should not report "None" for entitlement OIDS that are missing/null
rct cat-cert tool should not report "None" for entitlement OIDS that are miss...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity high
: beta
: 5.9
Assigned To: Bryan Kearney
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-08-10 12:54 EDT by John Sefler
Modified: 2013-01-07 22:58 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:58:37 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 John Sefler 2012-08-10 12:54:32 EDT
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 Product and Program Management 2012-08-10 12:57:01 EDT
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 13:32:02 EDT
Do you want 


Service Type: None 
Service Type:
Service Type: <<NOT SET>>
Comment 3 John Sefler 2012-08-17 14:01:01 EDT
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 09:16:47 EDT
fixed in master at 7dcac798a8e42111feaa52638cfaa26b33b6a177
Comment 7 John Sefler 2012-08-31 15:29:59 EDT
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-07 22:58:37 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/RHBA-2013-0033.html

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