You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Scott Hancock <sh...@gmail.com> on 2020/05/22 16:52:50 UTC
Using Docker Images with XML Authentication
Hi,
I’m trying the Guacamole docker images. To simplify things I’d like to just use the default XML authentication rather than a database. Is there a way to configure the docker images to use xml instead of database for authentication?
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Using Docker Images with XML Authentication
Posted by Dashamir Hoxha <da...@gmail.com>.
On Tue, May 26, 2020 at 11:44 PM Scott Hancock <sh...@gmail.com> wrote:
> I’ve been trying to get this to work but it appears that /etc/guacamole
> doesn’t exist on the guacamole image. Unless it’s set up on first run.
>
You are right. It seems that it uses a different location:
https://github.com/apache/guacamole-client/blob/1.1.0/guacamole-docker/bin/start.sh#L33
Maybe you need to customize this script by commenting out this `if`:
https://github.com/apache/guacamole-client/blob/1.1.0/guacamole-docker/bin/start.sh#L685-L700
This is the problem with docker containers, that usually they make things
unnecessarily complicated.
Have also a look at this container, maybe it suits you better:
https://gitlab.com/docker-scripts/guacamole
Dashamir
>
Re: Using Docker Images with XML Authentication
Posted by Dashamir Hoxha <da...@gmail.com>.
On Sat, May 23, 2020 at 7:36 AM ivanmarcus <iv...@yahoo.com.invalid>
wrote:
> Like Sean I've not done anything much with the Docker image - in fact I've
> never used it.
>
> However I did try converting an Ubuntu 20.04 Guacamole VM with MySQL auth
> to use the user-mapping.xml file.
>
> The following seemed to work:
>
>
> mv /etc/guacamole/extensions/guacamole-auth-jdbc-mysql-1.1.0.jar /home/
> (moved rather than deleted as I wanted to put it back after this test!)
>
> mv /etc/guacamole/guacamole.properties /home (as above)
>
> nano /etc/guacamole/user-mapping.xml (create the necessary user detail in
> this file etc)
>
> service guacd restart
>
> service tomcat9 restart
>
>
> After this I was able to log into Guacamole with the user-mapping
> user/pass, and was at the login page for an RDP target I had running. I
> didn't go any further but have no reason to assume it wouldn't work as
> advertised from there.
>
> That said, I'm not totally certain that's all that'd be required, you may
> find something else you need to do. Either way if you do successfully
> modify the image it'd be useful if you posted your findings/method back to
> the list in case anyone else wants to do this, thanks.
>
According to the docs that's all that is required:
http://guacamole.apache.org/doc/gug/configuring-guacamole.html#basic-auth
To customize the default docker image you can use a `Dockerfile` like this:
```
FROM guacamole/guacamole
RUN rm /etc/guacamole/guacamole.properties
```
Then build the modified image: `docker build -t guacamole/guacamole:custom`
I believe that's all that is needed. You also have to use the environment
variables GUACD_HOSTNAME and GUACD_PORT, as explained here:
http://guacamole.apache.org/doc/gug/guacamole-docker.html#guacamole-docker-guacd
Also use the image `guacamole/guacamole:custom` instead of
`guacamole/guacamole`.
Regards,
Dashamir
AW: Using Docker Images with XML Authentication
Posted by Joachim Lindenberg <jo...@lindenberg.one>.
I also never tried xml authentication with docker, but as I am using docker setups only, I experienced that the docker images don´t use /etc/guacamole as I expected it to work following the documentation. I got it to work by explicitly defining GUACAMOLE_HOME=/etc/guacamole in my docker-compose.yaml.
Best Regards,
Joachim
Von: ivanmarcus <iv...@yahoo.com.INVALID>
Gesendet: Samstag, 23. Mai 2020 07:36
An: user@guacamole.apache.org
Betreff: Re: Using Docker Images with XML Authentication
Like Sean I've not done anything much with the Docker image - in fact I've never used it.
However I did try converting an Ubuntu 20.04 Guacamole VM with MySQL auth to use the user-mapping.xml file.
The following seemed to work:
mv /etc/guacamole/extensions/guacamole-auth-jdbc-mysql-1.1.0.jar /home/ (moved rather than deleted as I wanted to put it back after this test!)
mv /etc/guacamole/guacamole.properties /home (as above)
nano /etc/guacamole/user-mapping.xml (create the necessary user detail in this file etc)
service guacd restart
service tomcat9 restart
After this I was able to log into Guacamole with the user-mapping user/pass, and was at the login page for an RDP target I had running. I didn't go any further but have no reason to assume it wouldn't work as advertised from there.
That said, I'm not totally certain that's all that'd be required, you may find something else you need to do. Either way if you do successfully modify the image it'd be useful if you posted your findings/method back to the list in case anyone else wants to do this, thanks.
On 23/05/2020 1:56 p.m., Sean Reid wrote:
Hi Scott,
It doesn't seem like the Docker images support this. I've never tried to do this myself with the Docker image, but looking quickly at the bin/start.sh <https://github.com/apache/guacamole-client/blob/1.1.0/guacamole-docker/bin/start.sh> script that starts guacamole when the docker image starts up, it looks like you'd need to build a docker image yourself with some changes to that script so that it doesn't require database information. There are probably some other changes you'd need to make too, but they didn't jump out at me as quickly.
Once you've made those changes the start script, you could then either build a copy of your user-mappings.xml permanently into your custom image, or you could mount the file at "docker run" time with a the "-v" option passed to docker.
I hope this at least gives you a little bit of an idea for a path forward,
Sean
On Fri, May 22, 2020 at 12:52 PM Scott Hancock <shwork96@gmail.com <ma...@gmail.com> > wrote:
Hi,
I’m trying the Guacamole docker images. To simplify things I’d like to just use the default XML authentication rather than a database. Is there a way to configure the docker images to use xml instead of database for authentication?
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org <ma...@guacamole.apache.org>
For additional commands, e-mail: user-help@guacamole.apache.org <ma...@guacamole.apache.org>
Re: Using Docker Images with XML Authentication
Posted by ivanmarcus <iv...@yahoo.com.INVALID>.
Like Sean I've not done anything much with the Docker image - in fact
I've never used it.
However I did try converting an Ubuntu 20.04 Guacamole VM with MySQL
auth to use the user-mapping.xml file.
The following seemed to work:
mv /etc/guacamole/extensions/guacamole-auth-jdbc-mysql-1.1.0.jar /home/
(moved rather than deleted as I wanted to put it back after this test!)
mv /etc/guacamole/guacamole.properties /home (as above)
nano /etc/guacamole/user-mapping.xml (create the necessary user detail
in this file etc)
service guacd restart
service tomcat9 restart
After this I was able to log into Guacamole with the user-mapping
user/pass, and was at the login page for an RDP target I had running. I
didn't go any further but have no reason to assume it wouldn't work as
advertised from there.
That said, I'm not totally certain that's all that'd be required, you
may find something else you need to do. Either way if you do
successfully modify the image it'd be useful if you posted your
findings/method back to the list in case anyone else wants to do this,
thanks.
On 23/05/2020 1:56 p.m., Sean Reid wrote:
> Hi Scott,
>
> It doesn't seem like the Docker images support this. I've never tried
> to do this myself with the Docker image, but looking quickly at the
> bin/start.sh
> <https://github.com/apache/guacamole-client/blob/1.1.0/guacamole-docker/bin/start.sh>
> script that starts guacamole when the docker image starts up, it looks
> like you'd need to build a docker image yourself with some changes to
> that script so that it doesn't require database information. There are
> probably some other changes you'd need to make too, but they didn't
> jump out at me as quickly.
>
> Once you've made those changes the start script, you could then either
> build a copy of your user-mappings.xml permanently into your
> custom image, or you could mount the file at "docker run" time with a
> the "-v" option passed to docker.
>
> I hope this at least gives you a little bit of an idea for a path forward,
> Sean
>
>
> On Fri, May 22, 2020 at 12:52 PM Scott Hancock <shwork96@gmail.com
> <ma...@gmail.com>> wrote:
>
> Hi,
>
> I’m trying the Guacamole docker images. To simplify things I’d
> like to just use the default XML authentication rather than a
> database. Is there a way to configure the docker images to use xml
> instead of database for authentication?
>
> Thanks,
> Scott
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> <ma...@guacamole.apache.org>
> For additional commands, e-mail: user-help@guacamole.apache.org
> <ma...@guacamole.apache.org>
>
Re: Using Docker Images with XML Authentication
Posted by Sean Reid <se...@gmail.com>.
Hi Scott,
It doesn't seem like the Docker images support this. I've never tried to do
this myself with the Docker image, but looking quickly at the bin/start.sh
<https://github.com/apache/guacamole-client/blob/1.1.0/guacamole-docker/bin/start.sh>
script that starts guacamole when the docker image starts up, it looks like
you'd need to build a docker image yourself with some changes to that
script so that it doesn't require database information. There are probably
some other changes you'd need to make too, but they didn't jump out at me
as quickly.
Once you've made those changes the start script, you could then either
build a copy of your user-mappings.xml permanently into your custom image,
or you could mount the file at "docker run" time with a the "-v" option
passed to docker.
I hope this at least gives you a little bit of an idea for a path forward,
Sean
On Fri, May 22, 2020 at 12:52 PM Scott Hancock <sh...@gmail.com> wrote:
> Hi,
>
> I’m trying the Guacamole docker images. To simplify things I’d like to
> just use the default XML authentication rather than a database. Is there a
> way to configure the docker images to use xml instead of database for
> authentication?
>
> Thanks,
> Scott
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>
>