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 1551077 - GDM failure loop when no user mapped for smart card
Summary: GDM failure loop when no user mapped for smart card
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-02 17:08 UTC by Scott Poore
Modified: 2020-09-29 19:49 UTC (History)
10 users (show)

Fixed In Version: sssd-1.16.5-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:49:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
user name hint failure screenshot (75.91 KB, image/png)
2018-03-02 17:11 UTC, Scott Poore
no flags Details
pin prompt failure screenshot (128.75 KB, image/png)
2018-03-02 17:11 UTC, Scott Poore
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5190 0 None closed GDM password prompt when cert mapped to multiple users and promptusername is False 2020-12-17 14:53:40 UTC
Red Hat Product Errata RHBA-2020:3904 0 None None None 2020-09-29 19:49:41 UTC

Description Scott Poore 2018-03-02 17:08:41 UTC
Description of problem:

When we have a smart card connected that contains certificates that are not mapped to a user, GDM login seems to fail with a repeated loop on either the PIN or User Hint Prompts:

"Sorry that didn't work.  Please try again."

This repeats in a loop.


Version-Release number of selected component (if applicable):
sssd-1.16.0-19.el7.x86_64


How reproducible:
Seems to be reproducible.

Steps to Reproduce:
1.  Setup IPA Env with Smart Card auth enabled.
2.  Add cert on card to user
3.  test
4.  remove certmapdata from user

Actual results:
failure loop


Expected results:
single failure and go back to normal login selection

Additional info:

Comment 3 Scott Poore 2018-03-02 17:11:28 UTC
Created attachment 1403106 [details]
user name hint failure screenshot

Comment 4 Scott Poore 2018-03-02 17:11:59 UTC
Created attachment 1403107 [details]
pin prompt failure screenshot

Comment 5 Scott Poore 2018-03-02 17:28:59 UTC
FYI, I think I'm seeing the same thing when the certificate is revoked.

In my case, the cert on the card was from IPA and I put a revoke hold on the cert in IPA.  I saw the same loop when that was done.

Comment 6 Jakub Hrozek 2019-03-07 21:38:03 UTC
I'm sorry, but we will not have the capacity to address this bug in 7.7, given that the work has not started and the devel freeze is in about three weeks. Therefore I'm moving the bug to 7.8.

Please push back if you think this bug is important to be fixed in 7.7.

Comment 9 Sumit Bose 2020-06-03 18:47:28 UTC
Upstream ticket:
https://github.com/SSSD/sssd/issues/5190

Comment 12 Pavel Březina 2020-06-05 09:09:52 UTC
* `master`
    * 3ed254765fc92e9cc9e4c35335818eaf1256e0d6 - pam_sss: special handling for gdm-smartcard
    * 26c794da31c215fef3e41429f6f13afdaf349bee - pam_sss: add SERVICE_IS_GDM_SMARTCARD
* `sssd-1-16`
    * 5b727ab156d4efc84e41b3306898102a8e572a05 - pam_sss: special handling for gdm-smartcard
    * 77e44c3a67f58b776a0f505bbdba9718f4e1d714 - pam_sss: add SERVICE_IS_GDM_SMARTCARD

Comment 13 Alexey Tikhonov 2020-06-05 16:35:17 UTC
* `sssd-1-16`
 * e7c7092d81fe63a41ca40ec3e2057d0bd17819ed
 * 89e94440048d1660dc9520c161597dd71c2ecb0c

Comment 16 Scott Poore 2020-06-15 12:49:37 UTC
Verified.

Version ::

sssd-1.16.5-10.el7.x86_64

Restuls ::

# First checking that authentication works.

[root@rhel7-4 gdm_failure_with_no_user_mapped]# p11tool --provider /usr/lib64/opensc-pkcs11.so --list-all-certs
Object 0:
	URL: pkcs11:model=PKCS%2315;manufacturer=Aventra%20Ltd.;serial=7055056447986431;token=sctest%20%28MyEID%29;id=%01;object=Certificate;type=cert
	Type: X.509 Certificate
	Label: Certificate
	ID: 01


[root@rhel7-4 gdm_failure_with_no_user_mapped]# p11tool --provider /usr/lib64/opensc-pkcs11.so --export 'pkcs11:model=PKCS%2315;manufacturer=Aventra%20Ltd.;serial=7055056447986431;token=sctest%20%28MyEID%29;id=%01;object=Certificate;type=cert' --outfile card.crt

[root@rhel7-4 gdm_failure_with_no_user_mapped]# ipa certmap-match card.crt
--------------
1 user matched
--------------
  Domain: EXAMPLE.COM
  User logins: ipauser1
----------------------------
Number of entries returned 1
----------------------------

[root@rhel7-4 gdm_failure_with_no_user_mapped]# su - ipauser1 -c 'su - ipauser1 -c whoami'
PIN for sctest (MyEID)
ipauser1

# Then clearing certificate from user so no user is mapped

[root@rhel7-4 gdm_failure_with_no_user_mapped]# ipa user-show ipauser1
  User login: ipauser1
  First name: ipauser1
  Last name: lastname
  Home directory: /home/ipauser1
  Login shell: /bin/sh
  Principal name: ipauser1
  Principal alias: ipauser1
  Email address: ipauser1
  UID: 603200101
  GID: 603200101
  Certificate: MIIEBjCCAu6gAwIBAgIBRDANBgkqhkiG9w0BAQsFADA2MRQwEgYDVQQKDAtFWEFNUExFLkNPTTEeMBwGA1U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MEGiYo+F8BY685a3SQORRk5bNaPJaPp2HjYpBc6FY7UmhWP9Eu29KmMpgDb51k2OVN64nO7WFU3iffG+LgRhIESH8KmBjNvrIrxWKVH6Ammf20ct7fmFvoF+gOnyDxMfFWdqXzA/6SXEVuxMFnPCq2IhNtfOv/sqVPzMgCO26N1hgRqoUxaNiP2e8uLB3+G5bWhtCu+ONpP7UlAkzWBX4yc=
  Account disabled: False
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True

[root@rhel7-4 gdm_failure_with_no_user_mapped]# ipa user-mod ipauser1 --certificate=''
------------------------
Modified user "ipauser1"
------------------------
  User login: ipauser1
  First name: ipauser1
  Last name: lastname
  Home directory: /home/ipauser1
  Login shell: /bin/sh
  Principal name: ipauser1
  Principal alias: ipauser1
  Email address: ipauser1
  UID: 603200101
  GID: 603200101
  Account disabled: False
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True

[root@rhel7-4 gdm_failure_with_no_user_mapped]# systemctl stop sssd; rm -rf /var/lib/sss/{db,mc}/*; systemctl start sssd

[root@rhel7-4 gdm_failure_with_no_user_mapped]# ipa certmap-match card.crt 
---------------
0 users matched
---------------
----------------------------
Number of entries returned 0
----------------------------



[root@rhel7-4 gdm_failure_with_no_user_mapped]# systemctl restart gdm

# Remove smartcard from reader here
# Then checking with GDM

After GDM comes back up, I see PIN prompt.  When I enter pin it says "Sorry, that didn't work.  Please try again." and returns to the PIN prompt as expected.  There is no more failure loop.

This is expected behavior with the fix.

Comment 19 errata-xmlrpc 2020-09-29 19:49:11 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 (sssd bug fix and enhancement update), 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/RHBA-2020:3904


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