Published Feb. 24, 2025, 5:20 a.m. by dwest
In the previous parts of this series we covered:
At this point, FreeIPA is acting as the identity backbone of your infrastructure. Users can authenticate, access policies are enforced and systems are centrally managed. However, modern infrastructure also requires secure communication between services. This is where FreeIPA’s built-in certificate authority (CA) and service principals become extremely useful. FreeIPA includes an integrated Public Key Infrastructure (PKI) that can automatically issue and manage certificates for hosts and services.
This allows administrators to:
In this article we will explore how FreeIPA manages certificates and service identities.
FreeIPA includes a full certificate authority powered by the Dogtag Certificate System.
This CA issues certificates for:
The CA automatically integrates with FreeIPA authentication, making certificate management much easier than maintaining a separate PKI.
You can view information about the certificate authority using:
ipa ca-show
Example output:
CA name: ipa
Subject DN: CN=Certificate Authority,O=EXAMPLE.COM
Status: enabled
The CA automatically signs certificates for hosts and services that are enrolled in the domain.
When a system joins the FreeIPA domain, a host principal is created and a certificate can be issued.
Example host principal:
host/server01.example.com
The host certificate is typically stored in:
/etc/ipa/ca.crt
And the system keytab:
/etc/krb5.keytab
These credentials allow the host to authenticate securely with FreeIPA services.
Certificates can be requested using the ipa cert-request command.
Example:
ipa cert-request server.csr
However, most of the time certificates are requested automatically using the certmonger service.
Certmonger handles:
Certmonger is a daemon that manages certificates on FreeIPA clients.
Check its status:
systemctl status certmonger
List tracked certificates:
getcert list
Example output:
Request ID '20190220123456':
status: MONITORING
stuck: no
key pair storage: type=FILE
certificate: type=FILE
issuer: CN=Certificate Authority,O=EXAMPLE.COM
Certmonger automatically renews certificates before they expire.
Kerberos does not only authenticate users. It also authenticates services. Services use service principals to identify themselves in the Kerberos realm.
Examples:
HTTP/webserver.example.com
cifs/fileserver.example.com
ldap/server.example.com
These principals allow services to participate in Kerberos authentication.
ipa service-add HTTP/webserver.example.com
ipa service-find HTTP
Example output:
Principal: HTTP/webserver.example.com@EXAMPLE.COM
Services authenticate using keytabs, which store encrypted Kerberos credentials.
Generate a keytab:
ipa-getkeytab
-s ipa.example.com
-p HTTP/webserver.example.com
-k /etc/httpd/http.keytab
This keytab allows the service to authenticate automatically.
Kerberos can enable single sign-on for web applications.
Example Apache configuration:
AuthType Kerberos
AuthName "Kerberos Login"
KrbAuthRealms EXAMPLE.COM
KrbServiceName HTTP
Krb5KeyTab /etc/httpd/http.keytab
Require valid-user
Users who already have Kerberos tickets can access the site without entering credentials again.
Many services require TLS encryption.
Example certificate request:
ipa cert-request
--principal=HTTP/webserver.example.com
server.csr
The CA will sign the certificate and return it.
List certificates:
ipa cert-find
Example output:
Serial number: 15
Subject: CN=webserver.example.com
Issuer: CN=Certificate Authority,O=EXAMPLE.COM
If a certificate is compromised, revoke it immediately.
ipa cert-revoke 15
You can verify revoked certificates with:
ipa cert-show 15
Revoked certificates appear in the Certificate Revocation List (CRL).
Certificates expire periodically. Certmonger automatically renews certificates before expiration. You can manually renew a certificate with:
ipa-getcert resubmit -i <request_id>
| Note: |
|---|
If the tomcat service is not working correctly, then certmonger might not automatically renew the service as expected. It is recommended that you correct this before the certificate expires. Otherwise, you will need to generate a new CSR and manually renew it yourself. This becomes increasingly difficult if a CA expires. |
Browsers and external systems will not trust the FreeIPA CA by default. This usually manifests with an error message saying “untrusted ca in chain” or “self-signed certificate in chain”. To fix this, you will need to export the CA from the IPA server and then import it into the CA store on every system and/or application that plans to access it.
From any host, export the CA certificate:
openssl s_client -connect ipa.example.com:443 -showcerts
< /dev/null > ipa_ca.crt
Import this certificate into:
Each browser maintains their keystore slightly differently. If you are binding a Java-based application to FreeIPA, then you will need to make sure you import it into the Java keystore on the host.
FreeIPA certificates work best for internal infrastructure, including:
For public internet services, you may still want to use certificates from a public CA such as Let’s Encrypt. FreeIPA “can” manage 3rd party certificates, but the process is non-trivial and outside the scope of this guide.
Expired certificates
getcert list
Certmonger not running
systemctl restart certmonger
Incorrect service principal
ipa service-find
Without centralized certificate management, administrators often struggle with:
FreeIPA solves these problems by combining:
All within a single platform.
In the next part of the FreeIPA Master Class, we will explore one of the most important topics for production deployments:
FreeIPA Replication and High Availability
We will cover:
Next: The FreeIPA Master Class - Part 7
The FreeIPA Master Class - Part 5
The FreeIPA Master Class - Part 4
The FreeIPA Master Class - Part 3
The FreeIPA Master Class - Part 2
There are no comments.