[freeipa PR#2598][opened] Fix ipa user-find --certificate
by flo-renaud
URL: https://github.com/freeipa/freeipa/pull/2598
Author: flo-renaud
Title: #2598: Fix ipa user-find --certificate
Action: opened
PR body:
"""
## ipaldap.py: fix method creating a ldap filter for IPACertificate
`ipa user-find --certificate` and `ipa host-find --certificate` fail to return matching entries, because the method transforming the attribute into a LDAP filter does not properly handle IPACertificate objects.
Directory Server logs show a filter with `(usercertificate=ipalib.x509.IPACertificate object at 0x7fc0a5575b90>)`
When the attribute contains a IPACertificate, the method needs to extract the public bytes instead of calling str(value).
Fixes https://pagure.io/freeipa/issue/7770
## ipatests: add xmlrpc test for user|host-find --certificate
There were no xmlrpc tests for `ipa user-find --certificate` or `ipa host-find --certificate`. The commit adds tests for these commands.
Related to https://pagure.io/freeipa/issue/7770
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2598/head:pr2598
git checkout pr2598
5 years, 4 months