The "ipa certmap-match" command is a debug tool to test if a certificate matches a certmap rule. It returns a list of users that maps the certificate. In FreeIPA 4.9.10 and earlier the tool does not work for host entries.
While this feature is not strictly necessary for us, it is a very useful debug tool. There is no other easy way to investigate issues with cert mappings or host entries. kinit with PKINIT can be used, however there is a gotcha: The KDC caches certmap rules for 5 minutes. Any change to a rule requires a restart of the KDC or 5 minutes of waiting.
ipa certmap-match cert.pem
The certmap-match command returns 0 matches.
certmap-match
The certmap-match returns the matching host entry
freeipa-server-4.9.10-4.fc36.x86_64
See https://bugzilla.redhat.com/show_bug.cgi?id=2075452 for a use case for PKINIT with host certs.
Alexander, Sumit, and I discussed the issue internally. The fix may require a new API in SSSD. The certmap-match command uses SSSD D-Bus API /org/freedesktop/sssd/infopipe/Users to match certs to users. AFAIK there is no general API that matches hosts or service accounts.
/org/freedesktop/sssd/infopipe/Users
SSSD ticket is https://github.com/SSSD/sssd/issues/6423
Metadata Update from @ftrivino: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=2075452