Hello Mike,

my authentication extension now listens for TunnelEvents, and I figured out 
that the tunnel referenced in the events is using a ConfiguredGuacamoleSocket, 
which allows me to obtain the relevant configuration.

I am now wondering how safe the assumption is that my RDP tunnel connections 
are always using ConfiguredGuacamoleSocket?

Or any other suggestion?

Thanks, Joachim

 

Von: Joachim Lindenberg [mailto:joac...@lindenberg.one] 
Gesendet: Montag, 5. März 2018 16:07
An: user@guacamole.apache.org
Betreff: RE: Authentication mechanism.. Was: New user questions...

 

Hello Mike,

I appreciate your feedback and advice.

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

I do understand that point, but being new to the topic I prefer getting my 
hands dirty over endless analysis. At least I learn something and as long as I 
am clear about what parts are dirty, I feel ok. And as I learn how to do 
better, I am frequently updating my code.

*  Everything is in the JavaDocs:

Right, but it was not linked and in a different component. That´s why I didn´t 
find it. Thanks for the url…

*  Detecting disconnect is normally implemented by overriding the close() 
function of the returned GuacamoleTunnel

How can I tell Guacamole to use my own subclass for tunnel? And which super 
class? From my extension? And how do I get to the configuration? Essentially 
same question as with listener – how can I identify the configuration (or name 
of it)?

Thanks & Best Regards,

Joachim

 

 

 

 

From: Mike Jumper [mailto:mike.jum...@guac-dev.org] 
Sent: Montag, 5. März 2018 08:32
To: user@guacamole.apache.org <mailto:user@guacamole.apache.org> 
Subject: Re: Authentication mechanism.. Was: New user questions...

 

On Sun, Mar 4, 2018 at 10:53 PM, Joachim Lindenberg < 
<mailto:joac...@lindenberg.one> joac...@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>
 
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>
 
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  <http://org.apache.guacamole.net> 
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>
 
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

 

Reply via email to