Skip to content

Commit

Permalink
GUACAMOLE-1020: Add Docker option to enable restrict module.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Mar 28, 2024
1 parent 041f034 commit b0731bb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions guacamole-docker/bin/build-guacamole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,12 @@ if [ -f extensions/guacamole-history-recording-storage/target/guacamole-history-
mkdir -p "$DESTINATION/recordings"
cp extensions/guacamole-history-recording-storage/target/guacamole-history-recording-storage*.jar "$DESTINATION/recordings"
fi

#
# Copy additional restriction module if it was built
#

if [ -f extensions/guacamole-auth-restrict/target/guacamole-auth-restrict*.jar ]; then
mkdir -p "$DESTINATION/restrict"
cp extensions/guacamole-auth-restrict/target/guacamole-auth-restrict*.jar "$DESTINATION/restrict"
fi
14 changes: 14 additions & 0 deletions guacamole-docker/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,15 @@ associate_recordings() {
ln -s /opt/guacamole/recordings/guacamole-history-recording-storage-*.jar "$GUACAMOLE_EXT"
}

##
## Adds in the JAR file for the additional restrictions module if requested
## by the Docker environment variable.
##
associate_restrict() {
# Add required .jar files to GUACAMOLE_EXT
ln -s /opt/guacamole/restrict/guacamole-auth-restrict-*.jar "$GUACAMOLE_EXT"
}

##
## Sets up Tomcat's remote IP valve that allows gathering the remote IP
## from headers set by a remote proxy
Expand Down Expand Up @@ -1189,6 +1198,11 @@ if [ -n "$RECORDING_SEARCH_PATH" ]; then
associate_recordings
fi

# Add in the additional restrction module if requested
if [ -n "$RESTRICT_ENABLED" ]; then
associate_restrict
fi

#
# Validate that at least one authentication backend is installed
#
Expand Down

0 comments on commit b0731bb

Please sign in to comment.