You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by doyouhas <zj...@gmail.com> on 2018/08/18 01:55:03 UTC

Guacamole view connection URLs

Hello,

I have another question for you guys. I am trying to integrate my
application with guacamole, providing a way for my customer to easily spin
up training environments for their students. I am creating a dashboard for
instructors to view all of their current registrations. Once a registration
has been verified, spin up an EC2 instance, and allow the students to
connect via guacamole. Ideally, I would like to insert a link into the
instructor dashboard with the URL to launch the guacamole viewer for said
instance, so the instructor does not need to keep multiple tabs open. 

I'm assuming the link to open any given connection is not set in the
database and is generated on demand? So if I wanted to grab that URL, I
would need a guac API call? I would appreciate if someone could tell me a
way to grab those links without going through the API, as my app is written
in python.

Thanks



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

Re: Guacamole view connection URLs

Posted by doyouhas <zj...@gmail.com>.
Sorry I didnt reply I've been busy debugging my code. I'm gonna try and
implement the link functionality soon so this information will be
invaluable. Thanks for all your help Nick :D Really solid community you have
here. So much easier to get help than from other open source projects!



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

Re: Guacamole view connection URLs

Posted by YOSRA SAADALLAH <yo...@enis.tn>.
I am sure that the token is not the adequate one. I forced the request with
other token and it worked. (copy and past the appropriate token)



2018-08-23 11:12 GMT+01:00 YOSRA SAADALLAH <yo...@enis.tn>:

>
> Thank you , but it shows « permution denied » i can’t get the key
>
> Le jeu. 23 août 2018 à 5:36 AM, Mike Jumper <mi...@glyptodon.org> a
> écrit :
>
>> On Mon, Aug 20, 2018 at 8:05 AM, YOSRA SAADALLAH <yosra.saadallah@enis.tn
>> > wrote:
>>
>>> Yes, but the requests that i did ,didn’t work for me. ( No such
>>> tunnel..) are there other requests to do that?
>>>
>>
>> If you are receiving "No such tunnel" when attempting to generate sharing
>> credentials via "api/session/tunnels/UUID/activeConnection/sharingCredentials/",
>> it is probably because the session you are using is not the same as the
>> session associated with the connection you wish to share. Everything under
>> "api/session/tunnels/" is related only to the tunnels within the current
>> session, so unless you actually have a tunnel with that UUID in your
>> current session, you will get "No such tunnel" regardless of whether
>> someone else does have such a connection running.
>>
>> Assuming the above is true, you might have more success accessing things
>> via:
>>
>>     "api/session/data/IDENTIFIER/activeConnections/UUID/
>> sharingCredentials/SHARINGPROFILE"
>>
>> where "IDENTIFIER" is the identifier of the authentication provider
>> serving as the data source (you will examples of this in other requests),
>> "UUID" is the UUID of the active connection you wish to share, and
>> "SHARINGPROFILE" is a sharing profile associated with that connection.
>>
>> I believe the above will work so long as the current user has permission
>> to both see that active connection and use the specified sharing profile.
>> The "api/session/tunnels/UUID/activeConnection/" and
>> "api/session/data/IDENTIFIER/activeConnections/UUID/" paths are
>> equivalent ways of reaching the same active connection resource.
>>
>> - Mike
>>
>>

Re: Guacamole view connection URLs

Posted by YOSRA SAADALLAH <yo...@enis.tn>.
Thank you , but it shows « permution denied » i can’t get the key

Le jeu. 23 août 2018 à 5:36 AM, Mike Jumper <mi...@glyptodon.org> a
écrit :

