Skip to content

Commit 8f26de4

Browse files
authored
Merge pull request puppetlabs#1570 from bmjen/rel-prep
Release 1.11.0 Prep
2 parents b66ad26 + e9ca0ac commit 8f26de4

File tree

11 files changed

+143
-10
lines changed

11 files changed

+143
-10
lines changed

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
## Supported Release 1.11.0
2+
#### Summary
3+
This release adds SLES12 Support and many more features and bugfixes.
4+
5+
#### Features
6+
- (MODULES-4049) Adds SLES 12 Support
7+
- Adds additional directories options for LDAP Auth
8+
- `auth_ldap_url`
9+
- `auth_ldap_bind_dn`
10+
- `auth_ldap_bind_password`
11+
- `auth_ldap_group_attribute`
12+
- `auth_ldap_group_attribute_is_dn`
13+
- Allows `mod_event` parameters to be unset
14+
- Allows management of default root directory access rights
15+
- Adds class `apache::vhosts` to create apache::vhost resources
16+
- Adds class `apache::mod::proxy_wstunnel`
17+
- Adds class `apache::mod::dumpio`
18+
- Adds class `apache::mod::socache_shmcb`
19+
- Adds class `apache::mod::authn_dbd`
20+
- Adds support for apache 2.4 on Amazon Linux
21+
- Support the newer `mod_auth_cas` config options
22+
- Adds `wsgi_script_aliases_match` parameter to `apache::vhost`
23+
- Allow to override all SecDefaultAction attributes
24+
- Add audit_log_relevant_status parameter to apache::mod::security
25+
- Allow absolute path to $apache::mod::security::activated_rules
26+
- Allow setting SecAuditLog
27+
- Adds `passenger_max_instances_per_app` to `mod::passenger`
28+
- Allow the proxy_via setting to be configured
29+
- Allow no_proxy_uris to be used within proxy_pass
30+
- Add rpaf.conf template parameter to `mod::rpaf`
31+
- Allow user to specify alternative package and library names for shibboleth module
32+
- Allows configuration of shibboleth lib path
33+
- Adds parameter `passenger_data_buffer_dir` to `mod::passenger`
34+
- Adds SSL stapling
35+
- Allows use of `balance_manager` with `mod_proxy_balancer`
36+
- Raises lower bound of `stdlib` dependency to version 4.2
37+
- Adds support for Passenger repo on Amazon Linux
38+
- Add ability to set SSLStaplingReturnResponderErrors on server level
39+
- (MODULES-4213) Allow global rewrite rules inheritance in vhosts
40+
- Moves `mod_env` to its own class and load it when required
41+
42+
#### Bugfixes
43+
- Deny access to .ht and .hg, which are created by mercurial hg.
44+
- Instead of failing, include apache::mod::prefork in manifests/mod/itk.pp instead.
45+
- Only set SSLCompression when it is set to true.
46+
- Remove duplicate shib2 hash element
47+
- (MODULES-3388) Include mpm_module classes instead of class declaration
48+
- Updates `apache::balancer` to respect `apache::confd_dir`
49+
- Wrap mod_security directives in an IfModule
50+
- Fixes to various mods for Ubuntu Xenial
51+
- Fix /etc/modsecurity perms to match package
52+
- Fix PassengerRoot under Debian stretch
53+
- (MODULES-3476) Updates regex in apache_version custom fact to work with EL5
54+
- Dont sql_injection_attacks.data
55+
- Add force option to confd file resource to purge directory without warnings
56+
- Patch httpoxy through mod_security
57+
- Fixes config ordering of IncludeOptional
58+
- Fixes bug where port numbers were unquoted
59+
- Fixes bug where empty servername for vhost were written to template
60+
- Auto-load `slotmem_shm` and `lbmethod_byrequests` with `proxy_balancer` on 2.4
61+
- Simplify MPM setup on FreeBSD
62+
- Adds requirement for httpd package
63+
- Do not set ssl_certs_dir on FreeBSD
64+
- Fixes bug that produces a duplicate `Listen 443` after a package update on EL7
65+
- Fixes bug where custom facts break structured facts
66+
- Avoid relative classname inclusion
67+
- Fixes a failure in `vhost` if the first element of `$rewrites` is not a hash
68+
- (MODULES-3744) Process $crs_package before $modsec_dir
69+
- (MODULES-1491) Adds `::apache` include to mods that need it
70+
171
## Supported Release 1.10.0
272
#### Summary
373
This release fixes backwards compatibility bugs introduced in 1.9.0. Also includes a new mod class and a new vhost feature.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ group :development do
4747
gem 'rubocop-rspec', '~> 1.6', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
4848
gem 'pry', :require => false
4949
gem 'json_pure', '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
50+
gem 'fast_gettext', '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
51+
gem 'fast_gettext', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
5052
end
5153

