{0}
+ * is the user's full DN while {1} is the username. If non-null it will override the default specified in
+ * {@code LDAPBindSecurityRealm.groovy}
+ *
+ * @since 1.5
+ */
+ public final String groupMembershipFilter;
+
/*
Other configurations that are needed:
@@ -314,19 +331,35 @@ public class LDAPSecurityRealm extends AbstractPasswordBasedSecurityRealm {
*/
private transient Map+ When Jenkins resolves a user, the next step in the resolution process is to determine the LDAP groups that + the user belongs to. This field controls the search filter that is used to determine group membership. + If left blank, the default filter will be used. +
++ The default default filter is: +
+(| (member={0}) (uniqueMember={0}) (memberUid={1}))
+
+ This can be overridden by creating a file $JENKINS_HOME/LDAPBindSecurityRealm.groovy. Irrespective
+ of what the default is, setting this filter to a non-blank value will determine the filter used.
+
+ You are normally safe leaving this field unchanged, however for large LDAP servers where you are seeing messages
+ such as OperationNotSupportedException - Function Not Implemented,
+ Administrative Limit Exceeded or similar periodically when trying to login, then that would
+ indicate that you should change to a more optimum filter for your LDAP server, namely one that queries only
+ the required field, such as:
+
(member={0})
+ + Note: in this field there are two available substitutions: +
+{0} - the fully qualified DN of the user{1} - the username portion of the user+ When Jenkins is asked to determine if a named group exists, it uses a default filter of: +
+(& (cn={0}) (| (objectclass=groupOfNames) (objectclass=groupOfUniqueNames) (objectclass=posixGroup)))
+
+ relative to the Group search base to determine if there is a group with the specified name (
+ {0} is substituted by the name being searched for)
+
+ If you know your LDAP server only stores group information in one specific object class, then you can improve
+ group search performance by restricting the filter to just the required objectclass.
+
+ Note: if you are using the LDAP security realm to connect to Active Directory (as opposed to using the + Active Directory plugin's + security realm) then you will need to change this filter to: +
+(& (cn={0}) (objectclass=group) )
+
+ Note: if you leave this empty, the default search filter will be used, unless the
+ hudson.security.LDAPSecurityRealm.groupSearch has been set to modify the default.
+