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 1455254 - Make domain available as user attribute
Summary: Make domain available as user attribute
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Březina
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-24 14:47 UTC by Jan Pazdziora
Modified: 2020-05-02 18:07 UTC (History)
13 users (show)

Fixed In Version: sssd-1.15.2-47.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:06:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 3755 0 None closed Add SSSD domain as property to user on D-Bus 2021-01-12 09:41:32 UTC
Red Hat Product Errata RHEA-2017:2294 0 normal SHIPPED_LIVE sssd bug fix and enhancement update 2017-08-01 12:39:55 UTC

Description Jan Pazdziora 2017-05-24 14:47:27 UTC
Description of problem:

When integrating with Web applications that run for example PAM authentication, SSSD will find the user in one of the domains but we don't have a way to get the domain information during PAM authentication and thus to normalize the identity of the user (what was entered by the user in the logon form -> what SSSD actually authenticated). The issue is tracked in

   https://pagure.io/SSSD/sssd/issue/2476
   https://pagure.io/SSSD/sssd/issue/2589

To provide some mechanism for addressing the issue, and to also support non-authentication use cases, here's a new requirement to make the domain name of the user identity available and retrievable as an attribute over the ifp D-Bus call GetUserAttr.

That would allow us to just configure mod_lookup_identity to return the domain name among other attributes, and let the Web application do the normalization.

Please note that one of the use cases is to support migration of existing application databases with user identities retrieved from AD LDAPs (by application) to setups with SSSD and machine being joined to AD domain.

At the same time, non-POSIX identities also have to be supported.

Version-Release number of selected component (if applicable):

sssd-1.15.2-35.el7

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have Web application configured with mod_authnz_pam and mod_lookup_identity, with SSSD configured against two domains "domain1.com" and "domain2.com", with two LDAP servers where each server will have user "bob".
2. Authenticate as "bob" via PAM.
3. Try to figure out SSSD and Apache configuration which will allow the application to decide if the user that logged in is "bob" or "bob".

Actual results:

It's currently not possible.

Expected results:

It should be possible.

Additional info:

Comment 3 Jan Pazdziora 2017-05-24 14:53:49 UTC
Alternatively the attribute might be the canonical name of the user, something like "bob", not just the domain.

Comment 27 Jakub Hrozek 2017-06-13 08:13:15 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/2714

Comment 28 Jakub Hrozek 2017-06-13 08:16:17 UTC
* master: 37d2194cc9ea4d0254c88a3419e2376572562bab

Comment 31 Kaleem 2017-06-19 09:37:14 UTC
Verified.


sssd version:
=============

[root@dhcp207-177 ~]# rpm -q sssd
sssd-1.15.2-47.el7.x86_64
[root@dhcp207-177 ~]#

Verification Steps :
====================

[root@dhcp207-177 ~]# dbus-send --system --print-reply  --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe/Users org.freedesktop.sssd.infopipe.Users.FindByName string:"admin"
method return sender=:1.101 -> dest=:1.130 reply_serial=2
   object path "/org/freedesktop/sssd/infopipe/Users/testrelm_2etest/779400000"
[root@dhcp207-177 ~]# 

[root@dhcp207-177 ~]# dbus-send --system --print-reply --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe/Users/testrelm_2etest/779400000 org.freedesktop.DBus.Properties.Get string:"org.freedesktop.sssd.infopipe.Users.User" string:"domain"
method return sender=:1.101 -> dest=:1.131 reply_serial=2
   variant       object path "/org/freedesktop/sssd/infopipe/Domains/testrelm_2etest"
[root@dhcp207-177 ~]# 


[root@dhcp207-177 ~]# dbus-send --system --print-reply --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe/Users/testrelm_2etest/779400000 org.freedesktop.DBus.Properties.Get string:"org.freedesktop.sssd.infopipe.Users.User" string:"domainname"
method return sender=:1.101 -> dest=:1.132 reply_serial=2
   variant       string "testrelm.test"
[root@dhcp207-177 ~]#


[root@dhcp207-177 ~]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:"admin" array:string:domainname
method return sender=:1.101 -> dest=:1.133 reply_serial=2
   array [
      dict entry(
         string "domainname"
         variant             array [
               string "testrelm.test"
            ]
      )
   ]
[root@dhcp207-177 ~]#

Comment 32 errata-xmlrpc 2017-08-01 09:06:23 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, 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/RHEA-2017:2294


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