Skip to content

Commit

Permalink
Add the minimum required shibboleth declarations to directories hashe…
Browse files Browse the repository at this point in the history
…s. Ignored if mod_shib not defined.
  • Loading branch information
Aaron Hicks committed Sep 29, 2014
1 parent 4c8b6ad commit 318f5f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
# Is apache::mod::passenger enabled (or apache::mod['passenger'])
$passenger_enabled = defined(Apache::Mod['passenger'])

# Is apache::mod::shib enabled (or apache::mod['shib2'])
$shibboleth_enabled = defined(Apache::Mod['shib2'])

# Define log file names
if $access_log_file {
$access_log_destination = "${logroot}/${access_log_file}"
Expand Down Expand Up @@ -482,6 +485,7 @@
# - $docroot
# - $apache_version
# - $suphp_engine
# - $shibboleth_enabled
if $_directories and ! empty($_directories) {
concat::fragment { "${name}-directories":
target => "${priority_real}-${filename}.conf",
Expand Down
8 changes: 8 additions & 0 deletions templates/vhost/_directories.erb
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@
<%- end -%>
<%- end -%>
<%- end -%>
<%- if @shibboleth_enabled -%>
<%- if directory['shib_require_setting'] and ! directory['shib_require_setting'].empty? -%>
ShibRequireSetting <%- directory['shib_require_setting'] -%>
<%- end -%>
<%- if directory['shib_use_headers'] and ! directory['shib_use_headers'].empty? -%>
ShibUseHeaders <%- directory['shib_use_headers'] -%>
<%- end -%>
<%- end -%>
<%- if directory['custom_fragment'] -%>
<%= directory['custom_fragment'] %>
<%- end -%>
Expand Down

0 comments on commit 318f5f6

Please sign in to comment.