diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index d4ce8141..1771df2d 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -18,6 +18,10 @@ # healthcheck information. # Defaults to $facts['os_service_default'] # +# [*ignore_proxied_requests*] +# (Optional) Ignore requests with proxy headers +# Defaults to $facts['os_service_default'] +# # [*disable_by_file_path*] # (Optional) Check the presence of a file to determine if an application # is running on a port. @@ -29,20 +33,22 @@ # Defaults to $facts['os_service_default'] # class barbican::healthcheck ( - $detailed = $facts['os_service_default'], - $backends = $facts['os_service_default'], - $allowed_source_ranges = $facts['os_service_default'], - $disable_by_file_path = $facts['os_service_default'], - $disable_by_file_paths = $facts['os_service_default'], + $detailed = $facts['os_service_default'], + $backends = $facts['os_service_default'], + $allowed_source_ranges = $facts['os_service_default'], + $ignore_proxied_requests = $facts['os_service_default'], + $disable_by_file_path = $facts['os_service_default'], + $disable_by_file_paths = $facts['os_service_default'], ) { include barbican::deps oslo::healthcheck { 'barbican_config': - detailed => $detailed, - backends => $backends, - allowed_source_ranges => $allowed_source_ranges, - disable_by_file_path => $disable_by_file_path, - disable_by_file_paths => $disable_by_file_paths, + detailed => $detailed, + backends => $backends, + allowed_source_ranges => $allowed_source_ranges, + ignore_proxied_requests => $ignore_proxied_requests, + disable_by_file_path => $disable_by_file_path, + disable_by_file_paths => $disable_by_file_paths, } } diff --git a/releasenotes/notes/healthcheck-ignore_proxied_requests-14e7ec5f0ab883aa.yaml b/releasenotes/notes/healthcheck-ignore_proxied_requests-14e7ec5f0ab883aa.yaml new file mode 100644 index 00000000..2801285a --- /dev/null +++ b/releasenotes/notes/healthcheck-ignore_proxied_requests-14e7ec5f0ab883aa.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``barbican::healthcheck::ignore_proxied_requests`` parameter has + been added. diff --git a/spec/classes/barbican_healthcheck_spec.rb b/spec/classes/barbican_healthcheck_spec.rb index fa8688cd..fabe3bb6 100644 --- a/spec/classes/barbican_healthcheck_spec.rb +++ b/spec/classes/barbican_healthcheck_spec.rb @@ -11,11 +11,12 @@ describe 'barbican::healthcheck' do it 'configures default values' do is_expected.to contain_oslo__healthcheck('barbican_config').with( - :detailed => '', - :backends => '', - :allowed_source_ranges => '', - :disable_by_file_path => '', - :disable_by_file_paths => '', + :detailed => '', + :backends => '', + :allowed_source_ranges => '', + :ignore_proxied_requests => '', + :disable_by_file_path => '', + :disable_by_file_paths => '', ) end end @@ -23,21 +24,23 @@ describe 'barbican::healthcheck' do context 'with specific parameters' do let :params do { - :detailed => true, - :backends => ['disable_by_file'], - :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], - :disable_by_file_path => '/etc/barbican/healthcheck/disabled', - :disable_by_file_paths => ['9311:/etc/barbican/healthcheck/disabled'], + :detailed => true, + :backends => ['disable_by_file'], + :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], + :ignore_proxied_requests => false, + :disable_by_file_path => '/etc/barbican/healthcheck/disabled', + :disable_by_file_paths => ['9311:/etc/barbican/healthcheck/disabled'], } end it 'configures specified values' do is_expected.to contain_oslo__healthcheck('barbican_config').with( - :detailed => true, - :backends => ['disable_by_file'], - :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], - :disable_by_file_path => '/etc/barbican/healthcheck/disabled', - :disable_by_file_paths => ['9311:/etc/barbican/healthcheck/disabled'], + :detailed => true, + :backends => ['disable_by_file'], + :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], + :ignore_proxied_requests => false, + :disable_by_file_path => '/etc/barbican/healthcheck/disabled', + :disable_by_file_paths => ['9311:/etc/barbican/healthcheck/disabled'], ) end end