Skip to content

Commit 8fbf28b

Browse files
committed
Match EL8 crypto defaults
On EL8+ OpenSSL is patched to support a unified crypto policy. This is also the default when installing mod_ssl. Users of RHEL Insights will also receive warnings when the defaults differ.
1 parent b3b9a82 commit 8fbf28b

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

manifests/mod/ssl.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@
9898
Optional[Stdlib::Absolutepath] $ssl_cert = undef,
9999
Optional[Stdlib::Absolutepath] $ssl_key = undef,
100100
Optional[Stdlib::Absolutepath] $ssl_ca = undef,
101-
String $ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES',
101+
String $ssl_cipher = $apache::params::ssl_cipher,
102102
Variant[Boolean, Enum['on', 'off']] $ssl_honorcipherorder = true,
103103
Array[String] $ssl_protocol = $apache::params::ssl_protocol,
104104
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,
106106
String $ssl_pass_phrase_dialog = 'builtin',
107107
Integer $ssl_random_seed_bytes = 512,
108108
String $ssl_sessioncache = $apache::params::ssl_sessioncache,

manifests/params.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,13 @@
723723
}
724724

725725
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'
727730
} else {
728731
$ssl_protocol = ['all', '-SSLv2', '-SSLv3']
732+
$ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES'
733+
$ssl_proxy_cipher_suite = undef
729734
}
730735
}

spec/acceptance/apache_ssl_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class { 'apache':
2424
describe file("#{apache_hash['mod_ssl_dir']}/ssl.conf") do
2525
it { is_expected.to be_file }
2626
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' }
2828
else
2929
it { is_expected.to contain 'SSLProtocol all -SSLv2 -SSLv3' }
3030
end

spec/classes/mod/ssl_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,19 @@
2020
it {
2121
is_expected.to contain_file('ssl.conf')
2222
.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$})
2526
}
2627

2728
context 'with ssl_proxy_cipher_suite' do
2829
let(:params) do
2930
{
30-
ssl_proxy_cipher_suite: 'PROFILE=system',
31+
ssl_proxy_cipher_suite: 'HIGH',
3132
}
3233
end
3334

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}) }
3536
end
3637

3738
context 'with empty ssl_protocol' do

0 commit comments

Comments
 (0)