From f7eb19f2dc1e5b37773c2617a03b2dde9a3c5ff9 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 25 Jul 2024 12:21:07 +0200 Subject: [PATCH] Move sssd service definition to avoid duplication The ipa_manage_sssd block already existed and now the service lives together with the config file management. --- manifests/config.pp | 14 ++++++-------- templates/apache_ipa_authentication.epp | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 9c8849ce..bce39518 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -191,14 +191,6 @@ } } - if $foreman::ipa_manage_sssd { - service { 'sssd': - ensure => running, - enable => true, - require => Package['sssd-dbus'], - } - } - file { "/etc/pam.d/${foreman::pam_service}": ensure => file, owner => root, @@ -246,6 +238,12 @@ changes => $sssd_changes, notify => Service['sssd'], } + + service { 'sssd': + ensure => running, + enable => true, + require => Package['sssd-dbus'], + } } foreman::settings_fragment { 'authorize_login_delegation.yaml': diff --git a/templates/apache_ipa_authentication.epp b/templates/apache_ipa_authentication.epp index 30b84552..13189331 100644 --- a/templates/apache_ipa_authentication.epp +++ b/templates/apache_ipa_authentication.epp @@ -3,7 +3,7 @@ Stdlib::Absolutepath $keytab, Boolean $gssapi_local_name, Boolean $ipa_authentication_api, --%> +|-%> InterceptFormPAMService <%= $pam_service %> @@ -42,7 +42,7 @@ SSLRequireSSL - <% if $ipa_authentication_api -%> + <% if $ipa_authentication_api { -%> AuthType Basic AuthName "PAM Authentication" @@ -56,12 +56,12 @@ GssapiSSLonly On GssapiLocalName <%= apache::bool2httpd($gssapi_local_name) %> - <% else -%> + <% } else { -%> AuthType Basic AuthName "PAM Authentication" AuthBasicProvider PAM AuthPAMService <%= $pam_service %> - <% end -%> + <% } -%> require pam-account <%= $pam_service %> ErrorDocument 401 '{ "error": "External authentication did not pass." }' # The following is needed as a workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1020087