-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stripping out the shibboleth daemon config out into a separate module.
- Loading branch information
Aaron Hicks
committed
Sep 29, 2014
1 parent
207d316
commit 049fd54
Showing
10 changed files
with
9 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.