Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionAlexey Tikhonov
2022-09-21 15:52:47 UTC
SSSD provides a D-Bus interface with the following methods:
- FindByName(name)
- FindByID(id)
- ListByName(filter, limit)
- ListByDomainAndName(domain, filter, limit)
It would be nice to also have a method allowing to find users that have a given attribute value: ListByAttr(ifp_attribute_name, filter, limit)
For instance, if sssd is configured with:
```
[domain/...]
ldap_user_extra_attrs = sn:sn
[ifp]
user_attributes = +sn
```
then the method ListByAttr('sn', 'alice', 0) would return all the users who have the extra attribute sn = "alice" and the method ListByAttr('sn', 'al*', 0) would return all the users who have a substring match sn="al*".
When there are multiple domains defined in sssd.conf, all the domains should be searched (note that each domain may have a different mapping). If one of the domains doesn't define the mapping, it should be skipped.
Pushed relevant PR: https://github.com/SSSD/sssd/pull/6368
* `master`
* 3e5251bf22545ed13449e81fca64651d08f86ca4 - sssctl: Management of indexes on cache DBs.
(relevant to this BZ but doesn't resolve it)
Pushed PR: https://github.com/SSSD/sssd/pull/6386
* `master`
* c3453e4e82796c5ae578671f25568c74919cad13 - CACHE_REQ: Use a const struct in cache_req_data_create()
* 09895561a34592de1d58af211db1725388d86d5e - TESTS: New test for D-Bus' ListByName()
* 569dca5f24e2e92aa86c7a2800f772e29211fc31 - CACHE_REQ: Consider the domain when looking names in the cache
* a97962826efdf5c51fed7553e761a803c48f6675 - TESTS: Correct ListByAttr()'s test
* 8f7c35eae22aaa9649db1cf2d07d17d8c4b92e82 - CACHE_REQ: Do not return duplicated values.
* 719c92533c52aad091c8b58e7a82b9e3b88f8e62 - CACHE_REQ: Initialize domain with NULL
* 214540e72a6743e1112b35d562efc595594b1a82 - Cache: String has to be duplicated instead of copied
* `sssd-2-8`
* 0f670188c3f18a63515e10ff56f03a4cbe47a845 - CACHE_REQ: Use a const struct in cache_req_data_create()
* 7f583fad9d7604587ef1c0ff163dd9d7d337e9b2 - TESTS: New test for D-Bus' ListByName()
* 13e841de7b31c4e341a5293acb9302beacad6015 - CACHE_REQ: Consider the domain when looking names in the cache
* 82c69b7f601b92579c4ae0d34ea20df12cbedc11 - TESTS: Correct ListByAttr()'s test
* 1562df030c266811b653f032131dc89a9381d81e - CACHE_REQ: Do not return duplicated values.
* 1377bca9706179304577755b5b1e5c1dcbcd748f - CACHE_REQ: Initialize domain with NULL
* 129979a38c38940c841134011ab866ebcf3417c7 - Cache: String has to be duplicated instead of copied
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (sssd bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2514
SSSD provides a D-Bus interface with the following methods: - FindByName(name) - FindByID(id) - ListByName(filter, limit) - ListByDomainAndName(domain, filter, limit) It would be nice to also have a method allowing to find users that have a given attribute value: ListByAttr(ifp_attribute_name, filter, limit) For instance, if sssd is configured with: ``` [domain/...] ldap_user_extra_attrs = sn:sn [ifp] user_attributes = +sn ``` then the method ListByAttr('sn', 'alice', 0) would return all the users who have the extra attribute sn = "alice" and the method ListByAttr('sn', 'al*', 0) would return all the users who have a substring match sn="al*". When there are multiple domains defined in sssd.conf, all the domains should be searched (note that each domain may have a different mapping). If one of the domains doesn't define the mapping, it should be skipped.