Skip to content

Commit e58d189

Browse files
CIDM-1283 Add SSL Include/Exclude protocol and TLS renegotiation options to container filter.
1 parent c7510b8 commit e58d189

File tree

4 files changed

+58
-16
lines changed

4 files changed

+58
-16
lines changed

manifests/filter/container.pp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# == Class: repose::filter::container
22
#
33
# This is a class for managing the container configuration file
4-
# and log4j.properties
4+
# and log4j.properties Container configuration is fully documented in the
5+
# Repose project wiki.
6+
# https://repose.atlassian.net/wiki/spaces/REPOSE/pages/527236/Container
57
#
68
# === Parameters
79
#
@@ -173,6 +175,18 @@
173175
# Array [String]. The cipher strings to deny connections for.
174176
# Defaults to <tt>undef</tt>
175177
#
178+
# [*ssl_include_protocol*]
179+
# Array [String]. The protocol strings to allow connections for.
180+
# Defaults to <tt>undef</tt>
181+
#
182+
# [*ssl_exclude_protocol*]
183+
# Array [String]. The protocol strings to deny connections for.
184+
# Defaults to <tt>undef</tt>
185+
#
186+
# [*ssl_tls_renegotiation*]
187+
# Boolean. Explicitly allow or deny TLS renegotiation.
188+
# Defaults to <tt>undef</tt>
189+
#
176190
# [*via*]
177191
# String. String used in the Via header.
178192
# Defaults to <tt>undef</tt>
@@ -290,6 +304,9 @@
290304
$ssl_key_password = undef,
291305
$ssl_include_cipher = undef,
292306
$ssl_exclude_cipher = undef,
307+
$ssl_include_protocol = undef,
308+
$ssl_exclude_protocol = undef,
309+
$ssl_tls_renegotiation = undef,
293310
$syslog_server = undef,
294311
$syslog_port = $repose::params::syslog_port,
295312
$syslog_protocol = $repose::params::syslog_protocol,

puppet-module-repose.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%define base_name repose
33

44
Name: puppet-module-%{user}-%{base_name}
5-
Version: 2.7.0
5+
Version: 2.8.0
66
Release: 1
77
BuildArch: noarch
88
Summary: Puppet module to configure %{base_name}
@@ -30,6 +30,8 @@ cp -pr * %{buildroot}%{module_dir}/
3030
%{module_dir}
3131

3232
%changelog
33+
* Mon May 12 2018 Josh Bell <josh.bell@rackspace.com> - 2.8.0-1
34+
- Add ssl protocol and tls renegotiation options to container filter
3335
* Mon Apr 02 2018 Dimitry Ushakov <dimitry.ushakov@rackspace.com> - 2.7.0-1
3436
- Add opentracing module and tests
3537
* Wed Mar 21 2018 Meynard Alconis <meynard.alconis@rackspace.com> - 2.6.2-1

spec/classes/filter/container_spec.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@
7777
:ssl_keystore_filename => 'keystore.name',
7878
:ssl_keystore_password => 'mypassword',
7979
:ssl_key_password => 'keypassword',
80-
:ssl_include_cipher => ['include'],
81-
:ssl_exclude_cipher => ['exclude'],
80+
:ssl_include_cipher => ['include'],
81+
:ssl_exclude_cipher => ['exclude'],
82+
:ssl_include_protocol => ['include'],
83+
:ssl_exclude_protocol => ['exclude'],
84+
:ssl_tls_renegotiation => 'true',
8285
:content_body_read_limit => '10240000',
8386
:jmx_reset_time => '3600000',
8487
:client_request_logging => 'false',
@@ -109,6 +112,9 @@
109112
with_content(/<key-password>keypassword<\/key-password>/).
110113
with_content(/<included-ciphers>/).
111114
with_content(/<excluded-ciphers>/).
115+
with_content(/<included-protocols>/).
116+
with_content(/<excluded-protocols>/).
117+
with_content(/<tls-renegotiation-allowed>true<\/tls-renegotiation-allowed>/).
112118
with_content(/<\/ssl-configuration>/)
113119
}
114120
end

templates/container.cfg.xml.erb

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,36 @@
4848
<keystore-password><%= @ssl_keystore_password %></keystore-password>
4949
<key-password><%= @ssl_key_password %></key-password>
5050
<%- unless @ssl_include_cipher.nil? -%>
51-
<included-ciphers>
52-
<%- @ssl_include_cipher.each do |cipher| -%>
53-
<cipher><%= cipher %></cipher>
54-
<%- end -%>
55-
</included-ciphers>
56-
<%- end -%>
51+
<included-ciphers>
52+
<%- @ssl_include_cipher.each do |cipher| -%>
53+
<cipher><%= cipher %></cipher>
54+
<%- end -%>
55+
</included-ciphers>
56+
<%- end -%>
5757
<%- unless @ssl_exclude_cipher.nil? -%>
58-
<excluded-ciphers>
59-
<%- @ssl_exclude_cipher.each do |cipher| -%>
60-
<cipher><%= cipher %></cipher>
61-
<%- end -%>
62-
</excluded-ciphers>
63-
<%- end -%>
58+
<excluded-ciphers>
59+
<%- @ssl_exclude_cipher.each do |cipher| -%>
60+
<cipher><%= cipher %></cipher>
61+
<%- end -%>
62+
</excluded-ciphers>
63+
<%- end -%>
64+
<%- unless @ssl_exclude_protocol.nil? -%>
65+
<excluded-protocols>
66+
<%- @ssl_exclude_protocol.each do |protocol| -%>
67+
<protocol><%= protocol %></protocol>
68+
<%- end -%>
69+
</excluded-protocols>
70+
<%- end -%>
71+
<%- unless @ssl_include_protocol.nil? -%>
72+
<included-protocols>
73+
<%- @ssl_include_protocol.each do |protocol| -%>
74+
<protocol><%= protocol %></protocol>
75+
<%- end -%>
76+
</included-protocols>
77+
<%- end -%>
78+
<%- unless @ssl_tls_renegotiation.nil? -%>
79+
<tls-renegotiation-allowed><%= @ssl_tls_renegotiation -%></tls-renegotiation-allowed>
80+
<%- end -%>
6481
</ssl-configuration>
6582
<%- end -%>
6683
</deployment-config>

0 commit comments

Comments
 (0)