You could use docker-compose to "volume" mount the user-mapping.xml file to
/etc/guacamole, and that should work for what you're trying to accomplish.
If you don't provide it postgres or any hints that your trying to do
another auth system, it should fall back to the XML file. (See
https://guacamole.apache.org/doc/gug/configuring-guacamole.html )


You shouldn't need any of the postgres and environment rewrites or your
extension...I don't think the JSON approach is a great idea based on your
requirements, it's probably overall more complicated than using postgres,
as it has a different use case



On Mon, Jun 13, 2022, 3:35 AM Rick . <rille_p...@hotmail.com> wrote:

> Hi
> What I'm trying to do is to run guacamole in docker and then feed it with
> a list of connections on startup in a simple way.
>
> A couple of questions:
>
> 1. I found a github repository (
> https://github.com/boschkundendienst/guacamole-docker-compose) that sets
> things up pretty nicely. It has a docker-compose that uses guacd, postgres,
> guacamole and nginx containers. Would it be possible to replace the use of
> postgres with json in this scenario (for authentication and feeding the
> container with connections)?
>
> 2. Assuming that should work. What is the best way to enable
> json-authentification when running things in docker?
>
> When I try to understand the documentation it seems I would need to
> override GUACAMOLE_HOME in some way. So I tried creating a .guacamole
> folder in the home directory where I put a guacamole-properties file only
> containing the following line: json-secret-key: <<my generated 32-digit hex
> value key>>. I also created an extensions folder where I put the
> guacamole-auth-json-1.4.0.jar file. And in the docker-compose file I
> replace the POSTGRES-variables with "GUACAMOLE: ~/.guacamole" to the
> environment part for the guacamole container But then the guacamole
> container won't start and when checking by clicking on the container in
> docker desktop it gives the folowing error:
>
> "FATAL: No authentication configured
> The Guacamole Docker container needs at least one authentication mechanism
> in order to function, such as a MySQL database,
> PostgreSQL database, LDAP directory or RADIUS server. Please specify at
> least the MYSQL_DATABASE or POSTGRES_DATABASE environment
> variables, or check Guacamole's Docker documentation regarding configuring
> LDAP and/or custom extensions."
>
> So it seems that my attempt at overriding doesn't quite take effect...
>
> I have also attempted to run the compose as is (but with the "GUACAMOLE:
> ~/.guacamole" part added) and then running
> "curl --data-urlencode "<<my_encrypted_json>>"
> http://localhost:8443/guacamole/api/tokens"; in an attempt to feed it with
> connections but then there is an authentication issue for that... Which I
> assume is also because my attempt at an override isn't working.
>
> TL;DR
> 1. Is it possible to run a combo of guacd, guacamole, nginx in docker and
> using json for authentication and feeding the guacamole container with
> users/connections?
> 2. If possible: how do I enable json-authentification when running
> guacamole in a docker container?
>
> Oh, and please explain to me like i'm 10. New to docker and very new to
> guacamole...
>
> /Rick
>

Reply via email to