You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Jason Keltz <ja...@yorku.ca> on 2021/05/21 14:57:22 UTC

disable access to guacamole for users in a particular AD group

Hi.

I'd like to disable access to login to Guacamole for users in a 
particular AD group.  This would be like the "DenyGroups" option in 
sshd_config.   Is this possible?

I tried the "Disabled" state in the admin, but that doesn't seem to do 
anything.    Even if the user is in other groups for which they have 
access, if they are in the particular group, access should be denied.

Jason.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: disable access to guacamole for users in a particular AD group

Posted by Nick Couchman <vn...@apache.org>.
On Sat, May 22, 2021 at 9:24 AM Allen Chen <ac...@harbourfrontcentre.com>
wrote:

>
> On 5/21/2021 6:06 PM, Mike Jumper wrote:
>
> On Fri, May 21, 2021 at 8:06 AM Jason Keltz <ja...@yorku.ca> wrote:
>
>> Hi.
>>
>> I'd like to disable access to login to Guacamole for users in a
>> particular AD group.  This would be like the "DenyGroups" option in
>> sshd_config.   Is this possible?
>>
>
> Yes - you would need to:
>
>    1. Use a search DN ("ldap-search-bind-dn" and
>    "ldap-search-bind-password"), if you aren't already.
>    2. Specify an LDAP user filter ("ldap-user-search-filter") to restrict
>    users to only those that _aren't_ members of the group in question.
>
> How do I specify an LDAP user filter if I want users in "marketing" group
> have access to Guacamole? Example:
>
> Users are located in "ou=users,dc=mydomain,dc=com", e.g.
> "uid=myid,ou=users,dc=mydomain,dc=com"
> Groups are located in "ou=groups,dc=mydomain,dc=com", e.g.
> "cn=marketing,ou=groups,dc=mydomain,dc=com" has "memberuid=myid"
>
> How do we do this: verify password from "ou=users", and then allow the
> user if he is a member of "cn=marketing,ou=groups,dc=mydomain,dc=com".
> Two conditions must be verified from two OUs.
>

Here's an example of an Active Directory user search filter that I use:

ldap-user-search-filter:
(&(objectClass=user)(|(memberOf=CN=Guacamole_Admins,OU=Guacamole_Groups,OU=Groups,DC=domain,DC=com)(memberOf=CN=Guacamole_Group1,OU=Guacamole_Groups,OU=Groups,DC=domain,DC=com)))

You'll need to adjust based on what your LDAP server uses to for group
membership, but the thing to keep in mind is that this is the search filter
that will look at each user object, not group objects - so you need to
specify a filter that can be applied to users, which is why I use
"(memberOf=<group>)".

If you want a filter that excludes members of a certain group, you could do
something like this:

ldap-user-search-filter:
(&(objectClass=user)(!(memberOf=CN=Guacamole_Disabled,OU=Guacamole_Groups,OU=Groups,DC=domain,DC=com))(|(memberOf=CN=Guacamole_Admins,OU=Guacamole_Groups,OU=Groups,DC=domain,DC=com)(memberOf=CN=Guacamole_Group1,OU=Guacamole_Groups,OU=Groups,DC=domain,DC=com)))

(I think this is correct - always have a bit of trouble getting the right
number of parentheses!) This should filter out any users that are a part of
the Guacamole_Disabled group, and should prefer that part of the search
over verifying membership in the other groups. You can get quite fancy with
these filters - for example, a little re-arrangement of the above filter
would allow you to always allow users in the Guacamole_Admins group, but
then filter out any other users from the Guacamole_Disabled group, and
allow users in the Guacamole_Group1 group.

I recommend reading up on LDAP filtering:

https://ldap.com/ldap-filters/
https://docs.oracle.com/cd/E26217_01/E26214/html/ldap-filters-attrs-users.html

-Nick

>

Re: disable access to guacamole for users in a particular AD group

