dogtagpki / pki

The Dogtag Certificate System is an enterprise-class Certificate Authority (CA) which supports all aspects of certificate lifecycle management, including key archival, OCSP and smartcard management.
https://www.dogtagpki.org
GNU General Public License v2.0
361 stars 134 forks source link

Provide profile component that accepts multiple key types #4273

Open flo-renaud opened 1 year ago

flo-renaud commented 1 year ago

Add a new profile component that allows multiple key types with a single profile.

After implementation:


Historical description

Companion issue on freeipa side: https://pagure.io/freeipa/issue/9298

When using the latest certbot package (2.1.0-1.fc37, currently available in updates-testing repo), the ACME feature is not working. Test scenario:

  • install ipa server with ipa-server-install --domain ipa.test --realm IPA.TEST --setup-dns --auto-forwarders -a Secret123 -p Secret123 -U
  • enable acme: ipa-acme-manage enable
  • install an ipa client with hostname client.ipa.test: ipa-client-install --domain ipa.test --realm IPA.TEST --principal admin --password Secret123 --ip-address <IP addr> -U
  • register certbot: certbot --server https://ipa-ca.ipa.test/acme/directory register -m nobody@example.test --agree-tos --no-eff-email
  • request a standalone cert: certbot --server https://ipa-ca.ipa.test/acme/directory certonly --domain client.ipa.test --standalone

The certonly step is failing, pki logs show an exception: Unable to generate certificate: Key Type RSA Not Matched

The main difference between certbot 1.32.0-1.fc37 and certbot 2.1.0-1.fc37 is that it creates an EDCSA key instead of an RSA key as can be seen in /var/log/letsencrypt/letsencrypt.log:

certbot.crypto_util:Generating ECDSA key (2048 bits): /etc/letsencrypt/keys/0000_key-certbot.pem

Please investigate if the issue is on PKI side or certbot.

fmarco76 commented 1 year ago

Following certbot documentation they have modified the default key type from rsa to ecdsa. Is it possible to modify the key type with the option --key-type so it should work as before as a temporary solution?

frasertweedale commented 1 year ago

Yes, that is a temporary solution. But we should now prioritise work to either:

I prefer the latter approach but both are feasible. This consideration arises for EST also (another reason to prefer the second approach).

ckelleyRH commented 1 year ago

@edewata / @fmarco76 - did we raise a ticket for addressing this long-term on our side?

edewata commented 1 year ago

@ckelleyRH Could we use this ticket and maybe just change the title? I agree with @frasertweedale's suggestion on providing profiles that can support multiple key types.

ckelleyRH commented 1 year ago

As you like, works for me!

frasertweedale commented 1 year ago

I updated the title and description, as discussed.

edewata commented 1 year ago

@celestian