You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Oliver Jones <ol...@glance.net> on 2016/07/11 16:58:37 UTC

URL parameters to automate guacamole session start?

Is there a way to configure a guacamole web server so it will accept a url
something like this:


https://hostname.example.com/guacamole?host=xxx&user=yyy&token=zzz&arg=wwww

I'd like this automatically to connect the guacamole web site visitor to a
linux-hosted RDP session on the given host with the given username.

The idea is to be able to publish relatively short-lived access URLs to
particular users, and make them able to use an rdp session, without needing
a username or password.

Is this sort of thing available within today's Guacamole?  Is it
conceivable an authorization extension could be developed to handle it?

Thanks for any wisdom!
Ollie Jones

Re: URL parameters to automate guacamole session start?

Posted by Oliver Jones <ol...@glance.net>.
On Mon, Jul 11, 2016 at 9:58 AM, Ollie Jones <ol...@glance.net> wrote:

> Is there a way to configure a guacamole web server so it will accept a url
> something like this:
>
>
> https://hostname.example.com/guacamole?host=xxx&user=yyy&token=zzz&arg=wwww
>
> I'd like this automatically to connect the guacamole web site visitor to a
> linux-hosted RDP session on the given host with the given username.
>


On Wed, Jul 13, 2016 at 6:50 PM, Mike Jumper <mi...@guac-dev.org>
wrote:
>
> That should be possible, yes.
>
> ... If you implement an authentication extension, that extension will
> receive these parameters via the Credentials [1] object passed to
> authenticateUser() [2] and updateAuthenticatedUser() [3]
>

That sounds good.

One more question: is there any way to push any or all those command-line
parameter values through to the xrdp session, so they show up as
environment variables or something similar?

Thanks for following up, and thanks for a really nice piece of software,
Mike.

Ollie Jones

Re: URL parameters to automate guacamole session start?

Posted by Mike Jumper <mi...@guac-dev.org>.
On Mon, Jul 11, 2016 at 9:58 AM, Oliver Jones <ol...@glance.net> wrote:

> Is there a way to configure a guacamole web server so it will accept a url
> something like this:
>
>
> https://hostname.example.com/guacamole?host=xxx&user=yyy&token=zzz&arg=wwww
>
> I'd like this automatically to connect the guacamole web site visitor to a
> linux-hosted RDP session on the given host with the given username.
>
> The idea is to be able to publish relatively short-lived access URLs to
> particular users, and make them able to use an rdp session, without needing
> a username or password.
>
> Is this sort of thing available within today's Guacamole?  Is it
> conceivable an authorization extension could be developed to handle it?
>

Hi Ollie,

That should be possible, yes.

When any page within the Guacamole web application is visited, the
JavaScript first makes an authentication / re-authentication attempt,
including any parameters from the URL as parameters in that request. If you
implement an authentication extension, that extension will receive these
parameters via the Credentials [1] object passed to authenticateUser() [2]
and updateAuthenticatedUser() [3] (depending on whether the user is already
logged in).

The alternative to this, of course, would be to implement your own
purpose-built web application leveraging the Java and JavaScript APIs [4]
(guacamole-common and guacamole-common-js respectively) to provide the same
remote desktop functionality as the mainline Guacamole webapp, but with
your own authentication semantics. Those APIs were kept separate
specifically so that third parties could implement their own applications
without being restricted by our choices regarding authentication scheme,
interface design, etc.

Thanks,

- Mike

[1]
http://guacamole.incubator.apache.org/doc/guacamole-ext/org/glyptodon/guacamole/net/auth/Credentials.html
[2]
http://guacamole.incubator.apache.org/doc/guacamole-ext/org/glyptodon/guacamole/net/auth/AuthenticationProvider.html#authenticateUser-org.glyptodon.guacamole.net.auth.Credentials-
[3]
http://guacamole.incubator.apache.org/doc/guacamole-ext/org/glyptodon/guacamole/net/auth/AuthenticationProvider.html#updateAuthenticatedUser-org.glyptodon.guacamole.net.auth.AuthenticatedUser-org.glyptodon.guacamole.net.auth.Credentials-
[4] http://guacamole.incubator.apache.org/api-documentation/