From b971c6119371caad7dac47cd4a896ac6fe3f5251 Mon Sep 17 00:00:00 2001 From: Krzysztof Adamski Date: Sat, 12 Jan 2019 20:26:05 +0100 Subject: [PATCH] GUACAMOLE-683: Introduce support for openid authentication in docker build --- guacamole-docker/bin/build-guacamole.sh | 8 ++++ guacamole-docker/bin/start.sh | 62 +++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh index f72fb673d..c5ff255d4 100755 --- a/guacamole-docker/bin/build-guacamole.sh +++ b/guacamole-docker/bin/build-guacamole.sh @@ -126,3 +126,11 @@ if [ -f extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar ]; th mkdir -p "$DESTINATION/radius" cp extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar "$DESTINATION/radius" fi + +# Copy OPENID auth extension and schema modifications +# + +if [ -f extensions/guacamole-auth-openid/target/guacamole-auth-openid*.jar ]; then + mkdir -p "$DESTINATION/openid" + cp extensions/guacamole-auth-openid/target/guacamole-auth-openid*.jar "$DESTINATION/openid" +fi diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh index 0732283a7..2ed50a929 100755 --- a/guacamole-docker/bin/start.sh +++ b/guacamole-docker/bin/start.sh @@ -404,6 +404,62 @@ END ln -s /opt/guacamole/radius/guacamole-auth-*.jar "$GUACAMOLE_EXT" } +## Adds properties to guacamole.properties which select the OPENID +## authentication provider, and configure it to connect to the specified OPENID +## provider. +## +associate_openid() { + + # Verify required parameters are present + if [ -z "$OPENID_AUTHORIZATION_ENDPOINT" ] || \ + [ -z "$OPENID_JWKS_ENDPOINT" ] || \ + [ -z "$OPENID_ISSUER" ] || \ + [ -z "$OPENID_CLIENT_ID" ] || \ + [ -z "$OPENID_REDIRECT_URI" ] + then + cat <