mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1218: Add auth-json extension and configuration to docker start & build scripts
This commit is contained in:
@@ -184,3 +184,11 @@ if [ -f extensions/guacamole-auth-cas/target/*.tar.gz ]; then
|
||||
"*.jar"
|
||||
fi
|
||||
|
||||
#
|
||||
# Copy json auth extension if it was built
|
||||
#
|
||||
|
||||
if [ -f extensions/guacamole-auth-json/target/guacamole-auth-json*.jar ]; then
|
||||
mkdir -p "$DESTINATION/json"
|
||||
cp extensions/guacamole-auth-json/target/guacamole-auth-json*.jar "$DESTINATION/json"
|
||||
fi
|
||||
|
@@ -687,6 +687,19 @@ END
|
||||
ln -s /opt/guacamole/cas/guacamole-auth-*.jar "$GUACAMOLE_EXT"
|
||||
}
|
||||
|
||||
##
|
||||
## Adds properties to guacamole.properties which configure the json
|
||||
## authentication provider.
|
||||
##
|
||||
associate_json() {
|
||||
# Update config file
|
||||
set_property "json-secret-key" "$JSON_SECRET_KEY"
|
||||
set_optional_property "json-trusted-networks" "$JSON_TRUSTED_NETWORKS"
|
||||
|
||||
# Add required .jar files to GUACAMOLE_EXT
|
||||
ln -s /opt/guacamole/json/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
|
||||
@@ -839,6 +852,11 @@ if [ -n "$CAS_AUTHORIZATION_ENDPOINT" ]; then
|
||||
associate_cas
|
||||
fi
|
||||
|
||||
# Use json-auth if specified.
|
||||
if [ -n "$JSON_SECRET_KEY" ]; then
|
||||
associate_json
|
||||
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