Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1437070

Summary: Properly fall back to local Smartcard authentication
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Scott Poore <spoore>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: grajaiya, jhrozek, lslebodn, mkosek, mzidek, nsoman, pbrezina, sbose, sgoveas, spoore, tscherf
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:04:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2017-03-29 13:07:23 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/SSSD/sssd/issue/3343

If there is no PKINIT configured for the user but other authentication methods SSSD does not fall back to local Smartcard authentication if Smartcard credentials are used.

Comment 2 Jakub Hrozek 2017-03-29 13:08:54 UTC
* master: 1c551b1373799643f3e9ba4f696d21b8fc57dafd

Comment 5 Scott Poore 2017-05-26 16:04:37 UTC
How can we verify this functionality with IPA?

Is there a way to test this for just one user or is it something that has to be configured per host/client?

Comment 6 Sumit Bose 2017-05-26 16:57:23 UTC
The easiest way to test is to remove the 'krb5-pkinit' package on the client.

If the package is installed an IPA in configured correctly you user should be able to login  with the Smartcard and get a Kerberos ticket. If the package is removed the user should still be able to login with the Smartcard but no Kerberos ticket is available.

Comment 7 Scott Poore 2017-05-26 18:24:44 UTC
Verified.

Version ::

sssd-1.15.2-33.el7.x86_64

Results ::

# First confirming Smart Card login with pkinit works:

[root@dhcp129-184 ~]# su - scuser107 -c 'klist'
klist: Credentials cache keyring 'persistent:576400135:krb_ccache_qCtm0uE' not found


[root@dhcp129-184 ~]# su - demosc1 -c "su - scuser107 -c klist"
PIN for demosc1 (OpenSC Card) for user scuser107
Ticket cache: KEYRING:persistent:576400135:krb_ccache_tJL6bpe
Default principal: scuser107

Valid starting       Expires              Service principal
05/26/2017 12:21:40  05/27/2017 12:21:38  krbtgt/TESTRELM.TEST


[root@dhcp129-184 ~]# su - scuser107 -c 'kdestroy -A'


[root@dhcp129-184 ~]# su - scuser107 -c 'klist'
klist: Credentials cache keyring 'persistent:576400135:krb_ccache_tJL6bpe' not found


# Now removing krb5-pkinit to test failover:

[root@dhcp129-184 ~]# yum remove krb5-pkinit
...
Removed:
  krb5-pkinit.x86_64 0:1.15.1-8.el7                                                                    

Complete!


# Finally.  Testing failover:

[root@dhcp129-184 ~]# su - scuser107 -c 'klist'
klist: Credentials cache keyring 'persistent:576400135:krb_ccache_tJL6bpe' not found


[root@dhcp129-184 ~]# su - demosc1 -c "su - scuser107 -c klist"
PIN for demosc1 (OpenSC Card) for user scuser107
klist: Credentials cache keyring 'persistent:576400135:krb_ccache_tJL6bpe' not found


So, Smart Card authentication worked, and did not get kerberos ticket.

Comment 8 errata-xmlrpc 2017-08-01 09:04:18 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