You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2020/03/04 20:18:30 UTC

[GitHub] [guacamole-client] necouchman commented on a change in pull request #471: GUACAMOLE-753: Add TOTP auth method to Docker image

necouchman commented on a change in pull request #471: GUACAMOLE-753: Add TOTP auth method to Docker image
URL: https://github.com/apache/guacamole-client/pull/471#discussion_r387911213
 
 

 ##########
 File path: guacamole-docker/bin/start.sh
 ##########
 @@ -536,6 +536,21 @@ END
 
 }
 
+##
+## Adds properties to guacamole.properties which configure the TOTP two-factor
+## authentication mechanism.
+##
+associate_totp() {
+    # Update config file
+    [ -n "$TOTP_ISSUER" ] && set_property "totp-issuer"    "$TOTP_ISSUER"
+    [ -n "$TOTP_DIGITS" ] && set_property "totp-digits"    "$TOTP_DIGITS"
+    [ -n "$TOTP_PERIOD" ] && set_property "totp-period"    "$TOTP_PERIOD"
+    [ -n "$TOTP_MODE" ]   && set_property "totp-mode"      "$TOTP_MODE"
 
 Review comment:
   Looking at the other sections (mostly above this), it looks like instead of doing
   ```
    [ -n "$TOTP_ISSUER" ] && set_property "totp-issuer"    "$TOTP_ISSUER"
   ```
   you should be able to do:
   ```
   set_optional_property "totp-issuer" "$TOTP_ISSUER"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services