Skip to content

Commit

Permalink
Stripping out the shibboleth daemon config out into a separate module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Hicks committed Sep 29, 2014
1 parent 207d316 commit 049fd54
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 809 deletions.
85 changes: 7 additions & 78 deletions manifests/mod/shib.pp
Original file line number Diff line number Diff line change
@@ -1,86 +1,15 @@
class apache::mod::shib(
$shib_admin = $apache::serveradmin,
$shib_hostname = $::fqdn,
$logoLocation = '/shibboleth-sp/logo.jpg',
$styleSheet = '/shibboleth-sp/main.css',
$shib_conf_dir = '/etc/shibboleth',
$shib_conf_file = 'shibboleth2.xml',
$shib_sp_cert = 'sp-cert.pem',
$shib_bin_dir = '/usr/sbin',
$handlerSSL = true,
$consistent_address = true
){
class apache::mod::shib (
$suppress_warning = false,
) {

if $::osfamily == 'RedHat' and ! $suppress_warning {
warning('RedHat distributions do not have Apache mod_shib in their default package repositories.')
}

$shib_conf = "${shib_conf_dir}/${shib_conf_file}"
$mod_shib = 'shib2'

apache::mod {$mod_shib:
id => 'mod_shib',
}

# by requiring the Apache::Mod, this should wait for the package
# to create the directory and not need to manage it
file{$shib_conf_dir:
ensure => 'directory',
require => Apache::Mod[$mod_shib]
}

# by requiring the Apache::Mod, this will just define the file
# created when installing the package.
file{$shib_conf:
ensure => 'file',
replace => false,
require => [Apache::Mod[$mod_shib],File[$shib_conf_dir]],
}

# augeas should auto-require the file $shib_conf
augeas{'shib_SPconfig_errors':
lens => 'Xml.lns',
incl => $shib_conf,
context => "/files${shib_conf}/SPConfig/ApplicationDefaults",
changes => [
"set Errors/#attribute/supportContact ${shib_admin}",
"set Errors/#attribute/logoLocation ${logoLocation}",
"set Errors/#attribute/styleSheet ${styleSheet}",
],
notify => Service['httpd','shibd'],
}

augeas{'shib_SPconfig_consistent_address':
lens => 'Xml.lns',
incl => $shib_conf,
context => "/files${shib_conf}/SPConfig/ApplicationDefaults",
changes => [
"set Sessions/#attribute/consistentAddress ${consistent_address}",
],
notify => Service['httpd','shibd'],
}

augeas{'shib_SPconfig_hostname':
lens => 'Xml.lns',
incl => $shib_conf,
context => "/files${shib_conf}/SPConfig/ApplicationDefaults",
changes => [
"set #attribute/entityID https://${shib_hostname}/shibboleth",
"set Sessions/#attribute/handlerURL https://${shib_hostname}/Shibboleth.sso",
],
notify => Service['httpd','shibd'],
}

augeas{'shib_SPconfig_handlerSSL':
lens => 'Xml.lns',
incl => $shib_conf,
context => "/files${shib_conf}/SPConfig/ApplicationDefaults",
changes => ["set Sessions/#attribute/handlerSSL ${handlerSSL}",],
notify => Service['httpd','shibd'],
}

service{'shibd':
ensure => 'running',
enable => true,
hasrestart => true,
hasstatus => true,
require => Apache::Mod[$mod_shib],
}

}
32 changes: 0 additions & 32 deletions manifests/mod/shib/attribute_map.pp

This file was deleted.

18 changes: 0 additions & 18 deletions manifests/mod/shib/backend_cert.pp

This file was deleted.

58 changes: 0 additions & 58 deletions manifests/mod/shib/metadata.pp

This file was deleted.

39 changes: 0 additions & 39 deletions manifests/mod/shib/sso.pp

This file was deleted.

64 changes: 0 additions & 64 deletions spec/classes/mod/shib/backend_cert_spec.rb

This file was deleted.

Loading

0 comments on commit 049fd54

Please sign in to comment.