comparison modules/apache/manifests/mod/auth_cas.pp @ 257:675c1cc61eaf

Update Apache module to get CentOS 8 support Unfortunately it only fixes some bits. mod_wsgi still needs other approaches This also overrides the vhost modification to make them come last in the import order (after module loading)
author IBBoard <dev@ibboard.co.uk>
date Sun, 22 Dec 2019 14:43:29 -0500
parents 37675581a273
children d9352a684e62
comparison
equal deleted inserted replaced
252:47750947f4dc 257:675c1cc61eaf
1 class apache::mod::auth_cas ( 1 class apache::mod::auth_cas (
2 $cas_login_url, 2 $cas_login_url,
3 $cas_validate_url, 3 $cas_validate_url,
4 $cas_cookie_path = $::apache::params::cas_cookie_path, 4 $cas_cookie_path = $::apache::params::cas_cookie_path,
5 $cas_version = 2, 5 $cas_cookie_path_mode = '0750',
6 $cas_debug = 'Off', 6 $cas_version = 2,
7 $cas_validate_depth = undef, 7 $cas_debug = 'Off',
8 $cas_certificate_path = undef, 8 $cas_validate_server = undef,
9 $cas_proxy_validate_url = undef, 9 $cas_validate_depth = undef,
10 $cas_root_proxied_as = undef, 10 $cas_certificate_path = undef,
11 $cas_cookie_entropy = undef, 11 $cas_proxy_validate_url = undef,
12 $cas_timeout = undef, 12 $cas_root_proxied_as = undef,
13 $cas_idle_timeout = undef, 13 $cas_cookie_entropy = undef,
14 $cas_cache_clean_interval = undef, 14 $cas_timeout = undef,
15 $cas_cookie_domain = undef, 15 $cas_idle_timeout = undef,
16 $cas_cookie_http_only = undef, 16 $cas_cache_clean_interval = undef,
17 $cas_authoritative = undef, 17 $cas_cookie_domain = undef,
18 $suppress_warning = false, 18 $cas_cookie_http_only = undef,
19 ) { 19 $cas_authoritative = undef,
20 $cas_validate_saml = undef,
21 $cas_sso_enabled = undef,
22 $cas_attribute_prefix = undef,
23 $cas_attribute_delimiter = undef,
24 $cas_scrub_request_headers = undef,
25 $suppress_warning = false,
26 ) inherits ::apache::params {
20 27
21 validate_string($cas_login_url, $cas_validate_url, $cas_cookie_path) 28 validate_string($cas_login_url, $cas_validate_url, $cas_cookie_path)
22 29
23 if $::osfamily == 'RedHat' and ! $suppress_warning { 30 if $::osfamily == 'RedHat' and ! $suppress_warning {
24 warning('RedHat distributions do not have Apache mod_auth_cas in their default package repositories.') 31 warning('RedHat distributions do not have Apache mod_auth_cas in their default package repositories.')
25 } 32 }
26 33
34 include ::apache
27 ::apache::mod { 'auth_cas': } 35 ::apache::mod { 'auth_cas': }
28 36
29 file { $cas_cookie_path: 37 file { $cas_cookie_path:
30 ensure => directory, 38 ensure => directory,
31 before => File['auth_cas.conf'], 39 before => File['auth_cas.conf'],
32 mode => '0750', 40 mode => $cas_cookie_path_mode,
33 owner => $apache::user, 41 owner => $apache::user,
34 group => $apache::group, 42 group => $apache::group,
35 } 43 }
36 44
37 # Template uses 45 # Template uses
38 # - All variables beginning with cas_ 46 # - All variables beginning with cas_
39 file { 'auth_cas.conf': 47 file { 'auth_cas.conf':
40 ensure => file, 48 ensure => file,
41 path => "${::apache::mod_dir}/auth_cas.conf", 49 path => "${::apache::mod_dir}/auth_cas.conf",
50 mode => $::apache::file_mode,
42 content => template('apache/mod/auth_cas.conf.erb'), 51 content => template('apache/mod/auth_cas.conf.erb'),
43 require => [ Exec["mkdir ${::apache::mod_dir}"], ], 52 require => [ Exec["mkdir ${::apache::mod_dir}"], ],
44 before => File[$::apache::mod_dir], 53 before => File[$::apache::mod_dir],
45 notify => Service['httpd'], 54 notify => Class['Apache::Service'],
46 } 55 }
47 56
48 } 57 }