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 1638295 - sssctl user-checks does not show custom IFP user_attributes
Summary: sssctl user-checks does not show custom IFP user_attributes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: pre-dev-freeze
: 8.1
Assignee: Tomas Halman
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On: 1682305
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-11 09:42 UTC by Ondrej
Modified: 2020-05-02 19:01 UTC (History)
10 users (show)

Fixed In Version: sssd-2.1.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:33:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4856 0 None closed sssctl user-checks does not show custom IFP user_attributes 2020-06-03 08:49:41 UTC
Red Hat Product Errata RHSA-2019:3651 0 None None None 2019-11-05 22:34:08 UTC

Description Ondrej 2018-10-11 09:42:01 UTC
Description of problem:

"sssctl user-checks" also query the IFP interface of sssd. The problem is, that this command only displays POSIX user attrs, no matter if we configured the InfoPipe for additional user attributes.

for example, if I have the following configuration snippet:
[ifp]
    	debug_level = 9
	allowed_uids = ondrejv, root
	user_attributes = +mail, +telephoneNumber, +givenname, +sn

I would expect the "sssctl user-checks" command will
- also return the value of "mail, telephoneNumber, givenname, sn" attributes
- ideally, we could make the "sssctl user-checks" also available for non-root users (ondrejv in the example above), but I guess I am asking too much :-)

I know I could get the results with dbus-send or the Python dbus module, but parsing the output of sssctl is better parseable for a simple bash script.

Comment 2 Jakub Hrozek 2018-10-12 07:22:30 UTC
Initial triage notes:
 - the IFP interface seems to publish the list of the extra attributes, so the sssctl tool might read them this way and display the attributes. This should be doable for both 1.16 and 2.0

 - using non-root is a separate issue though. While we /should/ make it possible for every user to display info about 'self', this would probably mean we need to finish the polkit integration. It is also not very likely that this work will be backportable to 1.16 as only the D-Bus changes Pavel did in 2.0 allow us for the right level of granularity.

Comment 3 Jakub Hrozek 2018-10-25 11:39:42 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/3866

Comment 4 Jakub Hrozek 2019-02-05 21:17:28 UTC
* master: ee9fdb08f73571683b272f06b6ea25630a2dbe01

Comment 7 Madhuri 2019-09-10 07:00:05 UTC
Verified with:
# rpm -qa sssd
sssd-2.2.0-18.el8.x86_64

Verifications steps:
1) Setup sssd client
2) Update sssd.conf 

# cat /etc/sssd/sssd.conf 
[sssd]
config_file_version = 2
services = nss, pam
domains = example1

[domain/example1]
debug_level = 9
use_fully_qualified_names = True
ldap_user_home_directory = /home/%u
ldap_uri = ldaps://ipaqavmh.idmqe.lab.eng.bos.redhat.com
ldap_search_base = dc=example,dc=test
id_provider = ldap
auth_provider = ldap
ldap_tls_cacert = /etc/openldap/cacerts/cacert.pem

[ifp]
debug_level = 9
allowed_uids = root, foo1@example1
user_attributes = +mail, +telephoneNumber, +givenname, +sn

Case 1:

Test with allowed_uids = root and foo1@example1

[ifp]
debug_level = 9
allowed_uids = root, madhuri
user_attributes = +mail, +telephoneNumber, +givenname, +sn


[root@vm-idm-018 ~]# sssctl user-checks foo1@example1
user: foo1@example1
action: acct
service: system-auth

SSSD nss user lookup result:
 - user name: foo1@example1
 - user id: 14583101
 - group id: 14564100
 - gecos: foo1 User
 - home directory: 
 - shell: /bin/bash

SSSD InfoPipe user lookup result:
 - name: foo1@example1
 - uidNumber: 14583101
 - gidNumber: 14564100
 - gecos: foo1 User
 - homeDirectory: not set
 - loginShell: /bin/bash
 - mail: foo1

testing pam_acct_mgmt

pam_acct_mgmt: Success

PAM Environment:
 - no env -

case 2:

Test with allowed_uids = 0 and ldapuser's uid


[ifp]
debug_level = 9
allowed_uids = 0, 14583101
user_attributes = +mail, +telephoneNumber, +givenname, +sn


# sssctl user-checks foo1@example1
user: foo1@example1
action: acct
service: system-auth

SSSD nss user lookup result:
 - user name: foo1@example1
 - user id: 14583101
 - group id: 14564100
 - gecos: foo1 User
 - home directory: 
 - shell: /bin/bash

SSSD InfoPipe user lookup result:
 - name: foo1@example1
 - uidNumber: 14583101
 - gidNumber: 14564100
 - gecos: foo1 User
 - homeDirectory: not set
 - loginShell: /bin/bash
 - mail: foo1

testing pam_acct_mgmt

pam_acct_mgmt: Success

PAM Environment:
 - no env -

case 3:

Test with allowed_uids = root and localuser

[ifp]
debug_level = 9
allowed_uids = root, madhuri
user_attributes = +mail, +telephoneNumber, +givenname, +sn


[root@vm-idm-018 ~]# sssctl user-checks madhuri
user: madhuri
action: acct
service: system-auth

SSSD nss user lookup result:
 - user name: madhuri
 - user id: 1001
 - group id: 1001
 - gecos: 
 - home directory: /home/madhuri
 - shell: /bin/bash

SSSD InfoPipe user lookup result:
 - name: madhuri
 - uidNumber: 1001
 - gidNumber: 1001
 - gecos: not set
 - homeDirectory: /home/madhuri
 - loginShell: /bin/bash

testing pam_acct_mgmt

pam_acct_mgmt: Success

PAM Environment:
 - no env -

case 4:

Test with allowed_uids = 0 and localuser's uid

[ifp]
debug_level = 9
allowed_uids = 0, 1001
user_attributes = +mail, +telephoneNumber, +givenname, +sn

[root@vm-idm-018 ~]# sssctl user-checks madhuri
user: madhuri
action: acct
service: system-auth

SSSD nss user lookup result:
 - user name: madhuri
 - user id: 1001
 - group id: 1001
 - gecos: 
 - home directory: /home/madhuri
 - shell: /bin/bash

SSSD InfoPipe user lookup result:
 - name: madhuri
 - uidNumber: 1001
 - gidNumber: 1001
 - gecos: not set
 - homeDirectory: /home/madhuri
 - loginShell: /bin/bash

testing pam_acct_mgmt

pam_acct_mgmt: Success

PAM Environment:
 - no env -

Comment 8 Madhuri 2019-09-10 12:38:01 UTC
By mistake I copied wrong sssd.conf

Here is correct sssd.conf

[root@vm-idm-018 ~]# cat /etc/sssd/sssd.conf 
[sssd]
config_file_version = 2
services = nss, pam, ifp
domains = example1

[domain/example1]
debug_level = 9
use_fully_qualified_names = True
ldap_user_home_directory = /home/%u
ldap_uri = ldaps://ipaqavmh.idmqe.lab.eng.bos.redhat.com
ldap_search_base = dc=example,dc=test
id_provider = ldap
auth_provider = ldap
ldap_tls_cacert = /etc/openldap/cacerts/cacert.pem

[ifp]
debug_level = 9
allowed_uids = 0, 1001
user_attributes = +mail, +telephoneNumber, +givenname, +sn

Comment 10 errata-xmlrpc 2019-11-05 22:33:53 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/RHSA-2019:3651


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