mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-857: Merge add guacamole-auth-header to Docker image
This commit is contained in:
@@ -159,3 +159,12 @@ if [ -f extensions/guacamole-auth-duo/target/*.tar.gz ]; then
|
||||
--strip-components=1 \
|
||||
"*.jar"
|
||||
fi
|
||||
|
||||
#
|
||||
# Copy header auth extension if it was built
|
||||
#
|
||||
|
||||
if [ -f extensions/guacamole-auth-header/target/guacamole-auth-header*.jar ]; then
|
||||
mkdir -p "$DESTINATION/header"
|
||||
cp extensions/guacamole-auth-header/target/guacamole-auth-header*.jar "$DESTINATION/header"
|
||||
fi
|
||||
|
@@ -640,6 +640,18 @@ END
|
||||
ln -s /opt/guacamole/duo/guacamole-auth-*.jar "$GUACAMOLE_EXT"
|
||||
}
|
||||
|
||||
##
|
||||
## Adds properties to guacamole.properties which configure the header
|
||||
## authentication provider.
|
||||
##
|
||||
associate_header() {
|
||||
# Update config file
|
||||
set_optional_property "http-auth-header" "$HTTP_AUTH_HEADER"
|
||||
|
||||
# Add required .jar files to GUACAMOLE_EXT
|
||||
ln -s /opt/guacamole/header/guacamole-auth-*.jar "$GUACAMOLE_EXT"
|
||||
}
|
||||
|
||||
##
|
||||
## Starts Guacamole under Tomcat, replacing the current process with the
|
||||
## Tomcat process. As the current process will be replaced, this MUST be the
|
||||
@@ -782,6 +794,11 @@ if [ -n "$DUO_API_HOSTNAME" ]; then
|
||||
associate_duo
|
||||
fi
|
||||
|
||||
# Use header if specified.
|
||||
if [ "$HEADER_ENABLED" = "true" ]; then
|
||||
associate_header
|
||||
fi
|
||||
|
||||
# Set logback level if specified
|
||||
if [ -n "$LOGBACK_LEVEL" ]; then
|
||||
unzip -o -j /opt/guacamole/guacamole.war WEB-INF/classes/logback.xml -d $GUACAMOLE_HOME
|
||||
|
Reference in New Issue
Block a user