Ensure no directory listing is active

By default, puppetlabs-apache module enables Indexes option, which can
lead in data/structure leak.

The following patch disable that option on a global base, since we
shouldn't need such a feature.

Closes-Bug: #1854442
Change-Id: Icba53f4e32237556608f4cb6dcd9da1a71705c19
(cherry picked from commit ad48860b75)
(cherry picked from commit 6357ffa748)
(cherry picked from commit 81c4ebddee)
(cherry picked from commit 728eb7f6ef)
This commit is contained in:
Cédric Jeanneret 2019-12-02 10:55:03 +01:00
parent 3ee8c4cfea
commit 6645ca3e30
3 changed files with 8 additions and 0 deletions

View File

@ -272,6 +272,7 @@ define openstacklib::wsgi::apache (
access_log_file => $access_log_file,
access_log_format => $access_log_format,
error_log_file => $error_log_file,
options => ['-Indexes', '+FollowSymLinks','+MultiViews'],
}
Package<| title == 'httpd' |>

View File

@ -0,0 +1,6 @@
---
security:
- Do not authorize directory listing
fixes:
- rhbz#1778052
- LP#1854442

View File

@ -89,6 +89,7 @@ describe 'openstacklib::wsgi::apache' do
'setenvif' => ['X-Forwarded-Proto https HTTPS=1'],
'access_log_file' => false,
'access_log_format' => false,
'options' => ['-Indexes', '+FollowSymLinks','+MultiViews'],
)}
it { is_expected.to contain_concat("#{platform_params[:httpd_ports_file]}") }
end