Description of problem: As we move to multi-tenant environments we might want to start preventing full read access to the /etc/passwd machine, or the ability to dump all users in the passwd database. I would like to be able to use SELinux to lock down access to the /etc/passwd file, so users could not cat the file. And even prevent most apps on the machine from reading the file. Then have sssd become the arbiter of who gets translations. I would suggest that we add a flag the the sssd configuration that would say, translate only the names that the requesting UID is a member of. Meaning that dwalsh could translate the UID of dwalsh, and all users in the Engineering group. But other UID, would not resolve. If I am user "Coke" and I execute getpwnam("Pepsi"), I would want this to return no such user. If I saw a process on the machine that was running as uid 1234 and I was not 1234 and 1234 was not in any of mygroups I would want sssd to not translate the UID. The biggest use case for this I would see is multitenant environments where an admin does not want users on the system to know anything about the other users on the system. (OpenShift Express) for example. But also large terminal servers would like to run in this mode.
There are two potential ways that SSSD could be made to do this: 1) As Dan suggests, we could have SSSD return only information about the user and the groups that user is a member of. 2) Alternately, we could implement functionality that would allow us to maintain multiple id_provider = local domains (with different UID ranges) that would restrict ID lookups to that domain. In other words, User 'cokeemployee' in domain "Coke" would be able to see 'cokeintern' and 'cokeceo' users, but not the 'pepsiemployee' and 'pepsiceo' users in the "Pepsi" domain. The latter is probably more work, but it would also provide the framework for some other functionality that we've discussed in the past (being able to have SSSD authenticate users of a web app without exposing local login accounts).
Option 2 is fine as long as we realise that the most common use case is one user per id_provider.
I have to say that option 2 is fine only as long as: a) users are only added locally to the system this sounds backwards in an era where people want to consolidate user management in directories b) you have very few domains as soon as you have more than a handful managing multiple domain starts becoming a heavy burden for admins, IMHO. Also you still need to return all users for root level services, and that many domains could cause serious performance issues.
Upstream ticket: https://fedorahosted.org/sssd/ticket/1048
In Rawhide I have added a label passwd_file_t for /etc/passwd and /etc/group and a few others. I am now disallowing containers from reading these files. And so far everything seems to be working.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This is going to be discussed during the next upstream development sprint.
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
Upstream has deferred implementing this solution in favor of other approaches.