Skip to content

Commit

Permalink
Merge branch 'shibboleth-integration' of https://github.internet2.edu…
Browse files Browse the repository at this point in the history
…/TIER/midPoint_container into shibboleth-integration
  • Loading branch information
mederly committed Sep 19, 2018
2 parents 2387240 + a4e8783 commit 2351182
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
10 changes: 8 additions & 2 deletions grouper-midpoint/mp-gr/midpoint-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ FROM tier/shibboleth_sp

MAINTAINER info@evolveum.com

RUN yum -y install java-1.8.0-openjdk
RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
RUN curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo
RUN yum -y update
RUN yum -y install zulu-8

RUN yum -y install supervisor
COPY container_files/supervisor/supervisord.conf /etc/supervisord.conf

RUN rm /etc/shibboleth/sp-key.pem /etc/shibboleth/sp-cert.pem

Expand Down Expand Up @@ -59,4 +65,4 @@ ENV AJP_ENABLED true
ENV AJP_PORT 9090
ENV LOGOUT_URL https://localhost:4438/Shibboleth.sso/Logout

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/usr/bin/supervisord"]
32 changes: 20 additions & 12 deletions ...ntainer_files/usr-local-bin/entrypoint.sh → ...ntainer_files/supervisor/supervisord.conf
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/bin/bash
[supervisord]
nodaemon=true

. /usr/local/bin/library.sh
linkSecrets
[program:init]
command=/usr/local/bin/init.sh
autostart=true

. /usr/local/bin/library.sh
checkMidpointSecurityProfile
[program:httpd-shib]
command=httpd-shib-foreground
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true


httpd-shib-foreground &

java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
[program:midpoint]
command=/bin/bash -c "java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
-Dmidpoint.home=$MP_DIR/var \
-Dmidpoint.repository.database=mariadb \
-Dmidpoint.repository.jdbcUsername=$REPO_USER \
Expand All @@ -18,10 +22,14 @@ java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
-Dmidpoint.repository.hibernateHbm2ddl=none \
-Dmidpoint.repository.missingSchemaAction=create \
-Dmidpoint.repository.initializationFailTimeout=60000 \
-Dmidpoint.logging.console.enabled=true -Dmidpoint.logging.console.prefix="midpoint;midpoint.log;$ENV;$USERTOKEN;" -Dmidpoint.logging.console.timezone=UTC \
-Dmidpoint.logging.console.enabled=true -Dmidpoint.logging.console.prefix='midpoint;midpoint.log;$ENV;$USERTOKEN;' -Dmidpoint.logging.console.timezone=UTC \
-Dspring.profiles.active=$ACTIVE_PROFILE \
-Dauth.sso.header=$SSO_HEADER \
-Dauth.logout.url="$LOGOUT_URL" \
-Dauth.logout.url=$LOGOUT_URL \
-Dserver.tomcat.ajp.enabled=$AJP_ENABLED \
-Dserver.tomcat.ajp.port=$AJP_PORT \
-jar $MP_DIR/lib/midpoint.war
-jar $MP_DIR/lib/midpoint.war"
stdout_logfile=/dev/fd/2
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

. /usr/local/bin/library.sh
linkSecrets

. /usr/local/bin/library.sh
checkMidpointSecurityProfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ linkSecrets(){
local label_file=`basename $filepath`
local file=$(echo $label_file| cut -d'_' -f 2)

if [[ $label_file == shib_* ]]; then
if [ $label_file = shib_* ]; then
ln -sf /run/secrets/$label_file /etc/shibboleth/$file
elif [ "$label_file" == "host-key.pem" ]; then
elif [ "$label_file" = "host-key.pem" ]; then
ln -sf /run/secrets/host-key.pem /etc/pki/tls/private/host-key.pem
fi
done
}


checkMidpointSecurityProfile(){
if [[ $ACTIVE_PROFILE = *'sso'* ]]; then
if [ $ACTIVE_PROFILE = *'sso'* ]; then
cp /etc/httpd/possible-conf/midpoint-www-with-shibboleth-sso.conf /etc/httpd/conf.d/midpoint-www.conf
else
cp /etc/httpd/possible-conf/midpoint-www-without-shibboleth-sso.conf /etc/httpd/conf.d/midpoint-www.conf
fi
}
}

0 comments on commit 2351182

Please sign in to comment.