I have basic sample 3.2.4 ldap-xml script downloaded from spring security. The only part modified is the application security context.xml
to point to my ldap server instead of dummy server.
<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="ldap://server:389"/>
<property name="userDn" value="cn=myUsername"/>
<property name="password" value="myPassword"/>
</bean>
Now thing is, no matter what I provide in userDn
value, whether it is, "afdjljaf" or "1234244" or even " ". I get error as
"LDAP: error code 49 - 80090308 : LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e".
Using AdFind.exe "http://www.joeware.net/freetools/tools/adfind/usage.htm", using same userDn (Lets assume my userDn is XYZ, and password is passxyz), I am able to login in ldap server using command
"Adfind.exe -h server:port -u XYZ -up passxyz"
I am able to connect to ldap server successfully and browse directory.
Can someone please tell me equivalent value for userDn and password properties that I should put in security context xml?