New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipa-cacert-manage: add --external-ca-type #728
Conversation
ipaserver/install/cainstance.py
Outdated
| @@ -282,7 +282,7 @@ class CAInstance(DogtagInstance): | |||
| tracking_reqs = (('auditSigningCert cert-pki-ca', None), | |||
| ('ocspSigningCert cert-pki-ca', None), | |||
| ('subsystemCert cert-pki-ca', None), | |||
| ('caSigningCert cert-pki-ca', 'ipaCACertRenewal')) | |||
| ('caSigningCert cert-pki-ca', None)) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the one special snowflake, you can remove the second part of each tuple (also in KRAInstance) and simplify DogtagInstance.configure_renewal() as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
| @@ -939,7 +937,7 @@ def certificate_renewal_update(ca, ds, http): | |||
| 'cert-presave-command': template % 'stop_pkicad', | |||
| 'cert-postsave-command': | |||
| (template % 'renew_ca_cert "caSigningCert cert-pki-ca"'), | |||
| 'template-profile': 'ipaCACertRenewal', | |||
| 'template-profile': '', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the empty string here required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the profile name needs to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so, OK.
Do not bypass the renewal master check when a non-virtual profile is used in dogtag-ipa-ca-renew-agent-submit. This fixes dogtag-ipa-ca-renew-agent not respecting the CA renewal master setting for certificates tracked with a real profile. (Note that there currently aren't any such certificates tracked by us.) Request the RA certificate using dogtag-submit rather than dogtag-ipa-ca-renew-agent-submit as the CA renewal master setting is not available so early in the install process. https://pagure.io/freeipa/issue/5799
Fix certmonger tracking requests on every run of ipa-server-upgrade rather than only when the tracking configuration has changed and the requests have not yet been updated. This allows fixing broken tracking requests just by re-running ipa-server-upgrade. https://pagure.io/freeipa/issue/5799
Use Dogtag's `caCACert` CA certificate profile rather than the `ipaCACertRenewal` virtual profile for lightweight CA certificates. The `ipaCACertRenewal` virtual profile adds special handling of externally signed CA certificates and LDAP replication of issued certificates on top of `caCACert`, neither of which is relevant for lightweight CA certificates. Remove all of the special casing of lightweight CA certificates from dogtag-ipa-ca-renew-agent-submit. Make sure existing lightweight CA certmonger tracking requests are updated on server upgrade. https://pagure.io/freeipa/issue/5799
Add a switch which makes `dogtag-ipa-ca-renew-agent-submit` reuse the existing certificate rather than request a new one from the CA while maintaining LDAP replication of the certificate. Make this available as a new `dogtag-ipa-ca-renew-agent-reuse` certmonger CA. This allows redoing the LDAP replication and reexecuting pre- and post-save commands of a tracking request without reissuing the certificate. https://pagure.io/freeipa/issue/5799
Make sure a CSR is exported for the IPA CA whenever certmonger detects that the CA certificate is about to expire. This is a pre-requisite for using the `dogtag-ipa-ca-renew-agent-reuse` CA instead of the `ipaCSRExport` virtual profile to export the CSR. https://pagure.io/freeipa/issue/5799
Replace all uses of virtual profiles with `dogtag-ipa-ca-renew-agent-reuse` and remove profile from the IPA CA certificate tracking request. This prevents virtual profiles from making their way into CSRs and in turn being rejected by certain CAs. This affected the IPA CA CSR with Microsoft CS in particular. https://pagure.io/freeipa/issue/5799
Add the `--external-ca-type`, as known from `ipa-server-install` and `ipa-ca-install`, to `ipa-cacert-manage`. This allows creating IPA CA CSRs suitable for use with Microsoft CS using `ipa-cacert-manage`: ``` ipa-cacert-manage renew --external-ca --external-ca-type=ms-cs ``` https://pagure.io/freeipa/issue/5799
|
LGTM |
|
Work for me. |
|
master:
|
server upgrade: always fix certmonger tracking request
Fix certmonger tracking requests on every run of ipa-server-upgrade rather
than only when the tracking configuration has changed and the requests have
not yet been updated.
This allows fixing broken tracking requests just by re-running
ipa-server-upgrade.
cainstance: use correct profile for lightweight CA certificates
Use Dogtag's
caCACertCA certificate profile rather than theipaCACertRenewalvirtual profile for lightweight CA certificates.The
ipaCACertRenewalvirtual profile adds special handling of externallysigned CA certificates and LDAP replication of issued certificates on top
of
caCACert, neither of which is relevant for lightweight CAcertificates.
Remove all of the special casing of lightweight CA certificates from
dogtag-ipa-ca-renew-agent-submit.
Make sure existing lightweight CA certmonger tracking requests are updated
on server upgrade.
renew agent: allow reusing existing certs
Add a switch which makes
dogtag-ipa-ca-renew-agent-submitreuse theexisting certificate rather than request a new one from the CA while
maintaining LDAP replication of the certificate.
Make this available as a new
dogtag-ipa-ca-renew-agent-reusecertmongerCA.
This allows redoing the LDAP replication and reexecuting pre- and post-save
commands of a tracking request without reissuing the certificate.
renew agent: always export CSR on IPA CA certificate renewal
Make sure a CSR is exported for the IPA CA whenever certmonger detects that
the CA certificate is about to expire.
This is a pre-requisite for using the
dogtag-ipa-ca-renew-agent-reuseCAinstead of the
ipaCSRExportvirtual profile to export the CSR.renew agent: get rid of virtual profiles
Replace all uses of virtual profiles with
dogtag-ipa-ca-renew-agent-reuseand remove profile from the IPA CA certificate tracking request.
This prevents virtual profiles from making their way into CSRs and in turn
being rejected by certain CAs. This affected the IPA CA CSR with Microsoft
CS in particular.
ipa-cacert-manage: add --external-ca-type
Add the
--external-ca-type, as known fromipa-server-installandipa-ca-install, toipa-cacert-manage.This allows creating IPA CA CSRs suitable for use with Microsoft CS using
ipa-cacert-manage:https://pagure.io/freeipa/issue/5799