I am looking to use letsencrypt to issue the certificate for my freeipa server
There is a discussion here where they make a case against using the intermediaries:
https://community.letsencrypt.org/t/freeipa-letsencrypt/237966/8
And I have an issue on the freeipa-letsencrypt repo here: https://github.com/freeipa/freeipa-letsencrypt/issues/53
and a PR where I am trying to fix the issue:
https://github.com/freeipa/freeipa-letsencrypt/pull/54
Peer's certificate issuer is not trusted (certutil: certificate is invalid: Peer's Certificate issuer is not recognized. ). Please run ipa-cacert-manage install and ipa-certupdate to install the CA certificate. The ipa-server-certinstall command failed.
Well if you set INSTALL_INTERMEDIARIES=='true' in the .env file of https://github.com/joshuacox/freeipa-letsencrypt/tree/fixes/53
then the ./setup-le.sh completes successfully:
ipapython.admintool: INFO: The ipa-certupdate command was successful Please restart ipa services after installing certificate (ipactl restart) The ipa-server-certinstall command was successful Restarting Directory Service Restarting krb5kdc Service Restarting kadmin Service Restarting named Service Restarting httpd Service Restarting ipa-custodia Service Restarting pki-tomcatd Service Restarting smb Service Restarting winbind Service Restarting ipa-otpd Service Restarting ipa-dnskeysyncd Service ipa: INFO: The ipactl command was successful
$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base pki-ca krb5-server
freeipa-server-4.12.2-8.fc41.x86_64 freeipa-client-4.12.2-8.fc41.x86_64 package ipa-server is not installed package ipa-client is not installed 389-ds-base-3.1.2-3.fc41.x86_64 package pki-ca is not installed krb5-server-1.21.3-4.fc41.x86_64
However, the useage of these intermediaries raise a lot of controversy:
just to extract everything away from the scripts, essentially it is this command that fails:
ipa-server-certinstall \ -w \ --dirman-password="${DIRMAN_PASSWORD}" \ -d /etc/letsencrypt/live/${FQDN}/privkey.pem /etc/letsencrypt/live/$FQDN/fullchain.pem \ --pin=''
unless both the root and intermediary certificates from letsencrypt are installed with:
ipa-cacert-manage install XXX.pem
Which the letsencrypt people are very adamant that the intermediary certs should not be installed. And I question whether or not the root certificates would need to be installed as they are already present anyhow:
ls -alh /etc/pki/ca-trust/extracted/pem/directory-hash|grep -i isrg lrwxrwxrwx. 1 root root 59 May 30 15:15 0b9bc432.0 -> CN_ISRG_Root_X2_O_Internet_Security_Research_Group_C_US.pem lrwxrwxrwx. 1 root root 59 May 30 15:15 4042bcee.0 -> CN_ISRG_Root_X1_O_Internet_Security_Research_Group_C_US.pem lrwxrwxrwx. 1 root root 59 May 30 15:15 6187b673.0 -> CN_ISRG_Root_X1_O_Internet_Security_Research_Group_C_US.pem lrwxrwxrwx. 1 root root 59 May 30 15:15 8794b4e3.0 -> CN_ISRG_Root_X2_O_Internet_Security_Research_Group_C_US.pem -r--r--r--. 1 root root 1.9K May 30 15:15 CN_ISRG_Root_X1_O_Internet_Security_Research_Group_C_US.pem -r--r--r--. 1 root root 790 May 30 15:15 CN_ISRG_Root_X2_O_Internet_Security_Research_Group_C_US.pem
so should they need to be installed at all?
The entire chain is required because of misunderstandings of PKI The chain is required so that IPA can be sure that the entire chain is available for clients and servers. We've seen often enough broken chains and have to dig into custom configurations to identify basic PKI issues. So we require the full chain. The same goes for the certificates themselves. Users often follow bad formulas for generating CAs and certificates which result in invalid or non-compliant certs. We don't impose these restrictions arbitrarily but because we've been shown over and over how they can be abused. This is less likely with a CA like LE which has its roots shipped in most OS's so is already trusted. It is custom PKI that generates the problems.
Thanks for all your help @rcriiten I do have a working freeipa server with a LE cert. So I guess I'll just have to maintain the scripts at freeipa-letsencrypt to ensure the list of intermediaries stay up to date.
Metadata Update from @uberthoth: - Issue close_status updated to: wontfix - Issue status updated to: Closed (was: Open)