You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Dennis <de...@googlemail.com> on 2019/02/19 14:10:46 UTC

Custom User Attributes

Hi again,

is there an easy way to add additional user attributes to guacamole, which
can be edited or set if I create a new user?(Need an additional attribute
for my custom authentication extension)

Thanks.

Re: Custom User Attributes

Posted by Nick Couchman <vn...@apache.org>.
On Wed, Feb 20, 2019 at 3:20 AM Dennis <de...@googlemail.com> wrote:

> Thanks for your fast reply.
> That way I can only attach this attribute temporarily to the user object,
> right?(maybe i misunderstood the concept of decorate)
> It should be possible to edit this attribute(stored in the DB) via the
> guacamole backend(edit user, new user)
>

Yes, you can do this - you can create new Form objects within the module
that have the attributes you wish to attach to the users.  It's reasonably
straight-forward.


>
> My solution atm:
> I've customized the jdbc-mysql extension to add this attribute to the
> backend. (and it seems to work perfectly)
> I think there is no easy to achieve this at the moment.
>

This is essentially what you're doing with decoration, but without touching
the source code of the original module.  It definitely takes a little
getting used to, but it is pretty easy once you get it down.

-Nick

>

Re: Custom User Attributes

Posted by Dennis <de...@googlemail.com>.
Thanks for your fast reply.
That way I can only attach this attribute temporarily to the user object,
right?(maybe i misunderstood the concept of decorate)
It should be possible to edit this attribute(stored in the DB) via the
guacamole backend(edit user, new user)

My solution atm:
I've customized the jdbc-mysql extension to add this attribute to the
backend. (and it seems to work perfectly)
I think there is no easy to achieve this at the moment.


Am Di., 19. Feb. 2019 um 16:34 Uhr schrieb Nick Couchman <vn...@apache.org>:

> On Tue, Feb 19, 2019 at 9:11 AM Dennis <de...@googlemail.com> wrote:
>
>> Hi again,
>>
>> is there an easy way to add additional user attributes to guacamole,
>> which can be edited or set if I create a new user?(Need an additional
>> attribute for my custom authentication extension)
>>
>>
> You'll want to "decorate" the user object in your extension.  You can use
> the TOTP module as a good example of putting attributes on an existing user
> account, as this is how the TOTP module stores the second factor
> information related to the users.  Take a look at that and see if it makes
> sense, and feel free to post back in any questions, here.  It's taken me a
> little getting used to to wrap my mind around the decoration, but once you
> get familiar with the concept it should be pretty straightforward to
> implement.
>
> -Nick
>

Re: Custom User Attributes

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Feb 19, 2019 at 9:11 AM Dennis <de...@googlemail.com> wrote:

> Hi again,
>
> is there an easy way to add additional user attributes to guacamole, which
> can be edited or set if I create a new user?(Need an additional attribute
> for my custom authentication extension)
>
>
You'll want to "decorate" the user object in your extension.  You can use
the TOTP module as a good example of putting attributes on an existing user
account, as this is how the TOTP module stores the second factor
information related to the users.  Take a look at that and see if it makes
sense, and feel free to post back in any questions, here.  It's taken me a
little getting used to to wrap my mind around the decoration, but once you
get familiar with the concept it should be pretty straightforward to
implement.

-Nick