> On Mon, Aug 20, 2018 at 8:05 AM, YOSRA SAADALLAH <yo...@enis.tn>
> wrote:
>
>> Yes, but the requests that i did ,didn’t work for me. ( No such tunnel..)
>> are there other requests to do that?
>>
>
> If you are receiving "No such tunnel" when attempting to generate sharing
> credentials via
> "api/session/tunnels/UUID/activeConnection/sharingCredentials/", it is
> probably because the session you are using is not the same as the session
> associated with the connection you wish to share. Everything under
> "api/session/tunnels/" is related only to the tunnels within the current
> session, so unless you actually have a tunnel with that UUID in your
> current session, you will get "No such tunnel" regardless of whether
> someone else does have such a connection running.
>
> Assuming the above is true, you might have more success accessing things
> via:
>
>
> "api/session/data/IDENTIFIER/activeConnections/UUID/sharingCredentials/SHARINGPROFILE"
>
> where "IDENTIFIER" is the identifier of the authentication provider
> serving as the data source (you will examples of this in other requests),
> "UUID" is the UUID of the active connection you wish to share, and
> "SHARINGPROFILE" is a sharing profile associated with that connection.
>
> I believe the above will work so long as the current user has permission
> to both see that active connection and use the specified sharing profile.
> The "api/session/tunnels/UUID/activeConnection/" and
> "api/session/data/IDENTIFIER/activeConnections/UUID/" paths are equivalent
> ways of reaching the same active connection resource.
>
> - Mike
>
>

Re: Guacamole view connection URLs

Posted by Mike Jumper <mi...@glyptodon.org>.
On Mon, Aug 20, 2018 at 8:05 AM, YOSRA SAADALLAH <yo...@enis.tn>
wrote:

> Yes, but the requests that i did ,didn’t work for me. ( No such tunnel..)
> are there other requests to do that?
>

If you are receiving "No such tunnel" when attempting to generate sharing
credentials via
"api/session/tunnels/UUID/activeConnection/sharingCredentials/", it is
probably because the session you are using is not the same as the session
associated with the connection you wish to share. Everything under
"api/session/tunnels/" is related only to the tunnels within the current
session, so unless you actually have a tunnel with that UUID in your
current session, you will get "No such tunnel" regardless of whether
someone else does have such a connection running.

Assuming the above is true, you might have more success accessing things
via:


"api/session/data/IDENTIFIER/activeConnections/UUID/sharingCredentials/SHARINGPROFILE"

where "IDENTIFIER" is the identifier of the authentication provider serving
as the data source (you will examples of this in other requests), "UUID" is
the UUID of the active connection you wish to share, and "SHARINGPROFILE"
is a sharing profile associated with that connection.

I believe the above will work so long as the current user has permission to
both see that active connection and use the specified sharing profile. The
"api/session/tunnels/UUID/activeConnection/" and
"api/session/data/IDENTIFIER/activeConnections/UUID/" paths are equivalent
ways of reaching the same active connection resource.

- Mike

Re: Guacamole view connection URLs

Posted by YOSRA SAADALLAH <yo...@enis.tn>.
Yes, but the requests that i did ,didn’t work for me. ( No such tunnel..)
are there other requests to do that?

Le lun. 20 août 2018 à 1:42 PM, Nick Couchman <vn...@apache.org> a écrit :

>
>
> On Mon, Aug 20, 2018 at 2:21 AM YOSRA SAADALLAH <yo...@enis.tn>
> wrote:
>
>> Hello,
>>
>> I have the same issue .
>>
>
> I don't think this is the same issue.  I think this is a different issue -
> from what I read of the doyouhas's original e-mail, it isn't dealing with
> sharing connections, it's dealing with connecting users to their own
> individual connections and how to generate the URL.
>
>
>> I want that everyone who wants to join a connection just clicks on a
>> button (without demanding the shared link copy and past...)
>> Is there any method to get the shared link of a connection?
>>
>
> As I believe we've already discussed in other threads on the list, what
> you're asking to do is not implemented, yet, though there are feature
> requests for it.
>
> -Nick
>
>>

Re: Guacamole view connection URLs

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Aug 20, 2018 at 2:21 AM YOSRA SAADALLAH <yo...@enis.tn>
wrote:

