Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ssl-protocols option for puppetserver configuration #598

Merged
merged 1 commit into from
Jun 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/server/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@
'webserver.ssl-key' => $server_ssl_cert_key,
'webserver.ssl-ca-cert' => $server_ssl_ca_cert,
'webserver.idle-timeout-milliseconds' => $server_web_idle_timeout,
'webserver.ssl-protocols' => $server_ssl_protocols,
'webserver.cipher-suites' => $server_cipher_suites,
}

$webserver_general_settings.each |$setting, $value| {
Expand Down
41 changes: 41 additions & 0 deletions spec/classes/puppet_server_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,47 @@
end
end

describe 'with ssl_protocols overwritten' do
let :pre_condition do
"class {'puppet':
server => true,
server_implementation => 'puppetserver',
server_ca => true,
server_puppetserver_dir => '/etc/custom/puppetserver',
server_ssl_protocols => ['TLSv1.1', 'TLSv1.2'],
}"
end

it 'should set the ssl protocols' do
should contain_hocon_setting('webserver.ssl-protocols').
with_path('/etc/custom/puppetserver/conf.d/webserver.conf').
with_setting('webserver.ssl-protocols').
with_value(['TLSv1.1', 'TLSv1.2']).
with_ensure('present')
end
end

describe 'with cipher-suites overwritten' do
let :pre_condition do
"class {'puppet':
server => true,
server_implementation => 'puppetserver',
server_ca => true,
server_puppetserver_dir => '/etc/custom/puppetserver',
server_cipher_suites => ['TLS_RSA_WITH_AES_256_CBC_SHA256', 'TLS_RSA_WITH_AES_256_CBC_SHA'],
}"
end

it 'should set the cipher suite' do
should contain_hocon_setting('webserver.cipher-suites').
with_path('/etc/custom/puppetserver/conf.d/webserver.conf').
with_setting('webserver.cipher-suites').
with_value(['TLS_RSA_WITH_AES_256_CBC_SHA256', 'TLS_RSA_WITH_AES_256_CBC_SHA']).
with_ensure('present')
end
end


describe 'with ssl_chain_filepath overwritten' do
let :pre_condition do
"class {'puppet':
Expand Down