From user-return-3947-archive-asf-public=cust-asf.ponee.io@guacamole.apache.org Sat May 19 20:36:47 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8FC0018063B for ; Sat, 19 May 2018 20:36:46 +0200 (CEST) Received: (qmail 44005 invoked by uid 500); 19 May 2018 18:36:45 -0000 Mailing-List: contact user-help@guacamole.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@guacamole.apache.org Delivered-To: mailing list user@guacamole.apache.org Received: (qmail 43994 invoked by uid 99); 19 May 2018 18:36:45 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 May 2018 18:36:45 +0000 Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id 54CA1C0F for ; Sat, 19 May 2018 18:36:44 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id e9-v6so1579945lfb.3 for ; Sat, 19 May 2018 11:36:43 -0700 (PDT) X-Gm-Message-State: ALKqPwd5yZ4fzN71own5sDHlye2lbNlTaClFY1BtMOBz1vPgxoxncF5n VqNJSJWF2lbOLxCyPDb+J2A4OjUBDqt6gs9gud8= X-Google-Smtp-Source: AB8JxZqBwqOrXDEDdW3KiWZQMxu9mlHhbSvC2pe4MztPAA4LJUf+J0FIcGtPUARxU10QkL5eswFSmYgdgJybixczwts= X-Received: by 2002:a19:ded9:: with SMTP id i86-v6mr24979296lfl.42.1526755002786; Sat, 19 May 2018 11:36:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:a815:0:0:0:0:0 with HTTP; Sat, 19 May 2018 11:36:42 -0700 (PDT) In-Reply-To: References: From: Nick Couchman Date: Sat, 19 May 2018 14:36:42 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Dynamic Session Creation To: user@guacamole.apache.org Content-Type: multipart/alternative; boundary="00000000000099aad9056c9359ee" --00000000000099aad9056c9359ee Content-Type: text/plain; charset="UTF-8" On Sat, May 19, 2018 at 1:13 PM, Felix Wolfheimer wrote: > Hi all, > > I'm currently trying to figure out if and how a dynamic session creation > mechanism can be implemented in a Guacamole extension. Let's say I have a > bunch of machines which can host graphical desktop sessions and I have a > script based mechanism to initiate the request to create such a graphical > session on one of the machines and add the information about the session > into the guacamole_db (SQL). If a user, who doesn't own a graphical session > yet, logs in to Guacamole, I'd like to trigger/call the script in the > backend which creates the session and adds the information to the > guacamole_db. > Can you explain a little more what kind of graphical session you're talking about, here, and why the creation of the session needs to be scripted? I'm presuming you're talking some sort of VNC session, since RDP doesn't usually require any setup, but maybe you can clarify this a bit? Even for VNC you can set it up with xinetd such that sessions get created when users connect, so some additional information here on what exactly you're trying to do would be helpful. > > I've looked through the extension mechanisms in Guacamole and it seems > that event listeners could be used to trigger the mechanism in the backend > on user login. Has someone knowing the architecture of Guacamole an idea > whether > > - the user will be connected to the just created session, if the session > creation is done in a listener on an "AuthenticationSuccessEvent" happens, > - there's any way of informing the user about what's going on in the > backend from within such a listener function (e.g., display a banner > "Session creation pending. Please be patient." or something similar, until > the session is ready for connection). > > You should be able to implement an extension which implements the AuthenticationSuccessEvent and performs whatever action you'd like to do upon authentication. Your extension should also be able to make the connection happen automatically - in addition to writing the event listener implementation, you'll likely need to write some AngularJS code and perhaps even a REST endpoint in order to pass information about the newly-created session between the Java back-end and the web browser front-end and make the connection happen, but this should be doable. It's definitely a little bit involved, but it all sounds doable. Sounds like you're already reading the manual, which should be a good place to find that information, so I'd just continue to look through that and the existing code to figure out how to do what you're trying to do. You can also e-mail back here with any specific questions you might have and the community will jump in and help as we can :-). -Nick --00000000000099aad9056c9359ee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On S= at, May 19, 2018 at 1:13 PM, Felix Wolfheimer <f.wolfheimer@online.de= > wrote:
Hi all,
=C2=A0
I'm currently trying to figure out if and how a dynamic session cr= eation mechanism can be implemented in a Guacamole extension. Let's say= I have a bunch of machines which can host graphical desktop sessions and I= have a script based mechanism to initiate the request to create such a gra= phical session on one of the machines and add the information about the ses= sion into the guacamole_db (SQL). If a user, who doesn't own a graphica= l session yet, logs in to Guacamole,=C2=A0I'd like to trigger/call the = script in the backend which creates the session and adds the information to= the guacamole_db.=C2=A0

= Can you explain a little more what kind of graphical session you're tal= king about, here, and why the creation of the session needs to be scripted?= =C2=A0 I'm presuming you're talking some sort of VNC session, since= RDP doesn't usually require any setup, but maybe you can clarify this = a bit?=C2=A0 Even for VNC you can set it up with xinetd such that sessions = get created when users connect, so some additional information here on what= exactly you're trying to do would be helpful.
=C2=A0
=C2=A0
I've looked through the=C2=A0extension mechanisms in Guacamole=C2= =A0and it seems that event listeners could be used to trigger the mechanism= in the backend on user login. Has someone knowing the architecture of Guac= amole an idea whether=C2=A0
=C2=A0
- the user will be connected to the just created session, if the sessi= on creation is done in a listener on=C2=A0an=C2=A0"AuthenticationSuccessEvent" happens,
- there's any way of informin= g the user about what's going on in the backend from within such a list= ener function (e.g., display a banner "Session creation pending. Pleas= e be patient." or something similar, until the session is ready for co= nnection).
=C2=A0=C2=A0

<= /div>
You should be able to implement an extension which implements the= AuthenticationSuccessEvent and performs whatever action you'd like to = do upon authentication.=C2=A0 Your extension should also be able to make th= e connection happen automatically - in addition to writing the event listen= er implementation, you'll likely need to write some AngularJS code and = perhaps even a REST endpoint in order to pass information about the newly-c= reated session between the Java back-end and the web browser front-end and = make the connection happen, but this should be doable.=C2=A0 It's defin= itely a little bit involved, but it all sounds doable.

=
Sounds like you're already reading the manual, which should be a g= ood place to find that information, so I'd just continue to look throug= h that and the existing code to figure out how to do what you're trying= to do.=C2=A0 You can also e-mail back here with any specific questions you= might have and the community will jump in and help as we can :-).

-Nick
--00000000000099aad9056c9359ee--