Este conteúdo não está disponível no idioma selecionado.
Chapter 20. Replacing the web server and LDAP server certificates if they have not yet expired on an IdM replica
As an Identity Management (IdM) system administrator, you can manually replace the certificates for the web (or httpd) and LDAP (or Directory) services running on an IdM server. For example, this might be necessary if the certificates are nearing expiration and if the certmonger utility is either not configured to renew the certificates automatically or if the certificates are signed by an external certificate authority (CA).
The example installs the certificates for the services running on the server.idm.example.com IdM server. You obtain the certificates from an external CA.
The HTTP and LDAP service certificates have different keypairs and subject names on different IdM servers and so you must renew the certificates on each IdM server individually.
Prerequisites
-
On at least one other IdM replica in the topology with which the IdM server has a replication agreement, the web and LDAP certificates are still valid. This is a prerequisite for the
ipa-server-certinstallcommand. The command requires aTLSconnection to communicate with other IdM replicas. However, with invalid certificates, such a connection could not be established, and theipa-server-certinstallcommand would fail. In that case, see Replacing the web server and LDAP server certificates if they have expired in the whole IdM deployment. -
You have
rootaccess to the IdM server. -
You know the
Directory Managerpassword. - You have access to a file storing the CA certificate chain of the external CA, ca_certificate_chain_file.crt.
Procedure
Install the certificates contained in ca_certificate_chain_file.crt as additional CA certificates to IdM:
ipa-cacert-manage install
# ipa-cacert-manage installCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the local IdM certificate databases with certificates from ca_certicate_chain_file.crt:
ipa-certupdate
# ipa-certupdateCopy to Clipboard Copied! Toggle word wrap Toggle overflow Generate a private key and a certificate signing request (CSR) using the
OpenSSLutility:openssl req -new -newkey rsa:4096 -days 365 -nodes -keyout new.key -out new.csr -addext "subjectAltName = DNS:server.idm.example.com" -subj '/CN=server.idm.example.com,O=IDM.EXAMPLE.COM'
$ openssl req -new -newkey rsa:4096 -days 365 -nodes -keyout new.key -out new.csr -addext "subjectAltName = DNS:server.idm.example.com" -subj '/CN=server.idm.example.com,O=IDM.EXAMPLE.COM'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Submit the CSR to the external CA. The process differs depending on the service to be used as the external CA. After the CA signs the certificate, import the certificate to the IdM server.
On the IdM server, replace the Apache web server’s old private key and certificate with the new key and the newly-signed certificate:
ipa-server-certinstall -w --pin=password new.key new.crt
# ipa-server-certinstall -w --pin=password new.key new.crtCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the command above:
-
The
-woption specifies that you are installing a certificate into the web server. -
The
--pinoption specifies the password protecting the private key.
-
The
-
When prompted, enter the
Directory Managerpassword. Replace the LDAP server’s old private key and certificate with the new key and the newly-signed certificate:
ipa-server-certinstall -d --pin=password new.key new.cert
# ipa-server-certinstall -d --pin=password new.key new.certCopy to Clipboard Copied! Toggle word wrap Toggle overflow In the command above:
-
The
-doption specifies that you are installing a certificate into the LDAP server. -
The
--pinoption specifies the password protecting the private key.
-
The
-
When prompted, enter the
Directory Managerpassword. Restart the
httpdservice:systemctl restart httpd.service
# systemctl restart httpd.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
Directoryservice:systemctl restart dirsrv@IDM.EXAMPLE.COM.service
# systemctl restart dirsrv@IDM.EXAMPLE.COM.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow If a subCA has been removed or replaced on the servers, update the clients:
ipa-certupdate
# ipa-certupdateCopy to Clipboard Copied! Toggle word wrap Toggle overflow