How do I configure Directory Mappings to support nested/recursive LDAP groups?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PAM Self-Hosted Articles
2 min read
L1 Bithead
No ratings
How do I configure Directory Mappings to support nested LDAP groups?

Steps

The Directory Mapping query needs to be changed from 

(&(objectclass=person)(memberof=cn=topgroup,cn=users,dc=domain,dc=com)) 

to 

(&(objectclass=person)(memberof:1.2.840.113556.1.4.1941:=cn=topgroup,cn=users,dc=domain,dc=com))

 
1.2.840.113556.1.4.1941 is the matching rule OID and the string identifier is LDAP_MATCHING_RULE_IN_CHAIN.  This rule is limited to filters that apply to the DN. This is a special "extended match operator that walks the chain of ancestry in objects all the way to the root until it finds a match.

For this Nested group query to work GroupRecursiveSearch=Yes needs to be set in PVWA. To do this perform the following steps:

1. Log into PVWA
2. Administration > LDAP Integration > Profiles > MicrosoftADProfile.ini
3. Set GroupRecursiveSearch = Yes
4. Ok to save change.


Note: If you have a large AD instance, this setting may cause significant performance issues. It will search every group and sub group for the user.
 
If possible re-configuring the Directory Mapping to be lower in the OU structure will reduce the number of directories to search.  
 
Q:

 

 

How do I configure Directory Mappings to support nested LDAP groups?
 
A: 
Directory Mapping query needs to be changed from

(&(objectclass=person)(memberof=cn=topgroup,cn=users,dc=domain,dc=com))


to

(&(objectclass=person)(memberof:1.2.840.113556.1.4.1941:=cn=topgroup,cn=users,dc=domain,dc=com))

 
1.2.840.113556.1.4.1941 is the matching rule OID and the string identifier is LDAP_MATCHING_RULE_IN_CHAIN.  This rule is limited to filters that apply to the DN. This is a special "extended match operator that walks the chain of ancestry in objects all the way to the root until it finds a match.

For this Nested group query to work GroupRecursiveSearch=Yes needs to be set in PVWA.

Log into PVWA

Administration > LDAP Integration > Profiles > MicrosoftADProfile.ini

Set GroupRecursiveSearch = Yes

Ok to save change.

 

Note: If you have a large AD instance, this setting may cause significant performance issues. It will search every group and sub group for the user.

 

If possible re-configuring the Directory Mapping to be lower in the OU structure will reduce the number of directories to search.  

 
Rate this article: