In an HSM setup, we have subsystem certificate resides on HSM.We can use subsystem certificate for issuance protection certification. By default, the subsystem certificate (specified under cert.subsystem.nickname in the CA's CS.cfg), is used as the issuance protection certification. However, it is strongly advised that the administrator generate a different system certificate and dedicate that to this role. To configure such dedicated issuance protection certificate, the configuration parameter, cert.issuance_protection.nickname, must be specified
So if we try to use a certificate which we generate later for using as issuance protection certificate but it is not in HSM but it is in nssdb(internal token) in that case we are seeing failures.
Steps to Reproduce:
I created a cert using CA and now i used this "cert" . 1. CMCSharedToken -v -d . -p SECret.123 -s wonderfulday -o test -n "cert" # CMCSharedToken -v -d . -p SECret.123 -s wonderfulday -o test -n "cert" passphrase String = wonderfulday passphrase UTF-8 bytes = [119, 111, 110, 100, 101, 114, 102, 117, 108, 100, 97, 121] Getting cert by nickname: cert Generating session key Encrypting passphrase Wrapping session key with issuance protection cert Encrypted Secret Data: MIGVBIGAcS0iOcsoHThSL0Bk4bGkfznPng5DlSUem4R8iGB9XQlSCE130ZqN9NgH lkyE3mM41mPuZNSZk9S4eyUAWBGdo9maF/oJnLa69TqdVE6sTAMyaMumiEZuFqP2 lK4Uw3zq45gZ6X7prdRi0woXj3VfafIO+4I787eW33VbloSQb04EEEmNl1a8mQde ee1xmpBRxO8= Storing Base64 secret data into test 2. So the certificate is : certutil -L -d /etc/pki/rhcs-0day-trial-75/alias Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI caSigningCert cert-rhcs-0day-trial-75 CA CT,C,C auditSigningCert cert-rhcs-0day-trial-75 CA ,,P Server-Cert cert-rhcs-0day-trial-75 ,, cert u,u,u 3. Stop instance. Put cmc.token=internal in CS.cfg and cert.issuance_protection.nickname=cert in CS.cfg. Start instance. 4. Run PKCS10Client, CMCRequest, HttpClient. 5. Output: [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.getSharedToken(String identification): searching for identification =user2a; mShrTokAttr =shrTok [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: In LdapBoundConnFactory::getConn() [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: masterConn is connected: true [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: getConn: conn is connected true [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: getConn: mNumConns now 4 [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.getSharedToken(String identification): got entryShrTok [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.decryptShrTokData: wrapped session key retrieved [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.decryptShrTokData: wrapped passphrase retrieved [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.decryptShrTokData: java.security.InvalidKeyException: Key does not reside on the current token [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SharedSecret.getSharedToken(String identification): returning [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: returnConn: mNumConns now 5 [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: EnrollProfile:verifyIdentityProofV2: Failed to retrieve shared secret [20/Dec/2017:05:24:35][http-bio-28443-exec-2]: SignedAuditLogger: event CMC_PROOF_OF_IDENTIFICATION
Actual results:
Failed with "SharedSecret.decryptShrTokData: java.security.InvalidKeyException: Key does not reside on the current token"
Expected results:
This should work.
Metadata Update from @mharmsen: - Custom field component adjusted to None - Custom field feature adjusted to None - Custom field origin adjusted to None - Custom field proposedmilestone adjusted to None - Custom field proposedpriority adjusted to None - Custom field reviewer adjusted to None - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1528222 - Custom field type adjusted to None - Custom field version adjusted to None
Per 10.5.x/10.6 Triage: 10.5
cfu: I suppose we could do that; 10.5.x if there is time
Metadata Update from @mharmsen: - Issue set to the milestone: 10.5 (was: 10.6)
Metadata Update from @mharmsen: - Issue priority set to: major (was: critical)
Per 10.5.x/10.6 Triage: 10.5.x
Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.
This issue has been cloned to GitHub and is available here: https://github.com/dogtagpki/pki/issues/3008
If you want to receive further updates on the issue, please navigate to the GitHub issue and click on Subscribe button.
Subscribe
Thank you for understanding, and we apologize for any inconvenience.
Metadata Update from @dmoluguw: - Issue close_status updated to: migrated - Issue status updated to: Closed (was: Open)