diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index 0198f4f0..d4ce8141 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -13,6 +13,11 @@ # that information back as part of a request. # Defaults to $facts['os_service_default'] # +# [*allowed_source_ranges*] +# (Optional) A list of network addresses to limit source ip allowed to access +# healthcheck information. +# 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. @@ -26,6 +31,7 @@ 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'], ) { @@ -35,6 +41,7 @@ class barbican::healthcheck ( 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, } diff --git a/releasenotes/notes/healthcheck-allowed_source_ranges-964b9715ff647a42.yaml b/releasenotes/notes/healthcheck-allowed_source_ranges-964b9715ff647a42.yaml new file mode 100644 index 00000000..4fab5e48 --- /dev/null +++ b/releasenotes/notes/healthcheck-allowed_source_ranges-964b9715ff647a42.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``barbican::healthcheck::allowed_source_ranges`` parameter has been + added. diff --git a/spec/classes/barbican_healthcheck_spec.rb b/spec/classes/barbican_healthcheck_spec.rb index 8634264e..fa8688cd 100644 --- a/spec/classes/barbican_healthcheck_spec.rb +++ b/spec/classes/barbican_healthcheck_spec.rb @@ -13,6 +13,7 @@ describe 'barbican::healthcheck' do is_expected.to contain_oslo__healthcheck('barbican_config').with( :detailed => '', :backends => '', + :allowed_source_ranges => '', :disable_by_file_path => '', :disable_by_file_paths => '', ) @@ -24,6 +25,7 @@ describe 'barbican::healthcheck' 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'], } @@ -33,6 +35,7 @@ describe 'barbican::healthcheck' 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'], )