mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-753: Merge add TOTP auth method to Docker image
This commit is contained in:
@@ -127,6 +127,7 @@ if [ -f extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar ]; th
|
|||||||
cp extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar "$DESTINATION/radius"
|
cp extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar "$DESTINATION/radius"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
# Copy OPENID auth extension and schema modifications
|
# Copy OPENID auth extension and schema modifications
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -135,6 +136,15 @@ if [ -f extensions/guacamole-auth-openid/target/guacamole-auth-openid*.jar ]; th
|
|||||||
cp extensions/guacamole-auth-openid/target/guacamole-auth-openid*.jar "$DESTINATION/openid"
|
cp extensions/guacamole-auth-openid/target/guacamole-auth-openid*.jar "$DESTINATION/openid"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copy TOTP auth extension if it was built
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -f extensions/guacamole-auth-totp/target/guacamole-auth-totp*.jar ]; then
|
||||||
|
mkdir -p "$DESTINATION/totp"
|
||||||
|
cp extensions/guacamole-auth-totp/target/guacamole-auth-totp*.jar "$DESTINATION/totp"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy Duo auth extension if it was built
|
# Copy Duo auth extension if it was built
|
||||||
#
|
#
|
||||||
|
@@ -536,6 +536,21 @@ END
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##
|
||||||
|
## Adds properties to guacamole.properties which configure the TOTP two-factor
|
||||||
|
## authentication mechanism.
|
||||||
|
##
|
||||||
|
associate_totp() {
|
||||||
|
# Update config file
|
||||||
|
set_optional_property "totp-issuer" "$TOTP_ISSUER"
|
||||||
|
set_optional_property "totp-digits" "$TOTP_DIGITS"
|
||||||
|
set_optional_property "totp-period" "$TOTP_PERIOD"
|
||||||
|
set_optional_property "totp-mode" "$TOTP_MODE"
|
||||||
|
|
||||||
|
# Add required .jar files to GUACAMOLE_EXT
|
||||||
|
ln -s /opt/guacamole/totp/guacamole-auth-*.jar "$GUACAMOLE_EXT"
|
||||||
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
## Adds properties to guacamole.properties which configure the Duo two-factor
|
## Adds properties to guacamole.properties which configure the Duo two-factor
|
||||||
## authentication service. Checks to see if all variables are defined and makes sure
|
## authentication service. Checks to see if all variables are defined and makes sure
|
||||||
@@ -707,6 +722,11 @@ END
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Use TOTP if specified.
|
||||||
|
if [ "$TOTP_ENABLED" = "true" ]; then
|
||||||
|
associate_totp
|
||||||
|
fi
|
||||||
|
|
||||||
# Use Duo if specified.
|
# Use Duo if specified.
|
||||||
if [ -n "$DUO_API_HOSTNAME" ]; then
|
if [ -n "$DUO_API_HOSTNAME" ]; then
|
||||||
associate_duo
|
associate_duo
|
||||||
|
Reference in New Issue
Block a user