Add option to enable Heat's SSL middleware

Heat is using the HTTPProxyToWSGI middleware from oslo.middlware in
its default api-paste configuration. This commit gives us the ability
to enable/disable that middlware.

Change-Id: If80609d03399cf6511c0cf7e764e75a9e217f219
Depends-On: I35256153b2f005e729be9d242f63ff14f393b54a
This commit is contained in:
Juan Antonio Osorio Robles 2016-05-19 11:17:23 +03:00
parent dcc6dc20fd
commit a60abccabb
2 changed files with 14 additions and 0 deletions

View File

@ -294,6 +294,11 @@
# (Optional) Run db sync on nodes after connection setting has been set.
# Defaults to true
#
# [*enable_proxy_headers_parsing*]
# (Optional) Enable paste middleware to handle SSL requests through
# HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*verbose*]
@ -369,6 +374,7 @@ class heat(
$max_template_size = $::os_service_default,
$max_json_body_size = $::os_service_default,
$notification_driver = $::os_service_default,
$enable_proxy_headers_parsing = $::os_service_default,
# Deprecated
$verbose = undef,
) {
@ -497,4 +503,8 @@ class heat(
rpc_response_timeout => $rpc_response_timeout,
}
oslo::middleware { 'heat_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
}
}

View File

@ -128,6 +128,10 @@ describe 'heat' do
is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('<SERVICE DEFAULT>')
end
it 'sets default value for http_proxy_to_wsgi middleware' do
is_expected.to contain_heat_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
end
it_configures "with default auth method"
end