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.
Bug 1766490 - Use negative cache better and domain checks for lookup by SIDs
Summary: Use negative cache better and domain checks for lookup by SIDs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: sssd
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Halman
QA Contact: shridhar
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-29 09:22 UTC by Sumit Bose
Modified: 2023-05-09 10:28 UTC (History)
12 users (show)

Fixed In Version: sssd-2.8.1-1.el9
Doc Type: Enhancement
Doc Text:
.Enhance negative cache usage This update improves the SSSD performance for lookups by Security Identifier (SID). It now stores non-existing SIDs in the negative cache for individual domains and requests the domain that the SID belongs to.
Clone Of:
Environment:
Last Closed: 2023-05-09 08:19:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:
anikandr: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 6352 0 None open Use negative cache better and domain checks for lookup by SIDs 2022-09-20 13:41:32 UTC
Github SSSD sssd pull 6353 0 None open Use negative cache better and domain checks for lookup by SIDs 2022-09-21 15:13:03 UTC
Red Hat Issue Tracker SSSD-1998 0 None None None 2022-06-18 03:12:49 UTC
Red Hat Product Errata RHBA-2023:2514 0 None None None 2023-05-09 08:20:14 UTC

Description Sumit Bose 2019-10-29 09:22:39 UTC
Description of problem:

Although the negative cache is checked while processing requests by SIDs it is still not used properly because only a global add function is set in src/responder/common/cache_req/plugins/cache_req_object_by_sid.c but not the add function for individual domains. So if a SID does not exists at all it is added to the negative cache but during a multi-domain search a SID which does not exists in an individual domain is not added to the negative cache of the individual domain.

...
    .global_ncache_add_fn = cache_req_object_by_sid_global_ncache_add,
    .ncache_check_fn = cache_req_object_by_sid_ncache_check,
    .ncache_add_fn = NULL,
    .ncache_filter_fn = NULL,
    .lookup_fn = cache_req_object_by_sid_lookup,
    .dp_send_fn = cache_req_object_by_sid_dp_send,
    .dp_recv_fn = cache_req_common_dp_recv,
    .dp_get_domain_check_fn = NULL,
    .dp_get_domain_send_fn = NULL,
    .dp_get_domain_recv_fn = NULL,
};
...

Additionally, since we already have the *get_domain* check mechanism to go straight to the right domain this should be used for requests by SID as well so that a multi-domain search would only be used as the fallback case.

Comment 4 Alexey Tikhonov 2022-09-21 15:13:03 UTC
Upstream PR: https://github.com/SSSD/sssd/pull/6353

Comment 5 Alexey Tikhonov 2022-10-05 14:26:03 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6353

* `master`
    * 5ea1ed27f55508958b21e46a01464f6a3aed11ad - CACHE: implement *get_domain* for SID lookup
    * 70d5460b0d021e14a84371d367edb67262559713 - CACHE: implement ncache_add_fn for ncache SID

Comment 15 errata-xmlrpc 2023-05-09 08:19:50 UTC
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


Note You need to log in before you can comment on or make changes to this bug.