5254
group :system_tests do

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
[`mod_dbd`]: http://httpd.apache.org/docs/current/mod/mod_dbd.html
167167
[`mod_disk_cache`]: https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html
168168
[`mod_dumpio`]: https://httpd.apache.org/docs/2.4/mod/mod_dumpio.html
169+
[`mod_env`]: http://httpd.apache.org/docs/current/mod/mod_env.html
169170
[`mod_expires`]: https://httpd.apache.org/docs/current/mod/mod_expires.html
170171
[`mod_ext_filter`]: https://httpd.apache.org/docs/current/mod/mod_ext_filter.html
171172
[`mod_fcgid`]: https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
@@ -323,6 +324,8 @@ class { 'apache':
323324
}
324325
```
325326

327+
> **Note**: When `default_vhost` is set to `false` you have to add at least one `apache::vhost` resource or Apache will not start.
328+
326329
## Usage
327330

328331
### Configuring virtual hosts
@@ -931,6 +934,8 @@ Configures a default virtual host when the class is declared. Valid options: Boo
931934

932935
To configure [customized virtual hosts][Configuring virtual hosts], set this parameter's value to false.
933936

937+
> **Note**: Apache will not start without at least one virtual host. If you set this to false be sure to configure one elsewhere.
938+
934939
##### `dev_packages`
935940

936941
Configures a specific dev package to use. Valid options: A string or array of strings. Default: Depends on the operating system.
@@ -1369,6 +1374,7 @@ The following Apache modules have supported classes, many of which allow for par
13691374
* `dir`\*
13701375
* `disk_cache` (see [`apache::mod::disk_cache`][])
13711376
* `dumpio` (see [`apache::mod::dumpio`][])
1377+
* `env`
13721378
* `event` (see [`apache::mod::event`][])
13731379
* `expires`
13741380
* `ext_filter` (see [`apache::mod::ext_filter`][])
@@ -2891,6 +2897,35 @@ apache::vhost { 'site.name.fdqn':
28912897

28922898
Refer to the [`mod_rewrite` documentation][`mod_rewrite`] for more details on what is possible with rewrite rules and conditions.
28932899

2900+
##### `rewrite_inherit`
2901+
2902+
Determines whether the virtual host inherits global rewrite rules. Default: false.
2903+
2904+
Rewrite rules may be specified globally (in `$conf_file` or `$confd_dir`) or inside the virtual host `.conf` file. By default, virtual hosts do not inherit global settings. To activate inheritance, specify the `rewrites` parameter and set `rewrite_inherit` parameter to `true`:
2905+
2906+
``` puppet
2907+
apache::vhost { 'site.name.fdqn':
2908+
2909+
rewrites => [
2910+
<rules>,
2911+
],
2912+
rewrite_inherit => true,
2913+
}
2914+
```
2915+
2916+
> **Note**: The `rewrites` parameter is **required** for this to have effect
2917+
2918+
###### Some background
2919+
2920+
Apache activates global `Rewrite` rules inheritance if the virtual host files contains the following directives:
2921+
2922+
``` ApacheConf
2923+
RewriteEngine On
2924+
RewriteOptions Inherit
2925+
```
2926+
2927+
Refer to the [official `mod_rewrite` documentation](https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html), section "Rewriting in Virtual Hosts".
2928+
28942929
##### `scriptalias`
28952930

28962931
Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', such as '/usr/scripts'. Default: undef.

manifests/default_mods.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
include ::apache::mod::authz_user
153153

154154
::apache::mod { 'authz_groupfile': }
155-
::apache::mod { 'env': }
155+
include ::apache::mod::env
156156
} elsif $mods {
157157
::apache::default_mods::load { $mods: }
158158

manifests/mod/env.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class apache::mod::env {
2+
::apache::mod { 'env': }
3+
}

manifests/vhost.pp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
$rewrite_base = undef,
104104
$rewrite_rule = undef,
105105
$rewrite_cond = undef,
106+
$rewrite_inherit = false,
106107
$setenv = [],
107108
$setenvif = [],
108109
$setenvifnocase = [],
@@ -539,11 +540,19 @@
539540
}
540541
}
541542

543+
# Check if mod_env is required and not yet loaded.
544+
# create an expression to simplify the conditional check
545+
$use_env_mod = $setenv and ! empty($setenv)
546+
if ($use_env_mod) {
547+
if ! defined(Class['apache::mod::env']) {
548+
include ::apache::mod::env
549+
}
550+
}
542551
# Check if mod_setenvif is required and not yet loaded.
543552
# create an expression to simplify the conditional check
544-
$use_setenv_mod = ($setenv and ! empty($setenv)) or ($setenvif and ! empty($setenvif)) or ($setenvifnocase and ! empty($setenvifnocase))
553+
$use_setenvif_mod = ($setenvif and ! empty($setenvif)) or ($setenvifnocase and ! empty($setenvifnocase))
545554

546-
if ($use_setenv_mod) {
555+
if ($use_setenvif_mod) {
547556
if ! defined(Class['apache::mod::setenvif']) {
548557
include ::apache::mod::setenvif
549558
}
@@ -907,7 +916,7 @@
907916
# Template uses:
908917
# - $setenv
909918
# - $setenvif
910-
if ($use_setenv_mod) {
919+
if ($use_env_mod or $use_setenvif_mod) {
911920
concat::fragment { "${name}-setenv":
912921
target => "${priority_real}${filename}.conf",
913922
order => 220,

metadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-apache",
3-
"version": "1.10.0",
3+
"version": "1.11.0",
44
"author": "puppetlabs",
55
"summary": "Installs, configures, and manages Apache virtual hosts, web services, and modules.",
66
"license": "Apache-2.0",
@@ -55,7 +55,8 @@
5555
{
5656
"operatingsystem": "SLES",
5757
"operatingsystemrelease": [
58-
"11 SP1"
58+
"11 SP1",
59+
"12"
5960
]
6061
},
6162
{

spec/acceptance/default_mods_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,18 @@ class { 'apache':
3434
default_mods => false,
3535
}
3636
apache::vhost { 'defaults.example.com':
37-
docroot => '#{$doc_root}/defaults',
38-
aliases => {
37+
docroot => '#{$doc_root}/defaults',
38+
aliases => {
3939
alias => '/css',
4040
path => '#{$doc_root}/css',
4141
},
42-
setenv => 'TEST1 one',
42+
directories => [
43+
{
44+
'path' => "#{$doc_root}/admin",
45+
'auth_basic_fake' => 'demo demopass',
46+
}
47+
],
48+
setenv => 'TEST1 one',
4349
}
4450
EOS
4551

spec/defines/vhost_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@
343343
'rewrite_base' => '/',
344344
'rewrite_rule' => '^index\.html$ welcome.html',
345345
'rewrite_cond' => '%{HTTP_USER_AGENT} ^MSIE',
346+
'rewrite_inherit' => true,
346347
'setenv' => ['FOO=/bin/true'],
347348
'setenvif' => 'Request_URI "\.gif$" object_is_image=gif',
348349
'setenvifnocase' => 'REMOTE_ADDR ^127.0.0.1 localhost=true',
@@ -453,6 +454,7 @@
453454
it { is_expected.to contain_class('apache::mod::fastcgi') }
454455
it { is_expected.to contain_class('apache::mod::headers') }
455456
it { is_expected.to contain_class('apache::mod::filter') }
457+
it { is_expected.to contain_class('apache::mod::env') }
456458
it { is_expected.to contain_class('apache::mod::setenvif') }
457459
it { is_expected.to contain_concat('30-rspec.example.com.conf').with({
458460
'owner' => 'root',
@@ -556,6 +558,8 @@
556558
it { is_expected.to contain_concat__fragment('rspec.example.com-rack') }
557559
it { is_expected.to contain_concat__fragment('rspec.example.com-redirect') }
558560
it { is_expected.to contain_concat__fragment('rspec.example.com-rewrite') }
561+
it { is_expected.to contain_concat__fragment('rspec.example.com-rewrite').with(
562+
:content => /^\s+RewriteOptions Inherit$/ ) }
559563
it { is_expected.to contain_concat__fragment('rspec.example.com-scriptalias') }
560564
it { is_expected.to contain_concat__fragment('rspec.example.com-serveralias') }
561565
it { is_expected.to contain_concat__fragment('rspec.example.com-setenv').with_content(

templates/vhost/_rewrite.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<%- if @rewrites -%>
22
## Rewrite rules
33
RewriteEngine On
4+
<%- if @rewrite_inherit -%>
5+
RewriteOptions Inherit
6+
<%- end -%>
47
<%- if @rewrite_base -%>
58
RewriteBase <%= @rewrite_base %>
69
<%- end -%>

templates/vhost/_ssl.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<%- if @ssl_openssl_conf_cmd -%>
4444
SSLOpenSSLConfCmd <%= @ssl_openssl_conf_cmd %>
4545
<%- end -%>
46-
<%- if not @ssl_stapling.nil? && scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
46+
<%- if (not @ssl_stapling.nil?) && (scope.function_versioncmp([@apache_version, '2.4']) >= 0) -%>
4747
SSLUseStapling <%= scope.function_bool2httpd([@ssl_stapling]) %>
4848
<%- end -%>
4949
<%- if @ssl_stapling_timeout && scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>

0 commit comments

Comments
 (0)