Guest user self-registration is one of my favourite things. It allows users to create their own account without invoking a helpdesk ticket. Sponsorship means an account has to be approved before it becomes active.
Typically e-mail is used to reach the sponsor and tends to be specified as a hidden field in the form, a drop down menu or an LDAP search.
I recently configured this for a customer who wanted to search their on site Active Directory for the sponsor, specifically users within a group of which only other groups were a member. A nested group. Nested groups are very common in organisations but I struggled to find some clear documentation on how to make it work for this particular use case.
First add the sponsor lookup field to your self-registration form
To do this open the form and in the appropriate place add a field. Then on the form field editor, select sponsor_lookup. You probably want this to be a required field.
You also need to add the LDAP server to ClearPass Guest.
From Administration > Operator Logins > Servers select “Create new LDAP server”.
If this is an AD server it will be using LDAPs v3. ClearPass Guest automatically uses this version of the protocol when Active Directory is selected as the server type.
Enter the server URL in the format ldap://<servername>/dc=<domain>,dc=<suffix>
The Bind DN and Bind Username will likely be the same <user>@<domain>
At this point, you should be able to perform lookups or searches against the directory. In my case I needed to restrict the search to a distribution group. This uses a LDAP OID 1.2.840.1135188.8.131.521
So, as per the screenshot above, choose a custom LDAP filter. Here’s the filter I’ve used:
(& (objectClass=user) (objectCategory=person) (| # Match users in any of these groups (memberOf:1.2.840.1135184.108.40.2061:=CN=groupname,OU=ou-name,DC=domain,DC=com) ) (| # Match users by any of these criteria (sAMAccountName=*@SEARCH@*) (displayName=*@SEARCH@*) (cn=*@SEARCH@*) (sn=*@SEARCH@*) (givenName=*@SEARCH@*) ) )
As the comment suggests you can add more groups to the search. For a primary group that users are members of the format is (memberOf=CN=Wireless,CN=Users,DC=clearpass,DC=aruba,DC=com)
This query worked a treat and meant when searching guests wouldn’t be presented with accounts for admin users or meeting rooms.