#3193 [RFE] Support aliases in the memory cache
Closed: wontfix 4 years ago by pbrezina. Opened 7 years ago by sbose.

Name based NSS lookup will consult the memory cache before connecting to SSSD. The can be seen by looking for the connect() call with strace:

[root@sssd-devel ~]# systemctl stop sssd.service ; rm -f /var/lib/sss/db/* ; rm -f /var/log/sssd/* ; systemctl start sssd 
[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@ChIlD.ad.devel
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_LOCAL, sun_path="/var/lib/sss/pipes/nss"}, 110) = 0
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++
[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@ChIlD.ad.devel
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++

In this first run SSSD is connected via /var/lib/sss/pipes/nss while the second run gets the data from the memory cache without connecting to SSSD.

Currently the entry in the memory cache can be found by the name which is returned by getpwnam() (this first component in the getent passwd output). It has to be exactly this name otherwise the name will not be found. E.g. if the backend is case-insensitive like e.g. AD requests which differ in case always have to connect to SSSD:

[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@child.ad.devel                                                                                                                                                                    
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_LOCAL, sun_path="/var/lib/sss/pipes/nss"}, 110) = 0
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++
[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@child.ad.devel
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_LOCAL, sun_path="/var/lib/sss/pipes/nss"}, 110) = 0
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++

Additionally lookups by UPNs, email address or aliases cannnot use the memory cache either:

[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@alt.alt
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_LOCAL, sun_path="/var/lib/sss/pipes/nss"}, 110) = 0
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++
[root@sssd-devel ~]# strace -e connect -f getent passwd cu1@alt.alt
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_LOCAL, sun_path="/var/lib/sss/pipes/nss"}, 110) = 0
cu1@ChIlD.ad.devel:*:1296801104:1296800513:c u:/home/ChIlD.ad.devel/cu1:/bin/bash
+++ exited with 0 +++

Lukas had an idea how to solve the case sensitivity issue with memcache, but it would be good to wait with the implementation until we have PAM wrapper, because there are some special operations with memcache that we do during user authentication and it would be good to cover it with upstream tests when we do significant changes to memcache.

pam_wrapper patches are on the list, they "just" need some fixing and more review. But since we already plan on looking at the memory cache code in 1.16 to implement by-SID cache, I think it makes sense to file this ticket into the same milestone.

milestone: NEEDS_TRIAGE => SSSD 1.16

Fields changed

rhbz: => todo

Fields changed

milestone: SSSD 1.16 => SSSD Future releases (no date set yet)

Metadata Update from @sbose:
- Issue set to the milestone: SSSD Future releases (no date set yet)

7 years ago

Metadata Update from @thalman:
- Custom field design_review reset (from 0)
- Custom field mark reset (from 0)
- Custom field patch reset (from 0)
- Custom field review reset (from 0)
- Custom field sensitive reset (from 0)
- Custom field testsupdated reset (from 0)
- Issue close_status updated to: None
- Issue tagged with: Canditate to close

4 years ago

Thank you for taking time to submit this request for SSSD. Unfortunately this issue was not given priority and the team lacks the capacity to work on it at this time.

Given that we are unable to fulfill this request I am closing the issue as wontfix.

If the issue still persist on recent SSSD you can request re-consideration of this decision by reopening this issue. Please provide additional technical details about its importance to you.

Thank you for understanding.

Metadata Update from @pbrezina:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

4 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4226

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata