Vault - How to retrieve LDAP users with matching patterns in their names, using an LDAP query in a Vault directory mapping?
86
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 16:04 PM
Objective
Sometimes, it can be requested including in a mapped group, LDAP users having common patterns in their names (Like 'john.doe' and 'jane.doe').
This article shows how to retrieve those users using an LDAP query.
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8
Procedure
Using a query like the following one, the users with username starting with letter 'j' and ending with the letters 'doe' will be retrieved:
(&(objectclass=person)(displayName=j*doe))
This query can be used in the PrivateArk Client to retrieve the desired users:
Note that, a filter argument with a trailing *, can be evaluated almost instantaneously via an index lookup.
However, a leading * implies a sequential search through the index, so it can be really slow. Therefore, in big environments, it should be used carefully.