File tree Expand file tree Collapse file tree 5 files changed +33
-9
lines changed Expand file tree Collapse file tree 5 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 98
98
Optional[Stdlib::Absolutepath] $ssl_cert = undef ,
99
99
Optional[Stdlib::Absolutepath] $ssl_key = undef ,
100
100
Optional[Stdlib::Absolutepath] $ssl_ca = undef ,
101
- String $ssl_cipher = ' HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES ' ,
101
+ String $ssl_cipher = $apache::params::ssl_cipher ,
102
102
Variant[Boolean, Enum[' on' , ' off' ]] $ssl_honorcipherorder = true ,
103
103
Array[String] $ssl_protocol = $apache::params::ssl_protocol,
104
104
Array $ssl_proxy_protocol = [],
105
- Optional[String[1]] $ssl_proxy_cipher_suite = undef ,
105
+ Optional[String[1]] $ssl_proxy_cipher_suite = $apache::params::ssl_proxy_cipher_suite ,
106
106
String $ssl_pass_phrase_dialog = ' builtin' ,
107
107
Integer $ssl_random_seed_bytes = 512,
108
108
String $ssl_sessioncache = $apache::params::ssl_sessioncache,
Original file line number Diff line number Diff line change 723
723
}
724
724
725
725
if $facts [' os' ][' family' ] == ' RedHat' and versioncmp($facts [' os' ][' release' ][' major' ], ' 8' ) >= 0 {
726
- $ssl_protocol = [' all' ] # Implementations of the SSLv2 and SSLv3 protocol versions have been removed from OpenSSL (and hence mod_ssl) because these are no longer considered secure. For additional documentation https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-web-server_deploying-different-types-of-servers
726
+ # Use OpenSSL system profile. See update-crypto-policies(8) for more details
727
+ $ssl_protocol = []
728
+ $ssl_cipher = ' PROFILE=SYSTEM'
729
+ $ssl_proxy_cipher_suite = ' PROFILE=SYSTEM'
730
+ } elsif $facts [' os' ][' family' ] == ' Debian' {
731
+ $ssl_protocol = [' all' , ' -SSLv3' ]
732
+ $ssl_cipher = ' HIGH:!aNULL'
733
+ $ssl_proxy_cipher_suite = undef
727
734
} else {
728
735
$ssl_protocol = [' all' , ' -SSLv2' , ' -SSLv3' ]
736
+ $ssl_cipher = ' HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES'
737
+ $ssl_proxy_cipher_suite = undef
729
738
}
730
739
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ class { 'apache':
24
24
describe file ( "#{ apache_hash [ 'mod_ssl_dir' ] } /ssl.conf" ) do
25
25
it { is_expected . to be_file }
26
26
if os [ :family ] . include? ( 'redhat' ) && os [ :release ] . to_i >= 8
27
- it { is_expected . to contain 'SSLProtocol all' }
27
+ it { is_expected . not_to contain 'SSLProtocol' }
28
+ elsif [ 'debian' , 'ubuntu' ] . include? ( os [ :family ] )
29
+ it { is_expected . to contain 'SSLProtocol all -SSLv3' }
28
30
else
29
31
it { is_expected . to contain 'SSLProtocol all -SSLv2 -SSLv3' }
30
32
end
Original file line number Diff line number Diff line change 20
20
it {
21
21
is_expected . to contain_file ( 'ssl.conf' )
22
22
. with_path ( '/etc/httpd/conf.modules.d/ssl.conf' )
23
- . with_content ( %r{SSLProtocol all} )
24
- . without_content ( %r{SSLProxyCipherSuite} )
23
+ . without_content ( %r{SSLProtocol} )
24
+ . with_content ( %r{^ SSLCipherSuite PROFILE=SYSTEM$} )
25
+ . with_content ( %r{^ SSLProxyCipherSuite PROFILE=SYSTEM$} )
25
26
}
26
27
27
28
context 'with ssl_proxy_cipher_suite' do
28
29
let ( :params ) do
29
30
{
30
- ssl_proxy_cipher_suite : 'PROFILE=system ' ,
31
+ ssl_proxy_cipher_suite : 'HIGH ' ,
31
32
}
32
33
end
33
34
34
- it { is_expected . to contain_file ( 'ssl.conf' ) . with_content ( %r{SSLProxyCipherSuite PROFILE=system} ) }
35
+ it { is_expected . to contain_file ( 'ssl.conf' ) . with_content ( %r{SSLProxyCipherSuite HIGH} ) }
36
+ end
37
+
38
+ context 'with empty ssl_protocol' do
39
+ let ( :params ) do
40
+ {
41
+ ssl_protocol : [ ] ,
42
+ }
43
+ end
44
+
45
+ it { is_expected . to contain_file ( 'ssl.conf' ) . without_content ( %r{SSLProtocol} ) }
35
46
end
36
47
end
37
48
58
69
it { is_expected . to contain_class ( 'apache::params' ) }
59
70
it { is_expected . to contain_apache__mod ( 'ssl' ) }
60
71
it { is_expected . not_to contain_package ( 'libapache2-mod-ssl' ) }
61
- it { is_expected . to contain_file ( 'ssl.conf' ) . with_content ( %r{SSLProtocol all -SSLv2 - SSLv3} ) }
72
+ it { is_expected . to contain_file ( 'ssl.conf' ) . with_content ( %r{SSLProtocol all -SSLv3} ) }
62
73
end
63
74
context 'on a FreeBSD OS' do
64
75
include_examples 'FreeBSD 9'
Original file line number Diff line number Diff line change 40
40
SSLStaplingCache "shmcb:<%= @_stapling_cache %> "
41
41
<% end -%>
42
42
SSLCipherSuite <%= @ssl_cipher %>
43
+ <% if not @ssl_protocol . empty? -%>
43
44
SSLProtocol <%= @ssl_protocol . compact . join ( ' ' ) %>
45
+ <% end -%>
44
46
<% if not @ssl_proxy_protocol . empty? -%>
45
47
SSLProxyProtocol <%= @ssl_proxy_protocol . compact . join ( ' ' ) %>
46
48
<% end -%>
You can’t perform that action at this time.
0 commit comments