Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1506710

Summary: JSS throws ObjectNotFoundException without message
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: jssAssignee: Endi Sukma Dewata <edewata>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: aakkiang, akahat, cfu, edewata, elio.maldonado.batiz, extras-qa, kwright, mharmsen, nkinder, rcritten, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jss-4.4.0-10.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1506707 Environment:
Last Closed: 2018-04-10 17:56:52 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:
Bug Depends On: 1506707    
Bug Blocks:    

Description Matthew Harmsen 2017-10-26 15:30:25 UTC
+++ This bug was initially created as a clone of Bug #1506707 +++

Currently if JSS cannot find a certificate in the NSS database it will throw an ObjectNotFoundException without any message. To help troubleshooting JSS should include the certificate nickname in the exception message.

Comment 4 Amol K 2017-12-15 06:19:20 UTC
Hi Endi,

For normal systems I'm able to see the error message. But for the HSM systems I'm not able to see any message.


1. On normal system
# certutil -L -d  /root/nssdb/ -n "CA"

Database needs user init
certutil: Could not find cert: CA
: PR_FILE_NOT_FOUND_ERROR: File not found


2. On HSM System : 
# certutil -L -d  /root/nssdb/ -n "NHSM6000-OCS:CA" -h nfast
Enter Password or Pin for "NHSM6000-OCS":

#

Comment 5 Endi Sukma Dewata 2018-01-02 04:36:52 UTC
Hi Amol,

The certutil is an NSS tool which we didn't modify. The changes made in this bug are for JSS which can be exposed via PKI CLI. Normally, if the client cert nickname specified in the PKI CLI does not exist in client's database (e.g. ~/.dogtag/nssdb) the CLI will show an ObjectNotFoundException thrown by JSS. With these changes, the exception message will now show the missing cert's nickname:

$ pki client-cert-show wrongcert
ObjectNotFoundException: Certificate not found: wrongcert

Comment 6 Amol K 2018-01-04 08:28:20 UTC
I tested this Bugzilla on the 10.5.1-5.el7 version.

It works as expected.

# pki -d /opt/pki/certdb/ -c Secret123 client-cert-show CA_AdminRj
ObjectNotFoundException: Certificate not found: CA_AdminRj

Verifying this bug.

Comment 9 errata-xmlrpc 2018-04-10 17:56:52 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.

https://access.redhat.com/errata/RHBA-2018:0958