From 9884b77218d21f460eee1696a6eb8b5ecff390bd Mon Sep 17 00:00:00 2001 From: Tom Maguire Date: Tue, 3 Jan 2023 16:50:41 +0000 Subject: [PATCH] Added section to handle SAML authentication upgrade --- guac-upgrade.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/guac-upgrade.sh b/guac-upgrade.sh index 29d20e2..20799ac 100755 --- a/guac-upgrade.sh +++ b/guac-upgrade.sh @@ -197,6 +197,27 @@ for file in /etc/guacamole/extensions/guacamole-auth-duo*.jar; do fi done +# Handle upgrading SAML plugin if present +for file in /etc/guacamole/extensions/guacamole-auth-saml*.jar; do + if [[ -f $file ]]; then + # Upgrade SAML + echo -e "${BLUE}SAML extension was found, upgrading...${NC}" + rm /etc/guacamole/extensions/guacamole-auth-saml*.jar + wget -q --show-progress -O guacamole-auth-saml-${GUACVERSION}.tar.gz ${SERVER}/binary/guacamole-auth-saml-${GUACVERSION}.tar.gz + if [ $? -ne 0 ]; then + echo -e "${RED}Failed to download guacamole-auth-saml-${GUACVERSION}.tar.gz" + echo -e "${SERVER}/binary/guacamole-auth-saml-${GUACVERSION}.tar.gz" + exit 1 + fi + echo -e "${GREEN}Downloaded guacamole-auth-saml-${GUACVERSION}.tar.gz${NC}" + tar -xzf guacamole-auth-saml-${GUACVERSION}.tar.gz + cp guacamole-auth-saml-${GUACVERSION}/guacamole-auth-saml-${GUACVERSION}.jar /etc/guacamole/extensions/ + echo -e "${GREEN}SAML copied to extensions.${NC}" + + break + fi +done + # Fix for #196 mkdir -p /usr/sbin/.config/freerdp chown daemon:daemon /usr/sbin/.config/freerdp