Skip to content

Commit 985d959

Browse files
committed
Include apache::mod::authn_core in every auth mod
The authn_core module is needed for AuthType, which is needed to select a specific auth. While modules may load without them, it's unlikely to work in practice. This is only relevant when default mods are disabled since authn_core is a default module.
1 parent e1f9cae commit 985d959

File tree

9 files changed

+27
-0
lines changed

9 files changed

+27
-0
lines changed

manifests/mod/auth_basic.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
# @see https://httpd.apache.org/docs/current/mod/mod_auth_basic.html for additional documentation.
55
#
66
class apache::mod::auth_basic {
7+
include apache::mod::authn_core
78
::apache::mod { 'auth_basic': }
89
}

manifests/mod/auth_cas.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
}
116116

117117
include apache
118+
include apache::mod::authn_core
118119
::apache::mod { 'auth_cas': }
119120

120121
file { $cas_cookie_path:

manifests/mod/auth_mellon.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
Optional[Integer] $mellon_post_count = undef
3535
) inherits apache::params {
3636
include apache
37+
include apache::mod::authn_core
3738
::apache::mod { 'auth_mellon': }
3839

3940
# Template uses

manifests/mod/auth_openidc.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
class apache::mod::auth_openidc inherits apache::params {
77
include apache
8+
include apache::mod::authn_core
89
include apache::mod::authz_user
910
apache::mod { 'auth_openidc': }
1011
}

spec/classes/mod/auth_cas_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
include_examples 'Debian 11'
2828

2929
it { is_expected.to contain_class('apache::params') }
30+
it { is_expected.to contain_class('apache::mod::authn_core') }
3031
it { is_expected.to contain_apache__mod('auth_cas') }
3132
it { is_expected.to contain_package('libapache2-mod-auth-cas') }
3233
it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/apache2/mods-available/auth_cas.conf') }
@@ -36,6 +37,7 @@
3637
include_examples 'RedHat 6'
3738

3839
it { is_expected.to contain_class('apache::params') }
40+
it { is_expected.to contain_class('apache::mod::authn_core') }
3941
it { is_expected.to contain_apache__mod('auth_cas') }
4042
it { is_expected.to contain_package('mod_auth_cas') }
4143
it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.d/auth_cas.conf') }
@@ -50,6 +52,7 @@
5052
include_examples 'RedHat 6'
5153

5254
it { is_expected.to contain_class('apache::params') }
55+
it { is_expected.to contain_class('apache::mod::authn_core') }
5356
it { is_expected.to contain_apache__mod('auth_cas') }
5457
it { is_expected.to contain_package('mod_auth_cas') }
5558
it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.d/auth_cas.conf') }

spec/classes/mod/auth_gssapi_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,31 @@
1010
include_examples 'Debian 11'
1111

1212
it { is_expected.to contain_class('apache::params') }
13+
it { is_expected.to contain_class('apache::mod::authn_core') }
1314
it { is_expected.to contain_apache__mod('auth_gssapi') }
1415
it { is_expected.to contain_package('libapache2-mod-auth-gssapi') }
1516
end
1617
context 'on a RedHat OS', :compile do
1718
include_examples 'RedHat 6'
1819

1920
it { is_expected.to contain_class('apache::params') }
21+
it { is_expected.to contain_class('apache::mod::authn_core') }
2022
it { is_expected.to contain_apache__mod('auth_gssapi') }
2123
it { is_expected.to contain_package('mod_auth_gssapi') }
2224
end
2325
context 'on a FreeBSD OS', :compile do
2426
include_examples 'FreeBSD 9'
2527

2628
it { is_expected.to contain_class('apache::params') }
29+
it { is_expected.to contain_class('apache::mod::authn_core') }
2730
it { is_expected.to contain_apache__mod('auth_gssapi') }
2831
it { is_expected.to contain_package('www/mod_auth_gssapi') }
2932
end
3033
context 'on a Gentoo OS', :compile do
3134
include_examples 'Gentoo'
3235

3336
it { is_expected.to contain_class('apache::params') }
37+
it { is_expected.to contain_class('apache::mod::authn_core') }
3438
it { is_expected.to contain_apache__mod('auth_gssapi') }
3539
it { is_expected.to contain_package('www-apache/mod_auth_gssapi') }
3640
end

spec/classes/mod/auth_kerb_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,31 @@
1010
include_examples 'Debian 11'
1111

1212
it { is_expected.to contain_class('apache::params') }
13+
it { is_expected.to contain_class('apache::mod::authn_core') }
1314
it { is_expected.to contain_apache__mod('auth_kerb') }
1415
it { is_expected.to contain_package('libapache2-mod-auth-kerb') }
1516
end
1617
context 'on a RedHat OS', :compile do
1718
include_examples 'RedHat 6'
1819

1920
it { is_expected.to contain_class('apache::params') }
21+
it { is_expected.to contain_class('apache::mod::authn_core') }
2022
it { is_expected.to contain_apache__mod('auth_kerb') }
2123
it { is_expected.to contain_package('mod_auth_kerb') }
2224
end
2325
context 'on a FreeBSD OS', :compile do
2426
include_examples 'FreeBSD 9'
2527

2628
it { is_expected.to contain_class('apache::params') }
29+
it { is_expected.to contain_class('apache::mod::authn_core') }
2730
it { is_expected.to contain_apache__mod('auth_kerb') }
2831
it { is_expected.to contain_package('www/mod_auth_kerb2') }
2932
end
3033
context 'on a Gentoo OS', :compile do
3134
include_examples 'Gentoo'
3235

3336
it { is_expected.to contain_class('apache::params') }
37+
it { is_expected.to contain_class('apache::mod::authn_core') }
3438
it { is_expected.to contain_apache__mod('auth_kerb') }
3539
it { is_expected.to contain_package('www-apache/mod_auth_kerb') }
3640
end
@@ -49,6 +53,7 @@ class { 'apache':
4953
MANIFEST
5054
end
5155

56+
it { is_expected.to contain_class('apache::mod::authn_core') }
5257
it { is_expected.to contain_apache__mod('auth_kerb') }
5358
it { is_expected.to contain_package('httpd24-mod_auth_kerb') }
5459
it { is_expected.not_to contain_package('mod_auth_kerb') }

spec/classes/mod/auth_mellon_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
include_examples 'Debian 11'
1010

1111
describe 'with no parameters' do
12+
it { is_expected.to contain_class('apache::mod::authn_core') }
1213
it { is_expected.to contain_apache__mod('auth_mellon') }
1314
it { is_expected.to contain_package('libapache2-mod-auth-mellon') }
1415
it { is_expected.to contain_file('auth_mellon.conf').with_path('/etc/apache2/mods-available/auth_mellon.conf') }
@@ -38,6 +39,7 @@
3839
include_examples 'RedHat 6'
3940

4041
describe 'with no parameters' do
42+
it { is_expected.to contain_class('apache::mod::authn_core') }
4143
it { is_expected.to contain_apache__mod('auth_mellon') }
4244
it { is_expected.to contain_package('mod_auth_mellon') }
4345
it { is_expected.to contain_file('auth_mellon.conf').with_path('/etc/httpd/conf.d/auth_mellon.conf') }

spec/classes/mod/auth_openidc_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@
1010
include_examples 'Debian 11'
1111

1212
it { is_expected.to contain_class('apache::params') }
13+
it { is_expected.to contain_class('apache::mod::authn_core') }
14+
it { is_expected.to contain_class('apache::mod::authz_user') }
1315
it { is_expected.to contain_apache__mod('auth_openidc') }
1416
it { is_expected.to contain_package('libapache2-mod-auth-openidc') }
1517
end
1618
context 'on a RedHat OS', :compile do
1719
include_examples 'RedHat 6'
1820

1921
it { is_expected.to contain_class('apache::params') }
22+
it { is_expected.to contain_class('apache::mod::authn_core') }
23+
it { is_expected.to contain_class('apache::mod::authz_user') }
2024
it { is_expected.to contain_apache__mod('auth_openidc') }
2125
it { is_expected.to contain_package('mod_auth_openidc') }
2226
end
2327
context 'on a FreeBSD OS', :compile do
2428
include_examples 'FreeBSD 9'
2529

2630
it { is_expected.to contain_class('apache::params') }
31+
it { is_expected.to contain_class('apache::mod::authn_core') }
32+
it { is_expected.to contain_class('apache::mod::authz_user') }
2733
it { is_expected.to contain_apache__mod('auth_openidc') }
2834
it { is_expected.to contain_package('www/mod_auth_openidc') }
2935
end
@@ -42,6 +48,9 @@ class { 'apache':
4248
MANIFEST
4349
end
4450

51+
it { is_expected.to contain_class('apache::params') }
52+
it { is_expected.to contain_class('apache::mod::authn_core') }
53+
it { is_expected.to contain_class('apache::mod::authz_user') }
4554
it { is_expected.to contain_apache__mod('auth_openidc') }
4655
it { is_expected.to contain_package('httpd24-mod_auth_openidc') }
4756
it { is_expected.not_to contain_package('mod_auth_openidc') }

0 commit comments

Comments
 (0)