You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by Steven Barnhart <ba...@gmail.com> on 2023/09/01 13:33:13 UTC

ability to add custom settings for a connection?

Hello,

I am interested in building an event listener that would depend on some
settings/parameters that would be specific to the connection being
connected to. Is it possible to add custom settings or extend in some way
for connections?

Thanks!

Steve

Re: ability to add custom settings for a connection?

Posted by Nick Couchman <vn...@apache.org>.
Hey, Steven,
Thanks - I will probably close the pull request, as this should be resolved
by a re-base on top of the current master and then some slight tweaks to
the pom.xml. Thanks for catching that, though. In the future, you can
probably just comment on the open pull request, instead, and point it out,
there, as part of the review process.

Regarding the error messages, yes, more detail is available; however, there
are two reasons that detail does not get displayed on the screen:
1) The detail has to be translatable via the built-in translation and
exception system. This isn't always the case.
2) Sometimes from a security perspective it's better to tell users more
generally that something is not allowed and not share all of the details as
to why it isn't allowed. This probably isn't a particularly good or
critical case for that, as the users would already be logged in to
Guacamole when getting this message about connecting, but I went with that
principal :-).

-Nick

On Thu, Sep 7, 2023 at 12:59 PM Steven Barnhart <ba...@gmail.com>
wrote:

> Thanks for this, I got it built and seemingly working. I submitted a pull
> request with some changes I made for it to work for me and with the docker
> scripts. I am still very much a git newbie with working with others, so
> apologies if it's messy.
>
> One thing, I am seeing the attached message and seemingly from the logs,
> more specific/friendly messages should be displayed? It also doesn't appear
> to let me bypass as an admin as I got that message as an admin. We are
> using LDAP if that complicates things.
> [image: Screenshot 2023-09-07 at 12.50.41 PM.png]
> Steve
>
>
> On Fri, Sep 1, 2023 at 10:34 AM Nick Couchman <vn...@apache.org> wrote:
>
>> On Fri, Sep 1, 2023 at 10:29 AM Steven Barnhart
>> <ba...@gmail.com> wrote:
>> >
>> > Oh my you actually implemented what i was going to build (time
>> > restrictions)! How awesome!
>> >
>>
>> Yeah, it's been out there as a request for a while, so I took a stab
>> at it :-). The extension I implemented allows those limits to be
>> placed on connections, connection groups (of the balancing variety),
>> users, and user groups.
>>
>> https://issues.apache.org/jira/projects/GUACAMOLE/issues/GUACAMOLE-1020
>>
>> Feel free to try it out and let me know if anything doesn't work as
>> expected.
>>
>> -Nick
>>
>

Re: ability to add custom settings for a connection?

Posted by Steven Barnhart <ba...@gmail.com>.
Thanks for this, I got it built and seemingly working. I submitted a pull
request with some changes I made for it to work for me and with the docker
scripts. I am still very much a git newbie with working with others, so
apologies if it's messy.

One thing, I am seeing the attached message and seemingly from the logs,
more specific/friendly messages should be displayed? It also doesn't appear
to let me bypass as an admin as I got that message as an admin. We are
using LDAP if that complicates things.
[image: Screenshot 2023-09-07 at 12.50.41 PM.png]
Steve


On Fri, Sep 1, 2023 at 10:34 AM Nick Couchman <vn...@apache.org> wrote:

> On Fri, Sep 1, 2023 at 10:29 AM Steven Barnhart
> <ba...@gmail.com> wrote:
> >
> > Oh my you actually implemented what i was going to build (time
> > restrictions)! How awesome!
> >
>
> Yeah, it's been out there as a request for a while, so I took a stab
> at it :-). The extension I implemented allows those limits to be
> placed on connections, connection groups (of the balancing variety),
> users, and user groups.
>
> https://issues.apache.org/jira/projects/GUACAMOLE/issues/GUACAMOLE-1020
>
> Feel free to try it out and let me know if anything doesn't work as
> expected.
>
> -Nick
>

