Ultimately what I am trying to get at is the sharing link. I have it
working by rolling my own client+ api work and everything works great
except, of course, I have to build my own client. Since Guacamole, out of
the box works exactly as I need it to all I really need is that darn link,
I though ok, maybe I can use the API to see info about a specific user and
just work backwards from that but the inability to get a list of tunnels
for a user blocks me as far as I can tell.


On June 17, 2023 at 6:16:05 PM, Nick Couchman ([email protected]) wrote:

On Sat, Jun 17, 2023 at 7:37 PM Greg Lose <[email protected]> wrote:
>
> Whenever I call the api/session/tunnels end point I receive an empty
array
> with a 200 response. This occurs when I have at least one active session
> going. I’ve create the access token with both guacadmin and the user that
> is currently logged in credentials. In either case I receive a 200 and
> empty array.
>
> I’ve looked in the source and the request seems pretty straightforward.
Am
> I misunderstanding whatI should be receiving? If so is the a way to
> retrieve the active tunnel id(s) for a given user?

Without actually going through the code, my suspicion is that the
tunnels you retrieve from the api/session/tunnels endpoint are
associated with your particular session (hence the /session/
component) and not with the user overall. So, logging in to Guacamole
from a browser and starting a session, then logging in with the same
user from an API and trying to list the sessions will not give you
_all_ of the tunnels for that particular user - it will give you all
of the tunnels for the session for that user, which, in the case of an
API user, will be none.

To back up a little, though, maybe you can explain what you're trying
to accomplish in getting the list of tunnels? If you're using the JDBC
(and possibly JSON) authentication modules, you can get a list of
active connections using endpoints specific to the active connections,
and can do things like close connections, join connections, etc. Other
authentication modules - like LDAP or user-mapping.xml - don't
actually implement active connection tracking, so you might be out of
luck if you're using one of those.

-Nick

Reply via email to