> Hello,
>
> I have the same issue .
>

I don't think this is the same issue.  I think this is a different issue -
from what I read of the doyouhas's original e-mail, it isn't dealing with
sharing connections, it's dealing with connecting users to their own
individual connections and how to generate the URL.


> I want that everyone who wants to join a connection just clicks on a
> button (without demanding the shared link copy and past...)
> Is there any method to get the shared link of a connection?
>

As I believe we've already discussed in other threads on the list, what
you're asking to do is not implemented, yet, though there are feature
requests for it.

-Nick

>

Re: Guacamole view connection URLs

Posted by YOSRA SAADALLAH <yo...@enis.tn>.
Hello,

I have the same issue . I want that everyone who wants to join a connection
just clicks on a button (without demanding the shared link copy and past...)
Is there any method to get the shared link of a connection?

Le sam. 18 août 2018 à 11:21 PM, Nick Couchman <vn...@apache.org> a écrit :

>
>
> On Fri, Aug 17, 2018 at 9:55 PM doyouhas <zj...@gmail.com> wrote:
>
>> Hello,
>>
>> I have another question for you guys. I am trying to integrate my
>> application with guacamole, providing a way for my customer to easily spin
>> up training environments for their students. I am creating a dashboard for
>> instructors to view all of their current registrations. Once a
>> registration
>> has been verified, spin up an EC2 instance, and allow the students to
>> connect via guacamole. Ideally, I would like to insert a link into the
>> instructor dashboard with the URL to launch the guacamole viewer for said
>> instance, so the instructor does not need to keep multiple tabs open.
>>
>> I'm assuming the link to open any given connection is not set in the
>> database and is generated on demand? So if I wanted to grab that URL, I
>> would need a guac API call? I would appreciate if someone could tell me a
>> way to grab those links without going through the API, as my app is
>> written
>> in python.
>>
>>
> The links are generated in a predictable fashion.  You can see the code
> here:
>
>
> https://github.com/apache/guacamole-client/blob/master/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js
>
> The toString() method, in particular, combines the various aspects of the
> ClientIdentifier into a predictable, Base64-encoded string:
>
>
> https://github.com/apache/guacamole-client/blob/7d822df5a3b040bf61d1055fe7bffaf1996c0983/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js#L110-L116
>
> So, for any given connection, you can provide a link to it using the
> /client/ path and then the output from that method.  So, something like:
>
> http://my.guacmaole.server/guacamole/#/client/<identifier>
>
> -Nick
>

Re: Guacamole view connection URLs

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Aug 17, 2018 at 9:55 PM doyouhas <zj...@gmail.com> wrote:

> Hello,
>
> I have another question for you guys. I am trying to integrate my
> application with guacamole, providing a way for my customer to easily spin
> up training environments for their students. I am creating a dashboard for
> instructors to view all of their current registrations. Once a registration
> has been verified, spin up an EC2 instance, and allow the students to
> connect via guacamole. Ideally, I would like to insert a link into the
> instructor dashboard with the URL to launch the guacamole viewer for said
> instance, so the instructor does not need to keep multiple tabs open.
>
> I'm assuming the link to open any given connection is not set in the
> database and is generated on demand? So if I wanted to grab that URL, I
> would need a guac API call? I would appreciate if someone could tell me a
> way to grab those links without going through the API, as my app is written
> in python.
>
>
The links are generated in a predictable fashion.  You can see the code
here:

https://github.com/apache/guacamole-client/blob/master/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js

The toString() method, in particular, combines the various aspects of the
ClientIdentifier into a predictable, Base64-encoded string:

https://github.com/apache/guacamole-client/blob/7d822df5a3b040bf61d1055fe7bffaf1996c0983/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js#L110-L116

So, for any given connection, you can provide a link to it using the
/client/ path and then the output from that method.  So, something like:

http://my.guacmaole.server/guacamole/#/client/<identifier>

-Nick