From 0f31028565a539c25a9a67d72b4901db024506e1 Mon Sep 17 00:00:00 2001 From: Joern Lentes Date: Fri, 21 Dec 2018 11:15:25 +0100 Subject: [PATCH] GUACAMOLE-682: add option to include RADIUS authentication in docker To include library for RADIUS authentication in the docker image the build needs to activate the maven profile "lgpl-extentions" and copy the library into the image. The docker start script needs to pass through settings and link the library to GUACAMOLE_HOME. --- guacamole-docker/bin/build-guacamole.sh | 15 +++- guacamole-docker/bin/start.sh | 96 +++++++++++++++++++++++-- 2 files changed, 106 insertions(+), 5 deletions(-) diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh index 79115df41..1f4ab7798 100755 --- a/guacamole-docker/bin/build-guacamole.sh +++ b/guacamole-docker/bin/build-guacamole.sh @@ -53,7 +53,12 @@ mkdir -p "$DESTINATION" # cd "$BUILD_DIR" -mvn package + +if [ -z "$BUILD_PROFILE" ]; then + mvn package +else + mvn -P "$BUILD_PROFILE" package +fi # # Copy guacamole.war to destination @@ -107,3 +112,11 @@ tar -xzf extensions/guacamole-auth-ldap/target/*.tar.gz \ "*.jar" \ "*.ldif" +# +# Copy Radius auth extension if it was build +# + +if [[ "$BUILD_PROFILE ~= "lgpl-extentions" ]]; then + mkdir -p "$DESTINATION/radius" + cp extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar "$DESTINATION/radius" +fi diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh index 1fbcc8581..8fb3bc108 100755 --- a/guacamole-docker/bin/start.sh +++ b/guacamole-docker/bin/start.sh @@ -322,6 +322,88 @@ END } +## +## Adds properties to guacamole.properties which select the LDAP +## authentication provider, and configure it to connect to the specified LDAP +## directory. +## +associate_radius() { + + # Verify required parameters are present + if [ -z "$RADIUS_SHARED_SECRET" -o -z "$RADIUS_AUTH_PROTOCOL" ]; then + cat <