GUACAMOLE-919: Merge implement PostgreSQL defaultStatementTimeout and socketTimeout
diff --git a/Dockerfile b/Dockerfile
index 0943dc3..2b70f67 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -25,7 +25,7 @@
# such as `--build-arg TOMCAT_JRE=jre8-alpine`
#
ARG TOMCAT_VERSION=8.5
-ARG TOMCAT_JRE=jre8
+ARG TOMCAT_JRE=jdk8
# Use official maven image for the build
FROM maven:3-jdk-8 AS builder
diff --git a/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
index e34c3a6..dfee2f8 100644
--- a/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
@@ -14,18 +14,6 @@
"translations/en.json",
"translations/ja.json",
"translations/ru.json"
- ],
-
- "js" : [
- "cas.min.js"
- ],
-
- "css" : [
- "cas.min.css"
- ],
-
- "resources" : {
- "templates/casTicketField.html" : "text/html"
- }
+ ]
}
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java
index a27c2aa..f452319 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/java/org/apache/guacamole/auth/mysql/conf/MySQLEnvironment.java
@@ -369,7 +369,7 @@
* If guacamole.properties cannot be parsed.
*/
public File getMySQLSSLClientStore() throws GuacamoleException {
- return getProperty(MySQLGuacamoleProperties.MYSQL_SSL_TRUST_STORE);
+ return getProperty(MySQLGuacamoleProperties.MYSQL_SSL_CLIENT_STORE);
}
/**
@@ -384,7 +384,7 @@
* If guacamole.properties cannot be parsed.
*/
public String getMYSQLSSLClientPassword() throws GuacamoleException {
- return getProperty(MySQLGuacamoleProperties.MYSQL_SSL_TRUST_PASSWORD);
+ return getProperty(MySQLGuacamoleProperties.MYSQL_SSL_CLIENT_PASSWORD);
}
@Override
diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh
index 532bd42..5ee3115 100755
--- a/guacamole-docker/bin/build-guacamole.sh
+++ b/guacamole-docker/bin/build-guacamole.sh
@@ -168,3 +168,19 @@
mkdir -p "$DESTINATION/header"
cp extensions/guacamole-auth-header/target/guacamole-auth-header*.jar "$DESTINATION/header"
fi
+
+#
+# Copy CAS auth extension if it was built
+#
+
+if [ -f extensions/guacamole-auth-cas/target/*.tar.gz ]; then
+ mkdir -p "$DESTINATION/cas"
+ tar -xzf extensions/guacamole-auth-cas/target/*.tar.gz \
+ -C "$DESTINATION/cas/" \
+ --wildcards \
+ --no-anchored \
+ --no-wildcards-match-slash \
+ --strip-components=1 \
+ "*.jar"
+fi
+
diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh
index cf82987..95b8763 100755
--- a/guacamole-docker/bin/start.sh
+++ b/guacamole-docker/bin/start.sh
@@ -661,6 +661,38 @@
}
##
+## 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
## last function run within the script.
@@ -807,6 +839,11 @@
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