Skip to content

Commit 99fde7b

Browse files
committed
profiles: support switchable auth in sssd
Resolves: authselect#369 (cherry picked from commit 1a84758)
1 parent d23cbab commit 99fde7b

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
@@ -39,6 +39,7 @@ dist_profile_sssd_DATA = \
3939
$(top_srcdir)/profiles/sssd/README \
4040
$(top_srcdir)/profiles/sssd/REQUIREMENTS \
4141
$(top_srcdir)/profiles/sssd/smartcard-auth \
42+
$(top_srcdir)/profiles/sssd/switchable-auth \
4243
$(top_srcdir)/profiles/sssd/system-auth \
4344
$(top_srcdir)/profiles/sssd/fingerprint-auth \
4445
$(top_srcdir)/profiles/sssd/dconf-db \

profiles/sssd/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ Ignore "automount" database set by the profile.
128128
with-custom-services::
129129
Ignore "services" database set by the profile.
130130

131+
with-switchable-auth::
132+
Generate switchable-auth PAM stack that can be used by login applications
133+
to select the authentication method that shall be used to authenticate the
134+
user.
135+
131136
EXAMPLES
132137
--------
133138

profiles/sssd/REQUIREMENTS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ Make sure that SSSD service is configured and enabled. See SSSD documentation fo
2525
- with-gssapi is selected, make sure that GSSAPI authenticaiton is enabled in SSSD {include if "with-gssapi"}
2626
- set pam_gssapi_services to a list of allowed services in /etc/sssd/sssd.conf {include if "with-gssapi"}
2727
- see additional information in pam_sss_gss(8) {include if "with-gssapi"}
28+
{include if "with-switchable-auth"}
29+
- with-switchable-auth is selected, make sure to enable it in sssd.conf {include if "with-switchable-auth"}
30+
- 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
@@ -199,6 +199,7 @@ find $RPM_BUILD_ROOT -name "*.a" -exec %__rm -f {} \;
199199
%{_datadir}/authselect/default/sssd/README
200200
%{_datadir}/authselect/default/sssd/REQUIREMENTS
201201
%{_datadir}/authselect/default/sssd/smartcard-auth
202+
%{_datadir}/authselect/default/sssd/switchable-auth
202203
%{_datadir}/authselect/default/sssd/system-auth
203204
%{_datadir}/authselect/default/winbind/dconf-db
204205
%{_datadir}/authselect/default/winbind/dconf-locks

0 commit comments

Comments
 (0)