Description of problem:
Screen locks and smart card is removed must show a message to insert the correct smartcard
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2. sssd.conf should have the following
pam_cert_auth = True
3. add ipa user and add the signing cert on the smartcard to the ipa user
4. gdm login using smartcard pin
5. Smartcard is removed from the reader
6. Screen locks due to inactivity or manually
Locked screen prompts for ipa user password.
Locked screen should show a message to insert the correct smartcard and when inserted it should prompt for the smartcard pin
Please note that SSSD can only go so far as to support the Smartcard support of gdm. Since SSSD does not track the user session it cannot know which authentication method was used at login but gdm can. Afaik there is currently no gdm option to require that the screen-saver will use the same authentication method as used at the login prompt. But the functionality can roughly be achieved by disabling all authentication methods except Smartcard authentication in the gdm configuration.
This ticket will track the SSSD support of the gdm Smartcard feature.
Could you provide with the testing instructions?
When I am testing this bug using pkcs15 cards, I do not have pam_pkcs11 installed because of https://bugzilla.redhat.com/show_bug.cgi?id=1367919. So I see the following
[root@dhcp129-88 ~]# authconfig --enablesmartcard --smartcardmodule=no_module --update
authconfig: Authentication module /lib64/security/pam_pkcs11.so is missing. Authentication process might not work correctly.
I also do not see a prompt to insert the smartcard in the gdm login screen, it is still prompting for ipa user password.
Please ignore the instructions from comment #7, calling authconfig with the smartcard options has too may unwanted side effects. It is easier to only set the gdm relates options directly. Nevertheless the change to smartcard-auth must be done as well.
Please comment out the line containing pam_pkcs11 in /etc/pam.d/smartcard-auth and add
auth sufficient pam_sss.so allow_missing_name
to the auth section in /etc/pam.d/smartcard-auth directly before or after the commented out pam_pkcs11 line.
Then check /etc/dconf/db/distro.d/10-authconfig, there should be no line like "enable-smartcard-authentication=false" in the [org/gnome/login-screen]. If there is one please remove it and remove /org/gnome/login-screen/enable-smartcard-authentication from /etc/dconf/db/distro.d/locks/10-authconfig-locks as well. After that the files might look like:
If you want to enable screen-locking if the Smartcard is removed the files should look like:
After changing the files below /etc/dconf please call
and restart gdm.
[root@dhcp129-34 ~]# rpm -qi sssd
Name : sssd
Version : 1.14.0
Release : 43.el7
Install Date: Fri 23 Sep 2016 10:04:00 AM EDT
Group : Applications/System
Size : 35147
License : GPLv3+
Signature : RSA/SHA256, Wed 21 Sep 2016 03:10:55 AM EDT, Key ID 938a80caf21541eb
Source RPM : sssd-1.14.0-43.el7.src.rpm
Build Date : Tue 20 Sep 2016 09:45:51 AM EDT
Build Host : x86-017.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://fedorahosted.org/sssd/
Summary : System Security Services Daemon
Verified using the workaround mentioned in comment 9. Sumit has an authconfig patch that will fix this issue without the authconfig workaround which will go into RHEL 7.4 https://bugzilla.redhat.com/show_bug.cgi?id=1378943
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.