Skip to content

Commit c816140

Browse files
pbrezinanext-actions/backport
authored andcommitted
profiles: support switchable auth in sssd
Resolves: authselect#369 (cherry picked from commit 1a84758)
1 parent 7cab4df commit c816140

File tree

7 files changed

+29
-0
lines changed

7 files changed

+29
-0
lines changed

profiles/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ dist_profile_sssd_DATA = \
4141
$(top_srcdir)/profiles/sssd/README \
4242
$(top_srcdir)/profiles/sssd/REQUIREMENTS \
4343
$(top_srcdir)/profiles/sssd/smartcard-auth \
44+
$(top_srcdir)/profiles/sssd/switchable-auth \
4445
$(top_srcdir)/profiles/sssd/system-auth \
4546
$(top_srcdir)/profiles/sssd/fingerprint-auth \
4647
$(top_srcdir)/profiles/sssd/dconf-db \

profiles/sssd/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ with-libvirt::
122122
with-tlog::
123123
Enable support for tlog session recordings in cooperation with SSSD.
124124

125+
with-switchable-auth::
126+
Generate switchable-auth PAM stack that can be used by login applications
127+
to select the authentication method that shall be used to authenticate the
128+
user.
129+
125130
EXAMPLES
126131
--------
127132

profiles/sssd/REQUIREMENTS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ Make sure that SSSD service is configured and enabled. See SSSD documentation fo
2828
{include if "with-systemd-homed"}
2929
- with-systemd-homed is selected, make sure that the system-homed service is enabled {include if "with-systemd-homed"}
3030
- systemctl enable --now systemd-homed.service {include if "with-systemd-homed"}
31+
{include if "with-switchable-auth"}
32+
- with-switchable-auth is selected, make sure to enable it in sssd.conf {include if "with-switchable-auth"}
33+
- set "pam_json_services = list-of-services" in [pam] section {include if "with-switchable-auth"}

profiles/sssd/dconf-db

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
enable-smartcard-authentication={if "with-smartcard":true|false}
55
enable-fingerprint-authentication={if "with-fingerprint":true|false}
66
enable-password-authentication={if "with-smartcard-required":false|true}
7+
enable-switchable-authentication={if "with-switchable-auth":true|false}
78

89
[org/gnome/settings-daemon/peripherals/smartcard] {include if "with-smartcard-lock-on-removal"}
910
removal-action='lock-screen' {include if "with-smartcard-lock-on-removal"}

profiles/sssd/dconf-locks

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/org/gnome/login-screen/enable-smartcard-authentication
22
/org/gnome/login-screen/enable-fingerprint-authentication
33
/org/gnome/login-screen/enable-password-authentication
4+
/org/gnome/login-screen/enable-switchable-authentication
45
/org/gnome/settings-daemon/peripherals/smartcard/removal-action {include if "with-smartcard-lock-on-removal"}

profiles/sssd/switchable-auth

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
auth required pam_debug.so auth=authinfo_unavail {exclude if "with-switchable-auth"}
2+
{continue if "with-switchable-auth"}
3+
auth [success=done ignore=ignore default=bad] pam_selinux_permit.so
4+
auth required pam_env.so
5+
auth required pam_faildelay.so delay=2000000
6+
auth required pam_faillock.so preauth silent {include if "with-faillock"}
7+
auth [default=1 ignore=ignore success=ok] pam_usertype.so isregular
8+
auth [default=1 ignore=ignore success=ok] pam_localuser.so
9+
auth sufficient pam_unix.so nullok
10+
auth [default=1 ignore=ignore success=ok] pam_usertype.so isregular
11+
auth sufficient pam_sss.so
12+
auth optional pam_gnome_keyring.so only_if=login auto_start {include if "with-pam-gnome-keyring"}
13+
auth required pam_deny.so
14+
15+
account include system-auth
16+
password include system-auth
17+
session include system-auth

rpm/authselect.spec.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ find $RPM_BUILD_ROOT -name "*.a" -exec %__rm -f {} \;
165165
%{_datadir}/authselect/default/sssd/README
166166
%{_datadir}/authselect/default/sssd/REQUIREMENTS
167167
%{_datadir}/authselect/default/sssd/smartcard-auth
168+
%{_datadir}/authselect/default/sssd/switchable-auth
168169
%{_datadir}/authselect/default/sssd/system-auth
169170
%{_datadir}/authselect/default/winbind/dconf-db
170171
%{_datadir}/authselect/default/winbind/dconf-locks

0 commit comments

Comments
 (0)