You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by David Landry <da...@dmwl.net> on 2016/09/01 03:39:46 UTC

Re: Guacamole. Passing connection details problem

Hi, I'm working with Antony on this. Here's a few more details:

I stepped through with a debugger, and it looks like a couple of the
handshakeParameters are getting garbled. For connections that fail, you get
the following in the handshakeParameters:

GUAC_TYPE=[undefined], GUAC_DATA_SOURCE=[undefined],GUAC_ID=[µë-]

For connections that succeed, it looks more like this:

GUAC_TYPE=[c], GUAC_DATA_SOURCE=[hmac], GUAC_ID=[13525]

I'm having trouble tracking down the code where those are injected into the
websocket tunnel request. Any pointers about where to look?
ᐧ

On Wed, Aug 31, 2016 at 2:36 PM, Antony Awaida <an...@apporto.com> wrote:

> Hi everyone:
>
> We want to be able to pass connection details in the URL. We found an auth
> extension that does this and uses an HMAC signature to authenticate with
> Guacamole (https://github.com/ManicoW/guacamole-auth-hmac). The problem
> we're having is that sometimes links work and sometimes they don't. When
> they don't work, guacamole complains about an undefined connection type.
>
> Any help/pointers would be appreciated!
>
> Thanks!
>
> --
> Antony Awaida
> www.apporto.com
>
> ᐧ
>



-- 
David Landry

Re: Guacamole. Passing connection details problem

Posted by David Landry <da...@dmwl.net>.
Found the problem. We were just passing the connection id as a number, not
a base64 encoded id, type, and data source. And it looks like there's a bug
in the Angular code with how it checks to see if that string is valid.

If you look at ClientIdentifier.fromString()
<https://github.com/apache/incubator-guacamole-client/blob/master/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js#L134>,
it doesn't check to see if the type or dataSource are set before returning
them. As long as the base64 decode doesn't throw an exception, the code
assumes everything worked.

Examples:
> ClientIdentifier.fromString('10000')
b {dataSource: "test", type: "c", id: "10000"}

> ClientIdentifier.fromString('100000')
b {dataSource: undefined, type: undefined, id: "×M4Ó"}

Is that a bug y'all care to have fixed? I can put together a pull request
to fix it if you're interested.
ᐧ

On Wed, Aug 31, 2016 at 11:39 PM, David Landry <da...@dmwl.net> wrote:

> Hi, I'm working with Antony on this. Here's a few more details:
>
> I stepped through with a debugger, and it looks like a couple of the
> handshakeParameters are getting garbled. For connections that fail, you get
> the following in the handshakeParameters:
>
> GUAC_TYPE=[undefined], GUAC_DATA_SOURCE=[undefined],GUAC_ID=[µë-]
>
> For connections that succeed, it looks more like this:
>
> GUAC_TYPE=[c], GUAC_DATA_SOURCE=[hmac], GUAC_ID=[13525]
>
> I'm having trouble tracking down the code where those are injected into
> the websocket tunnel request. Any pointers about where to look?
> ᐧ
>
> On Wed, Aug 31, 2016 at 2:36 PM, Antony Awaida <an...@apporto.com> wrote:
>
>> Hi everyone:
>>
>> We want to be able to pass connection details in the URL. We found an
>> auth extension that does this and uses an HMAC signature to authenticate
>> with Guacamole (https://github.com/ManicoW/guacamole-auth-hmac). The
>> problem we're having is that sometimes links work and sometimes they don't.
>> When they don't work, guacamole complains about an undefined connection
>> type.
>>
>> Any help/pointers would be appreciated!
>>
>> Thanks!
>>
>> --
>> Antony Awaida
>> www.apporto.com
>>
>> ᐧ
>>
>
>
>
> --
> David Landry
>



-- 
David Landry