Chapter 12. Configuring certificate mapping for users whose AD user entry contains the whole certificate
You can enable certificate mapping in IdM if the IdM deployment is in a trust with Active Directory (AD), the user is stored in AD and the user entry in AD contains the whole certificate.
12.1. Prerequisites Copy linkLink copied to clipboard!
- The user does not have an account in IdM.
- The user has an account in AD which contains a certificate.
- The IdM administrator has access to data on which the IdM certificate mapping rule can be based.
To ensure PKINIT works for a user, one of the following conditions must apply:
- The certificate in the user entry includes the user principal name or the SID extension for the user.
-
The user entry in AD has a suitable entry in the
altSecurityIdentitiesattribute.
12.2. Adding a certificate mapping rule in the IdM web UI for users whose AD entry contains the whole certificate Copy linkLink copied to clipboard!
The IdM Web UI allows administrators to create rules that match the binary blob of a presented certificate against the userCertificate attribute in AD. This ensures the user possesses the exact credential stored in the directory.
Procedure
- Log into the IdM web UI as an administrator.
-
Navigate to
AuthenticationCertificate Identity Mapping RulesCertificate Identity Mapping Rules. Click
Add.Adding a new certificate mapping rule in the IdM web UI image::new-certmaprule-add.png[Screenshot of the IdM Web UI displaying the "Certificate Identity Mapping Rules" sub-page from the Authentication tab. The "Add" button to the right is highlighted.]
- Enter the rule name.
Enter the mapping rule. To have the whole certificate that is presented to IdM for authentication compared to what is available in AD:
(userCertificate;binary={cert!bin})(userCertificate;binary={cert!bin})Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf mapping using the full certificate, if you renew the certificate, you must ensure that you add the new certificate to the AD user object.
Enter the matching rule. For example, to only allow certificates issued by the
AD-ROOT-CAof theAD.EXAMPLE.COMdomain to authenticate:<ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=com
<ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=comCopy to Clipboard Copied! Toggle word wrap Toggle overflow Certificate mapping rule for a user with a certificate stored in AD image::certmaprule-add-details-ad-cert.png[Screenshot of the "Add Certificate Identity Mapping Rule" pop-up window with the following fields filled in: Rule name (which is required) - Mapping rule - Matching rule. The Priority field is blank and there is also an "Add" button next to the "Domain name" label.]
-
Click
Add. The System Security Services Daemon (SSSD) periodically re-reads the certificate mapping rules. To force the newly-created rule to be loaded immediately, restart SSSD in the CLI::
systemctl restart sssd
# systemctl restart sssdCopy to Clipboard Copied! Toggle word wrap Toggle overflow
12.3. Adding a certificate mapping rule in the IdM CLI for users whose AD entry contains the whole certificate Copy linkLink copied to clipboard!
Use the IdM CLI to define mapping rules that enforce a strict binary match. The ipa certmaprule-add command links the presented certificate to the userCertificate attribute in AD, validating the user’s identity.
Procedure
Obtain the administrator’s credentials:
kinit admin
# kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the mapping rule and the matching rule the mapping rule is based on. To have the whole certificate that is presented for authentication compared to what is available in AD, only allowing certificates issued by the
AD-ROOT-CAof theAD.EXAMPLE.COMdomain to authenticate:ipa certmaprule-add simpleADrule --matchrule '<ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=com' --maprule '(userCertificate;binary={cert!bin})' --domain ad.example.com# ipa certmaprule-add simpleADrule --matchrule '<ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=com' --maprule '(userCertificate;binary={cert!bin})' --domain ad.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf mapping using the full certificate, if you renew the certificate, you must ensure that you add the new certificate to the AD user object.
The System Security Services Daemon (SSSD) periodically re-reads the certificate mapping rules. To force the newly-created rule to be loaded immediately, restart SSSD:
systemctl restart sssd
# systemctl restart sssdCopy to Clipboard Copied! Toggle word wrap Toggle overflow