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 1859252 - [RFE] support pluggable data sources for subid ranges configurable via /etc/nsswitch.conf
Summary: [RFE] support pluggable data sources for subid ranges configurable via /etc/n...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: shadow-utils
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Alexey Tikhonov
QA Contact: Anuj Borah
Alexandra Nikandrova
URL:
Whiteboard: sync-to-jira
Depends On: 1989476 2019921
Blocks: 1186913
TreeView+ depends on / blocked
 
Reported: 2020-07-21 14:52 UTC by Phil Jasbutis
Modified: 2024-12-20 19:10 UTC (History)
32 users (show)

Fixed In Version: shadow-utils-4.8.1-9.el9
Doc Type: Enhancement
Doc Text:
.The support for managing subID ranges is available in the shadow-utils Previously, `shadow-utils` configured the subID ranges automatically from the `/etc/subuid` and `/etc/subgid` files. With this update, the configuration of subID ranges is available in the `/etc/nsswitch.conf` file by setting a value in the `subid` field. For more information, see `man subuid` and `man subgid`. Also, with this update, an SSSD implementation of the `shadow-utils` plugin is available, which provides the subID ranges from the IPA server. To use this functionality, add the `subid: sss` value to the `/etc/nsswitch.conf` file. This solution might be useful in the containerized environment to facilitate rootless containers. Note that in case the `/etc/nsswitch.conf` file is configured by the `authselect` tool, you must follow the procedures described in the `authselect` documentation. When it is not the case, you can modify the `/etc/nsswitch.conf` file manually.
Clone Of:
Environment:
Last Closed: 2021-12-07 21:20:54 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RedHatQE shadow-utils pull 1 0 None None None 2021-08-19 08:25:10 UTC

Description Phil Jasbutis 2020-07-21 14:52:48 UTC
1. Proposed title of this feature request

Rootless Containers as Easy as Pie : just work out-of-the-box


3. What is the nature and description of the request?

The customer has meanwhile investigated the technology for his application and is now thinking
about the obstacles that still have to be overcome for productive use.

For enterprise environments it is typical to have a centralized user management and
podman requires to manage subuid/subgid on file level of the host where a container should run.

So since we are talking about a decentralized approach the customer has to take the effort and 
taking care of a consistent user/group mapping all over his infrastructure.

In addition the customers environment delivers user home directories via NFS shares. This is quite
common in enterprise environments but not supported by podman atm.


4. Why does the customer need this? (List the business requirements here)

Customer wants to:

 - minimize the management effort for subuid/subgid management
 - simplify integration into the corporate environment
 - have a more stable solution while using the podman as it comes out-of-the-box for business environments


5. How would the customer like to achieve this? (List the functional requirements here)

- A novel concept/implementation for subuid/subgid which works automatic
   (that would allow a even a single user to run isolated workloads)

- A novel approach to container .vs fileystem-permissions, e.g. store subuid/subgid in ACLs
   and work on all filesystems which support ACLs

- or encapsulate the filesystem in a filesystem-image in a single file (which is owned by the user)

- perhaps this functionality might be implemented directly into the kernel.



6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

- Since this is a suggestion for improvement, for which it is currently not foreseeable how it might be implemented, no information can be given yet.


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

- not known yet


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

- no, asap


9. Is the sales team involved in this request and do they have any additional input?

- no


10. List any affected packages or components.

- podman


11. Would the customer be able to assist in testing this functionality if implemented?

- yes, customer is highly engaged and would support testing.

Comment 3 Daniel Walsh 2020-07-21 17:06:47 UTC
This is totally out of Podman's hands this request needs to be handled by shadow-utils/sssd we need
a way of getting this information in Podman and newuidmap/newgidmap.

We need Full discussion has been open for 1.5 years.

https://github.com/shadow-maint/shadow/issues/154

Comment 4 Alexey Tikhonov 2020-07-21 17:28:34 UTC
Upstream tickets:
 * shadow-utils: https://github.com/shadow-maint/shadow/issues/154
 * SSSD: https://github.com/SSSD/sssd/issues/5197
 * FreeIPA: https://pagure.io/freeipa/issue/8361

Comment 5 Gunther Mayer 2020-07-23 18:36:31 UTC
Hi,

I would even opt for a radically new handling of this issue in the Kernel itself:


1) Make "subuid/subgid" a primary citizen in the linux kernel
   - Each user can have the full range subuid 0...2^32-1, no need to allocate ranges and keep them disjunct
  
2) Make this a "secondary citizen" in the filesystem code (e.g. using xattr /acl) [primary citizen would be preferrable,
   but perhaps that needs very heavy changes]
   E.g. When accessing files, use both UID + SubUID for checking permissions.
   
2a) I do not know if extended attributes already are in NFS standards, e.g. see https://tools.ietf.org/html/rfc8276 from Dec. 2017)


Both items also have more implications and architecture/design/implementation choices which need to be well-thought.
This is just the high level idea.

Of course this is not in the hand of podman, but would require kernel changes (the same happened for namespaces).

Regards, Gunther

e.g. the kernel already has Real_UID, Saved_UID, Effective_UID, so why not another "SubUID" ?

Comment 6 Daniel Walsh 2020-07-24 09:51:07 UTC
Also realize that anytime you are playing with DAC (UIDs/GIDS) you are risking CVE Vulnerabilities. which means changes would take many YEARS to get implemeneted if ever.  So I would rather deal with this in user space.

Comment 15 Alexey Tikhonov 2021-04-23 11:29:39 UTC
https://github.com/shadow-maint/shadow/pull/321 was merged upstream


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