guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <mike.jum...@guac-dev.org>
Subject Re: Authentication mechanism.. Was: New user questions...
Date Mon, 05 Mar 2018 07:31:42 GMT
On Sun, Mar 4, 2018 at 10:53 PM, Joachim Lindenberg <joachim@lindenberg.one>
wrote:

> Hello Mike,
>
> thanks for the pointer to Connectable interface. However I also don´t want
> to re-implement a lot that is already working, and connections work. And in
> fact I did that experiment with abusing a property getter and it works –
> quick and dirty.
>

I strongly caution against starting a new project by intentionally
following bad practice.

After doing that my biggest issue is, that I cannot detect disconnects of
> specific connections which lets me really consider better approaches.
>

Detecting disconnect is normally implemented by overriding the close()
function of the returned GuacamoleTunnel or its underlying GuacamoleSocket.
This is how the more complex authentication extensions track connection
status, like the database auth extensions.

(I would probably not suspend immediately on tunnel close on the server
> part but give a grace period for reconnections).
>
> Now I am wondering whether Connectable is the right pointer or whether
> http://guacamole.apache.org/doc/guacamole-ext/org/apache/
> guacamole/net/event/listener/Listener.html (listening for
> http://guacamole.apache.org/doc/guacamole-ext/org/apache/
> guacamole/net/event/TunnelEvent.html) would be a better alternative.
>

Event listeners are indeed an alternative, and may be simpler in your case.


> There is a getTunnel() method, but class org.apache.guacamole.net.GuacamoleTunnel
> is not in the Javadocs
>

Everything is in the JavaDocs:

http://guacamole.apache.org/doc/guacamole-common/org/apache/guacamole/net/GuacamoleTunnel.html

and in fact I would need the configuration or at least the connection name.
>

Only through implementing the necessary interfaces at higher levels can you
ensure that any necessary data specific to your implementation is made
available at lower levels. If you need to take distinct action specific to
a connection when that connection is (1) established and (2) disconnected,
the best route really would be implementing a Connection which does exactly
that.

I assume the same extension can implement authentication and listener?
>

Yes.

- Mike

Mime
View raw message