Bug 726408 - sssd should have a mode to only return Usernames for My UID and My Groups.
Summary: sssd should have a mode to only return Usernames for My UID and My Groups.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: sssd
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-28 14:16 UTC by Daniel Walsh
Modified: 2020-05-02 16:27 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-20 14:14:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2090 0 None None None 2020-05-02 16:27:52 UTC

Description Daniel Walsh 2011-07-28 14:16:23 UTC
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.

Comment 1 Stephen Gallagher 2011-07-28 14:25:24 UTC
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).

Comment 2 Daniel Walsh 2011-07-28 16:45:45 UTC
Option 2 is fine as long as we realise that the most common use case is one user per id_provider.

Comment 3 Simo Sorce 2011-07-28 17:09:43 UTC
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.

Comment 4 Dmitri Pal 2011-10-20 12:43:25 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/1048

Comment 5 Daniel Walsh 2011-10-20 20:00:06 UTC
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.

Comment 6 Fedora End Of Life 2013-04-03 19:44:14 UTC
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

Comment 7 Fedora End Of Life 2015-01-09 21:51:36 UTC
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.

Comment 8 Jakub Hrozek 2015-01-10 13:39:29 UTC
This is going to be discussed during the next upstream development sprint.

Comment 9 Jan Kurik 2015-07-15 15:14:46 UTC
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

Comment 10 Stephen Gallagher 2016-07-20 14:14:58 UTC
Upstream has deferred implementing this solution in favor of other approaches.


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