dogtaginstance: add profile to tracking requests

Enabling "fresh" renewals (c.f. "renewal"-based renewals that
reference the expired certificate and its associated request object)
will improve renewal robustness.

To use fresh renewals the tracking request must record the profile
to be used.  Make dogtaginstance record the profile when creating
tracking requests for both CA and KRA.

Note that 'Server-Cert cert-pki-ca' and the 'IPA RA' both use
profile 'caServerCert', which is the default (according to
dogtag-ipa-renew-agent which is part of Certmonger).  So we do not
need any special handling for those certificates.

This commit does not handle upgrade.  It will be handled in a
subsequent commit.

Part of: https://pagure.io/freeipa/issue/7991

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Fraser Tweedale
2019-05-17 16:04:14 +10:00
parent e771fa59ff
commit 3c388f5a22
3 changed files with 18 additions and 8 deletions

View File

@@ -60,9 +60,11 @@ class KRAInstance(DogtagInstance):
be the same for both the CA and KRA.
"""
tracking_reqs = ('auditSigningCert cert-pki-kra',
'transportCert cert-pki-kra',
'storageCert cert-pki-kra')
tracking_reqs = {
'auditSigningCert cert-pki-kra': 'caInternalAuthAuditSigningCert',
'transportCert cert-pki-kra': 'caInternalAuthTransportCert',
'storageCert cert-pki-kra': 'caInternalAuthDRMstorageCert',
}
def __init__(self, realm):
super(KRAInstance, self).__init__(