Bug 1955633

Summary: Recovery of Keys migrated to latest version of KRA fail to recover and result in Null Point Exception [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: Chris Zinda <czinda>
Component: pki-coreAssignee: Jack Magne <jmagne>
Status: CLOSED ERRATA QA Contact: PKI QE <bugzilla-pkiqe>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: aakkiang, edewata, jmagne, jreznik, mharmsen, msauton, prisingh
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 7.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-10.5.18-14.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1960745 (view as bug list) Environment:
Last Closed: 2021-06-08 22:33:29 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:
Bug Depends On:    
Bug Blocks: 1960745    

Description Chris Zinda 2021-04-30 14:55:50 UTC
Description of problem:
Keys Migrated to the latest version of KRA stored the same storage certificate using the older 3des are not recoverable and result in a Null Point Exception


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

How reproducible:
Very.

Steps to Reproduce:
Anytime a recovery attempt is made against a Key Record that does not have MetaInfo attributes in the database


Actual results:
Null Pointer exception (attached logs)

Expected results:
To properly capture the keys

Additional info:
Anytime a recovery attempt is made against a Key Record that does not have MetaInfo attributes in the database

https://github.com/dogtagpki/pki/blob/v10.5.18/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java#L509

mMetaInfo does not exist for Legacy Key Records so it cannot parse it for a value. 

What information can you provide around timeframes and the business impact?
Prevents the Recovery to token, and the Recovery to p12 for any key that does not have the metaInfo attribiutes.

Comment 24 errata-xmlrpc 2021-06-08 22:33:29 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 (pki-core bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2315