Re: ability to add custom settings for a connection?

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Sep 1, 2023 at 10:29 AM Steven Barnhart
<ba...@gmail.com> wrote:
>
> Oh my you actually implemented what i was going to build (time
> restrictions)! How awesome!
>

Yeah, it's been out there as a request for a while, so I took a stab
at it :-). The extension I implemented allows those limits to be
placed on connections, connection groups (of the balancing variety),
users, and user groups.

https://issues.apache.org/jira/projects/GUACAMOLE/issues/GUACAMOLE-1020

Feel free to try it out and let me know if anything doesn't work as expected.

-Nick

Re: ability to add custom settings for a connection?

Posted by Steven Barnhart <ba...@gmail.com>.
Oh my you actually implemented what i was going to build (time
restrictions)! How awesome!

Steve


On Fri, Sep 1, 2023 at 10:24 AM Nick Couchman <vn...@apache.org> wrote:

> On Fri, Sep 1, 2023 at 9:33 AM Steven Barnhart <ba...@gmail.com>
> wrote:
> >
> > Hello,
> >
> > I am interested in building an event listener that would depend on some
> > settings/parameters that would be specific to the connection being
> > connected to. Is it possible to add custom settings or extend in some way
> > for connections?
>
> It depends on what you're trying to do, but it is likely possible
> through the addition of connection attributes. In Guacamole, there
> are, in general two types of settings that apply to connections:
> * Connection Parameters: These are settings for the connections that
> ultimately are passed on to guacd to tell guacd how to perform the
> connection. Things like the destination hostname, port, authentication
> information, etc.
> * Connection Attributes: These are settings for the connections that
> are generally considered internal to the client and not necessarily
> expected to be passed on to guacd, although some might. Things like
> concurrency limits and load balancing are examples of this.
>
> Adding connection parameters would be a bit more involved, because
> these are expected to impact how guacd performs the connections, which
> means that you have to change both the Guacamole Client side and the
> Guacamole Server (guacd) side. Attributes are easier since they're
> generally limited to the client, but there haven't been very many
> extensions that implement additional attributes for connections.
> However, I happen to have one in review status right now where I've
> added fields for limiting things like when connections can be used and
> from what IPs:
>
> https://github.com/apache/guacamole-client/pull/830
>
> You're welcome to have a look at that and see if it makes any sense,
> or post back any questions if things don't make sense. You might
> clarify what it is you're wanting to implement and we may be able to
> better help you.
>
> -Nick
>

Re: ability to add custom settings for a connection?

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Sep 1, 2023 at 9:33 AM Steven Barnhart <ba...@gmail.com> wrote:
>
> Hello,
>
> I am interested in building an event listener that would depend on some
> settings/parameters that would be specific to the connection being
> connected to. Is it possible to add custom settings or extend in some way
> for connections?

It depends on what you're trying to do, but it is likely possible
through the addition of connection attributes. In Guacamole, there
are, in general two types of settings that apply to connections:
* Connection Parameters: These are settings for the connections that
ultimately are passed on to guacd to tell guacd how to perform the
connection. Things like the destination hostname, port, authentication
information, etc.
* Connection Attributes: These are settings for the connections that
are generally considered internal to the client and not necessarily
expected to be passed on to guacd, although some might. Things like
concurrency limits and load balancing are examples of this.

Adding connection parameters would be a bit more involved, because
these are expected to impact how guacd performs the connections, which
means that you have to change both the Guacamole Client side and the
Guacamole Server (guacd) side. Attributes are easier since they're
generally limited to the client, but there haven't been very many
extensions that implement additional attributes for connections.
However, I happen to have one in review status right now where I've
added fields for limiting things like when connections can be used and
from what IPs:

https://github.com/apache/guacamole-client/pull/830

You're welcome to have a look at that and see if it makes any sense,
or post back any questions if things don't make sense. You might
clarify what it is you're wanting to implement and we may be able to
better help you.

-Nick