Hi all, Could anyone please let me know where I did the mistake in configuring t

Hi all, Could anyone please let me know where I did the mistake in configuring the ldap?
Let us suppose that there is an ldap server at port 389 like this : LDAP://appianldap:389/DC=sampleDC,DC=com.
Assume that there is a user by name "User1" with password as "User@123" in ldap directory. Here User1 have all privileges. Is this configuration fine or do I need to do anything apart from this?
<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<property name="userDn" value="cn=User1,dc=sampleDC,dc=com"/>
<property name="password" value="User@123"/>
</bean>

In documentation it is mentioned that we need to provide "manager DN" credentials here. What do manager DN mean?
Also could anyone please let me know what is the role played by "userSearch" bean? Even I am seeing an error numbered 712 in the console relating to the spring framework. Could anyone let me know the reason for this?...

OriginalPostID-73347

OriginalPostID-73347

  Discussion posts and replies are publicly visible

  • The userDn/password in the DefaultSpringSecurityContextSource bean are the credentials of a user authorized to bind to and search for other users in the LDAP server.

    In regards to your question about the userSearch bean of type FilterBasedLdapUserSearch; this bean uses an LDAP filter to match the user object in the directory. The only valid parameter is {0} which will be replaced with the user's login name. This bean receives three arguments in its constructor through this configuration file:

    constructor-arg 0: search base (where to start the search from). Not required if the search base was specified in the LDAP server URL.

    constructor-arg 1: searchFilter. Make sure the right field is used. Most of the times you will use CN or sAMAccountName
    If a more complex filter is required, it will be passed here as explained in the documentation, for instance:

    <constructor-arg index="1" value="(&amp;(sAMAccountName={0})(memberof=CN=appianUsers,OU=Groups,OU=BPM,DC=appian,DC=corp))"/>

    constructor-arg 2: contextSource (this is the bean that contains the credentials used to bind to the LDAP server)

  • @eduardo Thanks a lot for the clear-cut explanation provided