Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Script to modify SSO for working in tunelled training environment
ivan committed Nov 13, 2019
1 parent a81e1ed commit f7824f5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions demo/grouper/ssh-tunnel-redir-fix.sh
@@ -0,0 +1,23 @@
#!/bin/bash
# This file is used for trainings with SSH tunnels.
# It will change the hard-coded ports for Shibboleth, but will keep localhost.

declare -a fileList=(
"configs-and-secrets/midpoint/shibboleth/idp-metadata.xml"
"configs-and-secrets/grouper/shibboleth/idp-metadata.xml"
"idp/shibboleth-idp/metadata/idp-metadata.xml"
"idp/shibboleth-idp/metadata/grouper-sp.xml"
"idp/shibboleth-idp/metadata/midpoint-sp.xml"
"idp/shibboleth-idp/metadata/midpoint-sp-new.xml"
)

echo "Directory: $1";
for f in "${fileList[@]}"
do
echo "Replacing in: $1/$f..."
# We cannot SSH tunnel port 443 without root, so using 10443
sed -i 's#https://localhost/#https://localhost:10443/#g' $f
# sed -i 's#https://localhost:4443/#https://localhost:14443/#g' $f
done

exit

0 comments on commit f7824f5

Please sign in to comment.