Skip to main content
User guide

Certificate mapping

Requires the ca module. How a client certificate or smart card is matched to a user, the matching and mapping rule syntax, priority, the global Prompt for username switch, and checking a rule on the match page.

This page covers the Certificate mapping pages under Authentication. It requires the ca module. On a certificate login (smart card, PKINIT, the console's Log in with certificate) sssd holds a certificate and has to resolve it to a user. There are three ways: the whole certificate is stored on the user (exact match); the user's ipacertmapdata holds its issuer and subject; or a certificate mapping rule turns certificate fields into an LDAP query.

Certificate identity mapping rules

Rule

Rule

FieldMeaning
Matching ruleWhich certificates the rule applies to. <ISSUER>CN=Certificate Authority,O=LINUX.IPA.TEST matches IPA CA issued ones; <SUBJECT>.*,DC=ad,DC=example,DC=com matches an AD CA. Empty means all
Mapping ruleHow to look up the user on a match. Placeholders include {subject_dn}, {issuer_dn}, {subject_rfc822_name} (e-mail SAN) and {subject_principal} (UPN SAN); conversions such as !nss_x500 put the DN in LDAP order
Domain nameWhere to look. Empty means this domain; an AD domain name searches AD, for smart-card logins of AD users
PriorityLower number tried first. The first rule that matches and finds a user ends the search
EnabledDisabled rules are skipped

Common mappings:

CaseMapping rule
Certificate stored in the user's ipacertmapdata(ipacertmapdata=X509:<I>{issuer_dn!nss_x500}<S>{subject_dn!nss_x500})
Subject CN is the login(uid={subject_cn})
E-mail SAN matches the user's mail(mail={subject_rfc822_name})
AD smart card, UPN matches the AD user(userPrincipalName={subject_principal}) with the AD domain, or (altSecurityIdentities=X509:<I>{issuer_dn!ad_x500}<S>{subject_dn!ad_x500})

A mapping query returning more than one user counts as a failure and the login is refused.

Global configuration

Global configuration

With Prompt for username ticked, a certificate login also asks for the login name and the mapping result must agree with it. Unticked, the certificate alone decides. Tick it when several certificates belong to one person or a mapping could be ambiguous.

Checking a rule

Certificate identity mapping match

The Certificate Identity Mapping Match page takes a PEM certificate, decodes issuer, subject, serial, validity and fingerprint on the right, and Match lists the users the current rules resolve to. It is the same as ipa certmap-match cert.pem. Verify a rule here before relying on it.

Boundaries

TopicNotes
Client propagationRun sss_cache -E after a rule change. sssd fetches rules on every certificate login, but user lookups are cached
AD usersMatching AD users needs the ad-trust module and an established trust
Certificate validityChain and revocation are decided by the client's sssd certificate_verification, not by the rules

On this page