mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1082: guacamole-docker scripts with guacamole-auth-cas
This commit is contained in:
@@ -652,6 +652,38 @@ associate_header() {
|
||||
ln -s /opt/guacamole/header/guacamole-auth-*.jar "$GUACAMOLE_EXT"
|
||||
}
|
||||
|
||||
##
|
||||
## Adds properties to guacamole.properties witch configure the CAS
|
||||
## authentication service.
|
||||
##
|
||||
associate_cas() {
|
||||
# Verify required parameters are present
|
||||
if [ -z "$CAS_AUTHORIZATION_ENDPOINT" ] || \
|
||||
[ -z "$CAS_REDIRECT_URI" ]
|
||||
then
|
||||
cat <<END
|
||||
FATAL: Missing required environment variables
|
||||
-----------------------------------------------------------------------------------
|
||||
If using the CAS authentication extension, you must provide each of the
|
||||
following environment variables:
|
||||
|
||||
CAS_AUTHORIZATION_ENDPOINT The URL of the CAS authentication server.
|
||||
|
||||
CAS_REDIRECT_URI The URI to redirect back to upon successful authentication.
|
||||
|
||||
END
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Update config file
|
||||
set_property "cas-authorization-endpoint" "$CAS_AUTHORIZATION_ENDPOINT"
|
||||
set_property "cas-redirect-uri" "$CAS_REDIRECT_URI"
|
||||
set_optional_property "cas-clearpass-key" "$CAS_CLEARPASS_KEY"
|
||||
|
||||
# Add required .jar files to GUACAMOLE_EXT
|
||||
ln -s /opt/guacamole/cas/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
|
||||
@@ -799,6 +831,11 @@ if [ "$HEADER_ENABLED" = "true" ]; then
|
||||
associate_header
|
||||
fi
|
||||
|
||||
# Use CAS if specified.
|
||||
if [ -n "$CAS_AUTHORIZATION_ENDPOINT" ]; then
|
||||
associate_cas
|
||||
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