On Thu, Jul 18, 2019 at 1:37 AM John Lemon <[email protected]> wrote:

> Hello,
>
> I have been looking at using an Event Listener as described in Chapter
> 25's opening comments (to minimise cloud resources for costs saving).


> However, after looking at the docs and API data structures, the one thing
> missing is information on the selected connection (i.e. it's name, like say
> "ssh test1" or "RDP test1").


> From what I understand a custom authentication extension can return the
> list of allow connections, so that is fine. But I cannot use this then to
> control resources as the connection to use hasn't been selected yet.


> A listener can see events (i.e. tunnelstart) that contains information on
> the user and the associated tunnel. But that AuthenticatedUser object,
> doesn't have any information of the currently selected connection ( i.e.
> getAuthenticationProvider() -> getUserContext() ->
> getActiveConnectionDirectory() is empty), I can see the list of allowed
> connections via getConnectionDirectory(), but not the currently select
> connection .
>
>
Can you explain at a little bit higher level what you're trying to
accomplish?  Spin up a cloud resource (e.g. EC2 instance) when someone logs
in, and spin it down when they log out?  Or something else?  Can you share
the code you've written so far - is it on GitHub somewhere?

-Nick

Reply via email to