Posted by Allen Chen <ac...@harbourfrontcentre.com>.
On 5/21/2021 6:06 PM, Mike Jumper wrote:
> On Fri, May 21, 2021 at 8:06 AM Jason Keltz <jas@yorku.ca 
> <ma...@yorku.ca>> wrote:
>
>     Hi.
>
>     I'd like to disable access to login to Guacamole for users in a
>     particular AD group.  This would be like the "DenyGroups" option in
>     sshd_config.   Is this possible?
>
>
> Yes - you would need to:
>
>  1. Use a search DN ("ldap-search-bind-dn" and
>     "ldap-search-bind-password"), if you aren't already.
>  2. Specify an LDAP user filter ("ldap-user-search-filter") to
>     restrict users to only those that _aren't_ members of the group in
>     question.
>
How do I specify an LDAP user filter if I want users in "marketing" 
group have access to Guacamole? Example:

Users are located in "ou=users,dc=mydomain,dc=com", e.g. 
"uid=myid,ou=users,dc=mydomain,dc=com"
Groups are located in "ou=groups,dc=mydomain,dc=com", e.g. 
"cn=marketing,ou=groups,dc=mydomain,dc=com" has "memberuid=myid"

How do we do this: verify password from "ou=users", and then allow the 
user if he is a member of "cn=marketing,ou=groups,dc=mydomain,dc=com".
Two conditions must be verified from two OUs.

Allen

> If this is done, then users that are members of that group will 
> effectively not exist as far as Guacamole is concerned. As long as a 
> search DN is used, any user that doesn't match the filter will not be 
> able to sign into Guacamole.
>
>     I tried the "Disabled" state in the admin, but that doesn't seem
>     to do
>     anything.    Even if the user is in other groups for which they have
>     access, if they are in the particular group, access should be denied.
>
>
> The "Disabled" attribute for user groups only disables inheritance of 
> permissions from that group. It's a quick way to effectively turn off 
> a group and doesn't disable overall access. You can think of it as a 
> soft, reversible delete.
>
> From 
> http://guacamole.apache.org/doc/gug/administration.html#user-group-management 
> <http://guacamole.apache.org/doc/gug/administration.html#user-group-management>:
>
> "If you have delete permission on the group, you will also see a 
> "Delete" button. Clicking this button will permanently delete the 
> group. *Alternatively, if you only wish to temporarily disable the 
> effects of membership in the group, checking "Disabled" will achieve 
> the same effect while not removing the group entirely.*"
>
> Michael Jumper
> CEO, Lead Developer
> Glyptodon Inc <https://glyp.to/>.

 

Re: disable access to guacamole for users in a particular AD group

Posted by Mike Jumper <mi...@glyptodon.com>.
On Fri, May 21, 2021 at 8:06 AM Jason Keltz <ja...@yorku.ca> wrote:

> Hi.
>
> I'd like to disable access to login to Guacamole for users in a
> particular AD group.  This would be like the "DenyGroups" option in
> sshd_config.   Is this possible?
>

Yes - you would need to:

   1. Use a search DN ("ldap-search-bind-dn" and
   "ldap-search-bind-password"), if you aren't already.
   2. Specify an LDAP user filter ("ldap-user-search-filter") to restrict
   users to only those that _aren't_ members of the group in question.

If this is done, then users that are members of that group will effectively
not exist as far as Guacamole is concerned. As long as a search DN is used,
any user that doesn't match the filter will not be able to sign into
Guacamole.

I tried the "Disabled" state in the admin, but that doesn't seem to do
> anything.    Even if the user is in other groups for which they have
> access, if they are in the particular group, access should be denied.
>

The "Disabled" attribute for user groups only disables inheritance of
permissions from that group. It's a quick way to effectively turn off a
group and doesn't disable overall access. You can think of it as a soft,
reversible delete.

From
http://guacamole.apache.org/doc/gug/administration.html#user-group-management
:

"If you have delete permission on the group, you will also see a "Delete"
button. Clicking this button will permanently delete the group. *Alternatively,
if you only wish to temporarily disable the effects of membership in the
group, checking "Disabled" will achieve the same effect while not removing
the group entirely.*"

Michael Jumper
CEO, Lead Developer
Glyptodon Inc <https://glyp.to/>.