Skip to content

Commit

Permalink
Merge pull request #386 from dgmorales/add-stomp-ssl-only
Browse files Browse the repository at this point in the history
Add parameter to configure only the SSL port for STOMP plugin
  • Loading branch information
bmjen committed Sep 10, 2015
2 parents 42c5fd8 + 172c659 commit 1e2ea5c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ Functionality can be tested with cipherscan or similar tool: https://github.com/

The port to use for Stomp.

####`stomp_ssl_only`

Configures STOMP to only use SSL. No cleartext STOMP TCP listeners will be created.
Requires setting ssl_stomp_port also.

####`stomp_ensure`

Boolean to install the stomp plugin.
Expand Down
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
$ssl_versions = $rabbitmq::ssl_versions
$ssl_ciphers = $rabbitmq::ssl_ciphers
$stomp_port = $rabbitmq::stomp_port
$stomp_ssl_only = $rabbitmq::stomp_ssl_only
$ldap_auth = $rabbitmq::ldap_auth
$ldap_server = $rabbitmq::ldap_server
$ldap_user_dn_pattern = $rabbitmq::ldap_user_dn_pattern
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
$ldap_log = $rabbitmq::params::ldap_log,
$ldap_config_variables = $rabbitmq::params::ldap_config_variables,
$stomp_port = $rabbitmq::params::stomp_port,
$stomp_ssl_only = $rabbitmq::params::stomp_ssl_only,
$version = $rabbitmq::params::version,
$wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
$cluster_partition_handling = $rabbitmq::params::cluster_partition_handling,
Expand Down Expand Up @@ -123,6 +124,7 @@
validate_re($ssl_stomp_port, '\d+')
}
validate_bool($stomp_ensure)
validate_bool($stomp_ssl_only)
validate_bool($ldap_auth)
validate_string($ldap_server)
validate_string($ldap_user_dn_pattern)
Expand All @@ -143,6 +145,10 @@
warning('$ssl_stomp_port requires that $ssl => true and will be ignored')
}

if $config_stomp and $stomp_ssl_only and ! $ssl_stomp_port {
fail('$stomp_ssl_only requires that $ssl_stomp_port be set')
}

if $ssl_versions {
if $ssl {
validate_array($ssl_versions)
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
$ldap_log = false
$ldap_config_variables = {}
$stomp_port = '61613'
$stomp_ssl_only = false
$wipe_db_on_cookie_change = false
$cluster_partition_handling = 'ignore'
$environment_variables = {}
Expand Down
7 changes: 6 additions & 1 deletion templates/rabbitmq.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@
<% if @config_stomp -%>,
% Configure the Stomp Plugin listening port
{rabbitmq_stomp, [
<%- if @stomp_ssl_only -%>
{tcp_listeners, []}
<%- else -%>
{tcp_listeners, [<%= @stomp_port %>]}
<%- if @ssl && @ssl_stomp_port -%>,
<%- end -%>
<%- if @ssl && @ssl_stomp_port -%>
,
{ssl_listeners, [<%= @ssl_stomp_port %>]}
<%- end -%>
]}
Expand Down

0 comments on commit 1e2ea5c

Please sign in to comment.