From f7824f5f6fc6558ef6fc3ad33d4f75d7eca725be Mon Sep 17 00:00:00 2001 From: Ivan Noris Date: Wed, 13 Nov 2019 07:39:46 +0000 Subject: [PATCH] Script to modify SSO for working in tunelled training environment --- demo/grouper/ssh-tunnel-redir-fix.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 demo/grouper/ssh-tunnel-redir-fix.sh diff --git a/demo/grouper/ssh-tunnel-redir-fix.sh b/demo/grouper/ssh-tunnel-redir-fix.sh new file mode 100755 index 0000000..41b0bfa --- /dev/null +++ b/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