Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Added more control for configure shib and httpd.
Browse files Browse the repository at this point in the history
Changed the variable for fqdn comanage in shibboleth2.xml
  • Loading branch information
villadalmine committed Sep 13, 2016
1 parent 0af123a commit b5dd760
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
7 changes: 6 additions & 1 deletion container_files/bin/configure_httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
log="/tmp/httpd.log"
date >> $log
echo "Configuring httpd: " >> $log

echo "Parsing COMANAGE_SERVER_FQDN to $COMANAGE_SERVER_FQDN in virtualhost 80 and 443" >> $log
sed -i "s|COMANAGE_SERVER_FQDN|$COMANAGE_SERVER_FQDN|g" /opt/etc/httpd/conf.d/virtual_host_80.conf >> $log
sed -i "s|COMANAGE_SERVER_FQDN|$COMANAGE_SERVER_FQDN|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log
echo "virtualhost parsed" >> $log
if [[ $CHANGE_TO_SSL_HTTPD_KEY && ${CHANGE_TO_SSL_HTTPD_KEY-x} ]]; then
echo "Parsing CHANGE_TO_SSL_HTTPD_KEY to $CHANGE_TO_SSL_HTTPD_KEY in virtual host 443" >> $log
sed -i "s|CHANGE_TO_SSL_HTTPD_KEY|$CHANGE_TO_SSL_HTTPD_KEY|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log
echo "key parsed in virtualhost 443" >> $log
else
echo "CHANGE_TO_SSL_HTTPD_KEY variable is not used" >> $log
fi
if [[ $CHANGE_TO_SSL_HTTPD_CERT && ${CHANGE_TO_SSL_HTTPD_CERT-x} ]]; then
echo "Parsing CHANGE_TO_SSL_HTTPD_CERT to $CHANGE_TO_SSL_HTTPD_CERT in virtualhost 443" >> $log
sed -i "s|CHANGE_TO_SSL_HTTPD_CERT|$CHANGE_TO_SSL_HTTPD_CERT|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log
echo "httpd cert parsed in virtualhost 443" >> $log
else
echo "CHANGE_TO_SSL_HTTPD_CERT variable is not used" >> $log
fi
Expand Down
13 changes: 10 additions & 3 deletions container_files/bin/configure_shibd.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash

log="/tmp/shibd.log"

date >> $log
echo "Configuring shibd: " > $log


if [[ $COMANAGE_SERVER_FQDN && ${COMANAGE_SERVER_FQDN-x} ]]; then
echo "Parsing COMANAGE_SERVER_FQDN to $COMANAGE_SERVER_FQDN in /etc/opt/shibboleth/shibboleth2.xml" >> $log
sed -i "s|COMANAGE_SERVER_FQDN|$COMANAGE_SERVER_FQDN|g" /opt/etc/shibboleth/shibboleth2.xml
echo "shibboleth2.xml parsed" >> $log
else
echo "Variable COMANAGE_SERVER_FQDN not found"
fi
echo "Shibboleth xml parsing finish"
date >> $log
4 changes: 2 additions & 2 deletions container_files/etc/shibboleth/shibboleth2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
clockSkew="180">

<ApplicationDefaults entityID="https://CHANGE_TO_COMANAGE_SERVER_FQDN/shibboleth"
<ApplicationDefaults entityID="https://COMANAGE_SERVER_FQDN/shibboleth"
REMOTE_USER="eppn persistent-id targeted-id">

<Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
checkAddress="false" handlerSSL="true" cookieProps="https">

<SSO discoveryProtocol="SAMLDS" discoveryURL="https://CHANGE_TO_COMANAGE_SERVER_FQDN/registry/pages/eds/index">
<SSO discoveryProtocol="SAMLDS" discoveryURL="https://COMANAGE_SERVER_FQDN/registry/pages/eds/index">
SAML2
</SSO>

Expand Down

0 comments on commit b5dd760

Please sign in to comment.