Skip to content

Commit 4c1691a

Browse files
committed
Fix issue 16 (#16) + some minor updates
1 parent 7bbac3f commit 4c1691a

File tree

7 files changed

+85
-28
lines changed

7 files changed

+85
-28
lines changed

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Ubuntu | guacamole:1.5.2 <br> guacamole:latest | guacamole:1.5.2-pg14 <br> guaca
1717
Alpine | N/A | guacamole:1.5.2-alpine | guacamole:1.5.2-alpine-pg15
1818

1919
# What's new / Changelog
20+
**2023-06-06** - FIX: Extensions were not properly cleaned between Guacamole versions bumps. This could create issues for example with multi-factor authentication. CAVEAT: if you use custom extensions, please make sure they contain the correct Guacamole version in their name (which was already the case to be honest). Thanks q20 for reporting the [issue](https://github.com/abesnier/docker-guacamole/issues/16).
21+
2022
**2023-05-31** - Updated to Guacamole 1.5.2
2123

2224
**2023-05-24** - Updated to Tomcat 9.0.75, S6 Overlay 3.1.5.0. Also added images that use PostgreSQL 15 (with Ubuntu and Alpine bases). Be careful! These images cannot be used as in-place replacement for another version of PostgreSQL, you need to follow [upgrade instructions](https://github.com/abesnier/docker-guacamole/blob/master/UPGRADE.md) (and backup and double backup!)
@@ -277,29 +279,29 @@ docker run \
277279
Currently the available extensions are:
278280

279281

280-
* [1.3.0] [1.4.0] [1.5.1] auth-ldap - [LDAP Authentication](https://guacamole.apache.org/doc/gug/ldap-auth.html)
282+
* [1.3.0] [1.4.0] [1.5.2] auth-ldap - [LDAP Authentication](https://guacamole.apache.org/doc/gug/ldap-auth.html)
281283

282-
* [1.3.0] [1.4.0] [1.5.1] auth-duo - [Duo two-factor authentication](https://guacamole.apache.org/doc/gug/duo-auth.html)
284+
* [1.3.0] [1.4.0] [1.5.2] auth-duo - [Duo two-factor authentication](https://guacamole.apache.org/doc/gug/duo-auth.html)
283285

284-
* [1.3.0] [1.4.0] [1.5.1] auth-header - [HTTP header authentication](https://guacamole.apache.org/doc/gug/header-auth.html)
286+
* [1.3.0] [1.4.0] [1.5.2] auth-header - [HTTP header authentication](https://guacamole.apache.org/doc/gug/header-auth.html)
285287

286-
* [1.3.0] [1.4.0] [1.5.1] auth-cas - [CAS Authentication](https://guacamole.apache.org/doc/gug/cas-auth.html)
288+
* [1.3.0] [1.4.0] [1.5.2] auth-cas - [CAS Authentication](https://guacamole.apache.org/doc/gug/cas-auth.html)
287289

288-
* [1.3.0] [1.4.0] [1.5.1] auth-openid - [OpenID Connect authentication](https://guacamole.apache.org/doc/gug/openid-auth.html)
290+
* [1.3.0] [1.4.0] [1.5.2] auth-openid - [OpenID Connect authentication](https://guacamole.apache.org/doc/gug/openid-auth.html)
289291

290-
* [1.3.0] [1.4.0] [1.5.1] auth-totp - [TOTP two-factor authentication](https://guacamole.apache.org/doc/gug/totp-auth.html)
292+
* [1.3.0] [1.4.0] [1.5.2] auth-totp - [TOTP two-factor authentication](https://guacamole.apache.org/doc/gug/totp-auth.html)
291293

292-
* [1.3.0] [1.4.0] [1.5.1] auth-quickconnect - [Ad-hoc connections extension](https://guacamole.apache.org/doc/gug/adhoc-connections.html)
294+
* [1.3.0] [1.4.0] [1.5.2] auth-quickconnect - [Ad-hoc connections extension](https://guacamole.apache.org/doc/gug/adhoc-connections.html)
293295

294-
* [1.3.0] [1.4.0] [1.5.1] auth-saml - [SAML Authentication](https://guacamole.apache.org/doc/gug/saml-auth.html)
296+
* [1.3.0] [1.4.0] [1.5.2] auth-saml - [SAML Authentication](https://guacamole.apache.org/doc/gug/saml-auth.html)
295297

296-
* [1.4.0] [1.5.1] auth-sso - SSO Authentication metapackage, contains classes for CAS, OpenID and SAML authentication (see links above)
298+
* [1.4.0] [1.5.2] auth-sso - SSO Authentication metapackage, contains classes for CAS, OpenID and SAML authentication (see links above)
297299

298-
* [1.4.0] [1.5.1] auth-json - [Encrypted JSON Authentication](https://guacamole.apache.org/doc/gug/json-auth.html)
300+
* [1.4.0] [1.5.2] auth-json - [Encrypted JSON Authentication](https://guacamole.apache.org/doc/gug/json-auth.html)
299301

300-
* [1.5.1] history-recording-storage - [In-application playback of recordings](https://guacamole.apache.org/doc/1.5.1/gug/recording-playback.html)
302+
* [1.5.2] history-recording-storage - [In-application playback of recordings](https://guacamole.apache.org/doc/1.5.1/gug/recording-playback.html)
301303

302-
* [1.5.1] vault - [Support for retrieving secrets from key vaults](https://guacamole.apache.org/doc/1.5.1/gug/vault.html)
304+
* [1.5.2] vault - [Support for retrieving secrets from key vaults](https://guacamole.apache.org/doc/1.5.1/gug/vault.html)
303305

304306
You should only enable the extensions you require, if an extensions is not configured correctly in the `guacamole.properties` file it may prevent the system from loading. See the [official documentation](https://guacamole.apache.org/doc/gug/) for more details.
305307

@@ -343,6 +345,23 @@ See [docker-compose.yml](https://github.com/abesnier/docker-guacamole/blob/maste
343345

344346
## Something's not working, what to do?
345347

348+
### I upgraded to a newer version of Guacamole and/or PostegreSQL, and 2FA Authentication does not work anymore.
349+
It is possible that after some upgrades, either in the Guacamole version, or to a newer PostgreSQL version (13 to 14 or 15, after you carefully follow the [instructions here](https://github.com/abesnier/docker-guacamole/blob/master/UPGRADE.md) for example), you are faced with an error mzessage after entering your TOTP token. Guacamole will display the message "Verification failed. Please try again.".
350+
351+
There are multiple causes to this issues I believe.
352+
353+
The first one was a slight oversight from my part during start-up of the container, and you are left with multiple versions of some extensions. Go to your /config/guacamole/extensions, and delete all extensions that do not contain the correct Guacamole version (1.5.2 at the time of writing this). This issue is now fixed, and extensions should be properly cleaned when the container starts again. So restart the container, and that should be it.
354+
355+
If cleaning does not solve the issue, then you will have to reset the TOTP secret for at least one admin user. This can be done in a one-liner:
356+
`docker exec -it guacamole bash -c "psql -U guacamole guacamole_db -c \"UPDATE guacamole_user_attribute SET attribute_value='false' WHERE attribute_name = 'guac-totp-key-confirmed' and user_id = (SELECT user_id FROM guacamole_user INNER JOIN guacamole_entity ON guacamole_entity.entity_id = guacamole_user.entity_id WHERE guacamole_entity.name = 'your username');\""`
357+
358+
Once executed, try to login with the user name you specified, and you will be prompted to register your MFA again:
359+
360+
![MFA Enrollment](https://guacamole.apache.org/doc/gug/_images/totp-enroll.png "MFA Enrollment prompt")
361+
362+
When your admin user has recovered access, he can go tio the admin panel and reset TOTP secret for other users. This will force users to re-enroll. See [documentation here](https://guacamole.apache.org/doc/gug/totp-auth.html#reseting-totp-data).
363+
364+
346365
### I can't find the session recordings in the History panel
347366

348367
One of the shiny new extensions shipped with version 1.5.1 is the [History Recording viewer](https://guacamole.apache.org/doc/1.5.1/gug/recording-playback.html) inside Guacamole itself.
@@ -483,7 +502,7 @@ To restore the database, copy the backup file in your mounted config folder, and
483502

484503
### Report an issue with the image
485504

486-
Have a look at the [Github repo](https://github.com/abesnier/docker-guacamole), and the [Issues](https://github.com/abesnier/docker-guacamole/issues)page.
505+
Have a look at the [Github repo](https://github.com/abesnier/docker-guacamole), and the [Issues](https://github.com/abesnier/docker-guacamole/issues) page.
487506

488507

489508
### Official support pages

UPGRADE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Well, a little. I can confirm these are the steps I followed for my use case, an
4444

4545
Postgresql documentation will recommend to use pg_dumpall or pg_upgrade, but none worked for me. So I reverted to the backup solution I already wrote in the [README](https://github.com/abesnier/docker-guacamole/tree/eb34d1dc10c63cc6f55eb146504ae8d4c235ad9a#back-up-the-config-folder-and-start-again), and it worked.
4646

47+
## This works, but MFA is broken
48+
I am not sure if this an issue with the upgrade process, or something else, but the solution is [here](https://github.com/abesnier/docker-guacamole/blob/master/README.md#somethings-not-working-what-to-do).
49+
4750
## "You're a moron and your steps did not work me"
4851

4952
Please raise an [issue](https://github.com/abesnier/docker-guacamole/issues), I will look at it and help you as much as possible.

root/etc/cont-init.d/50-extensions

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/with-contenv sh
22

3+
# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
4+
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
5+
6+
# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
37
# clean up extensions
4-
for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
5-
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
6-
done
8+
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
9+
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
10+
#done
711

12+
# this was from Oznu's image
813
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
914
#if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
1015
# rm -rf ${GUACAMOLE_HOME}/extensions/*

root_alpine/etc/cont-init.d/50-extensions

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/with-contenv sh
22

3+
# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
4+
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
5+
6+
# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
37
# clean up extensions
4-
for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
5-
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
6-
done
8+
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
9+
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
10+
#done
711

12+
# this was from Oznu's image
813
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
914
#if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
1015
# rm -rf ${GUACAMOLE_HOME}/extensions/*

root_alpine_pg15/etc/cont-init.d/50-extensions

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/with-contenv sh
22

3+
# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
4+
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
5+
6+
# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
37
# clean up extensions
4-
for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
5-
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
6-
done
8+
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
9+
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
10+
#done
711

12+
# this was from Oznu's image
813
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
914
#if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
1015
# rm -rf ${GUACAMOLE_HOME}/extensions/*

root_pg14/etc/cont-init.d/50-extensions

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
#!/usr/bin/with-contenv sh
22

3+
# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
4+
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
5+
6+
# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
37
# clean up extensions
4-
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording vault-ksm; do
5-
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-*.jar
6-
done
8+
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
9+
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
10+
#done
11+
12+
# this was from Oznu's image
13+
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
14+
#if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
15+
# rm -rf ${GUACAMOLE_HOME}/extensions/*
16+
#fi
717

818
# enable extensions
919
for i in $(echo "$EXTENSIONS" | tr "," " "); do

root_pg15/etc/cont-init.d/50-extensions

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
#!/usr/bin/with-contenv sh
22

3+
# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
4+
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
5+
6+
# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
37
# clean up extensions
4-
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording vault-ksm; do
5-
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-*.jar
6-
done
8+
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
9+
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
10+
#done
11+
12+
# this was from Oznu's image
13+
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
14+
#if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
15+
# rm -rf ${GUACAMOLE_HOME}/extensions/*
16+
#fi
717

818
# enable extensions
919
for i in $(echo "$EXTENSIONS" | tr "," " "); do

0 commit comments

Comments
 (0)