Skip to content

Commit

Permalink
Define the back end certifiate as a resource because there will only …
Browse files Browse the repository at this point in the history
…be one.
  • Loading branch information
Aethylred authored and Aaron Hicks committed Sep 29, 2014
1 parent 8046a26 commit 4f68995
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/mod/shib.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
$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'
){

Expand Down
14 changes: 14 additions & 0 deletions manifests/mod/shib/backend_cert.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class apache::mod::shib::backend_cert(
$sp_hostname = $fqdn
){

require apache::mod::shib

$sp_cert = "${apache::mod::shib::shib_conf_dir}/${apache::mod::shib::shib_sp_cert}"

exec{"shib_keygen_${sp_hostname}":
path => [$apache::mod::shib::shib_bin_dir,'/usr/bin','/bin'],
command => "shib-keygen -h ${sp_hostname} -e https://${sp_hostname}/shibbloeth",
unless => "openssl x509 -noout -in ${sp_cert} -issuer|grep ${sp_hostname}",
}
}

0 comments on commit 4f68995

Please sign in to comment.