Bug 1657039

Summary: Getting NullPointerException while executing ca-profile-show for 'caTokenUserDelegateSigningKeyEnrollment' & 'caTokenUserDelegateAuthKeyEnrollment'
Product: Red Hat Enterprise Linux 8 Reporter: Pritam Singh <prisingh>
Component: pki-coreAssignee: RHCS Maintainers <rhcs-maint>
Status: CLOSED WORKSFORME QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: ascheel
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 07:31:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pritam Singh 2018-12-06 22:11:08 UTC
Description of problem:

Getting NullPointerException error while executing pki ca-profile-show for the following existing profiles:
caTokenUserDelegateSigningKeyEnrollment
caTokenUserDelegateAuthKeyEnrollment, as ca-profile-show used to display a specified profile in the database so it should return a preety print of profile data instead showing exceptional error.

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

PKI Command-Line Interface 10.6.8-1.module+el8+2277+f150bc67

How reproducible:

Always

Steps to Reproduce:
1. To find existence of above profiles:

[root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 20080 -n "PKI CA Administrator for Example.Org" ca-profile-find --size 90
 
2. Execute the following query to reproduce the above issue:

2.1 [root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 20080 -n "PKI CA Administrator for Example.Org" ca-profile-show caTokenUserDelegateAuthKeyEnrollment

2.2 [root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 20080 -n "PKI CA Administrator for Example.Org" ca-profile-show caTokenUserDelegateSigningKeyEnrollment

3. Above query pki query will return the nullpointerexception error instead showing preety print of the mentioned profiles. 

Actual results:

Seeing NullpointerException error for above profiles.

Expected results:

It should return preety print of the existing mentioned profiles instead showing NullPointerException error.

Additional info:

The above pki query working perfectly with other profiles like caUserCert, caDualCert etc but seeing issue with above profiles.

Pastebin: http://pastebin.test.redhat.com/680253

Comment 3 RHEL Program Management 2021-02-01 07:31:01 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 4 Alex Scheel 2021-02-01 14:23:42 UTC
I was unable to reproduce this with either profile. 

[root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 18443 -n "PKI Administrator for example.com" ca-profile-show caTokenUserDelegateSigningKeyEnrollment
-------------------------------------------------
Profile "caTokenUserDelegateSigningKeyEnrollment"
-------------------------------------------------
  Profile ID: caTokenUserDelegateSigningKeyEnrollment
  Name: Token User Delegate Signing Certificate Enrollment
  Description: This profile is for enrolling Token User Delegate Signing key

  Name: Token Key Certificate Request Input
  Class: nsNKeyCertReqInputImpl

    Attribute Name: screenname
    Attribute Description: Token Key User ID
    Attribute Syntax: string

    Attribute Name: publickey
    Attribute Description: Token Key User Public Key
    Attribute Syntax: string

  Name: Subject Name
  Class: subjectDNInputImpl

    Attribute Name: subject
    Attribute Description: Subject Name
    Attribute Syntax: string

  Name: Subject Alternative Name Extension Information
  Class: subjectAltNameExtInputImpl

    Attribute Name: req_san_type_0
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_0
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_1
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_1
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_2
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_2
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_3
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_3
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

  Name: Token Key Certificate Output
  Class: nsNKeyOutputImpl

    Attribute Name: der
    Attribute Description: DER Base 64 Encoded
    Attribute Syntax: der_b64
[root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 18443 -n "PKI Administrator for example.com" ca-profile-show caTokenUserDelegateAuthKeyEnrollment
----------------------------------------------
Profile "caTokenUserDelegateAuthKeyEnrollment"
----------------------------------------------
  Profile ID: caTokenUserDelegateAuthKeyEnrollment
  Name: Token User Delegate Authentication Certificate Enrollment
  Description: This profile is for enrolling Token User Delegate Authentication key

  Name: Token Key Certificate Request Input
  Class: nsNKeyCertReqInputImpl

    Attribute Name: screenname
    Attribute Description: Token Key User ID
    Attribute Syntax: string

    Attribute Name: publickey
    Attribute Description: Token Key User Public Key
    Attribute Syntax: string

  Name: Subject Name
  Class: subjectDNInputImpl

    Attribute Name: subject
    Attribute Description: Subject Name
    Attribute Syntax: string

  Name: Subject Alternative Name Extension Information
  Class: subjectAltNameExtInputImpl

    Attribute Name: req_san_type_0
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_0
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_1
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_1
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_2
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_2
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_3
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_3[root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 18443 -n "PKI Administrator for example.com" ca-profile-show caTokenUserDelegateSigningKeyEnrollment
-------------------------------------------------
Profile "caTokenUserDelegateSigningKeyEnrollment"
-------------------------------------------------
  Profile ID: caTokenUserDelegateSigningKeyEnrollment
  Name: Token User Delegate Signing Certificate Enrollment
  Description: This profile is for enrolling Token User Delegate Signing key

  Name: Token Key Certificate Request Input
  Class: nsNKeyCertReqInputImpl

    Attribute Name: screenname
    Attribute Description: Token Key User ID
    Attribute Syntax: string

    Attribute Name: publickey
    Attribute Description: Token Key User Public Key
    Attribute Syntax: string

  Name: Subject Name
  Class: subjectDNInputImpl

    Attribute Name: subject
    Attribute Description: Subject Name
    Attribute Syntax: string

  Name: Subject Alternative Name Extension Information
  Class: subjectAltNameExtInputImpl

    Attribute Name: req_san_type_0
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_0
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_1
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_1
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_2
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_2
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_3
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_3
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

  Name: Token Key Certificate Output
  Class: nsNKeyOutputImpl

    Attribute Name: der
    Attribute Description: DER Base 64 Encoded
    Attribute Syntax: der_b64
[root@pki1 ~]# pki -d /opt/pki/certdb/ -c SECret.123 -p 18443 -n "PKI Administrator for example.com" ca-profile-show caTokenUserDelegateAuthKeyEnrollment
----------------------------------------------
Profile "caTokenUserDelegateAuthKeyEnrollment"
----------------------------------------------
  Profile ID: caTokenUserDelegateAuthKeyEnrollment
  Name: Token User Delegate Authentication Certificate Enrollment
  Description: This profile is for enrolling Token User Delegate Authentication key

  Name: Token Key Certificate Request Input
  Class: nsNKeyCertReqInputImpl

    Attribute Name: screenname
    Attribute Description: Token Key User ID
    Attribute Syntax: string

    Attribute Name: publickey
    Attribute Description: Token Key User Public Key
    Attribute Syntax: string

  Name: Subject Name
  Class: subjectDNInputImpl

    Attribute Name: subject
    Attribute Description: Subject Name
    Attribute Syntax: string

  Name: Subject Alternative Name Extension Information
  Class: subjectAltNameExtInputImpl

    Attribute Name: req_san_type_0
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_0
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_1
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_1
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_2
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_2
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

    Attribute Name: req_san_type_3
    Attribute Description: Request Subject Alternative Name Extension Type
    Attribute Syntax: string

    Attribute Name: req_san_pattern_3
    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

  Name: Token Key Certificate Output
  Class: nsNKeyOutputImpl

    Attribute Name: der
    Attribute Description: DER Base 64 Encoded
    Attribute Syntax: der_b64

    Attribute Description: Request Subject Alternative Name Extension Pattern
    Attribute Syntax: string

  Name: Token Key Certificate Output
  Class: nsNKeyOutputImpl

    Attribute Name: der
    Attribute Description: DER Base 64 Encoded
    Attribute Syntax: der_b64