From a60abccabbbba8aff6e53b2c64d98fb8a1a6739c Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Thu, 19 May 2016 11:17:23 +0300 Subject: [PATCH] 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 --- manifests/init.pp | 10 ++++++++++ spec/classes/heat_init_spec.rb | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 69317bc7..fec72495 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, + } + } diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 2d855f89..f1340621 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -128,6 +128,10 @@ describe 'heat' do is_expected.to contain_heat_config('oslo_messaging_notifications/driver').with_value('') 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('') + end + it_configures "with default auth method" end