Hello friends,
I am applying Acegi to jaxws2.0 webservices. I want to authenticate the consumer through ldap database.i have configured it as follows ...
<bean id="initialDirContextFactory" class="org.acegisecurity.ldap.DefaultInitialDirCon textFactory">
<constructor-arg value="ldap://agni:389"/>
<property name="managerDn">
<value>cn=syscon,ou=HSPL,dc=harbinger,dc=com</value>
</property>
<property name="managerPassword">
<value>syscon</value>
</property>
</bean>
<bean id="userSearch" class="org.acegisecurity.ldap.search.FilterBasedLd apUserSearch">
<constructor-arg index="0">
<value>cn=Computers,dc=harbinger,dc=com</value>
</constructor-arg>
<constructor-arg index="1">
<value>(cn={0})</value>
</constructor-arg>
<constructor-arg index="2">
<ref local="initialDirContextFactory"/>
</constructor-arg>
<property name="searchSubtree">
<value>true</value>
</property>
</bean>
<bean id="ldapAuthProvider" class="org.acegisecurity.providers.ldap.LdapAuthen ticationProvider" >
<constructor-arg index="0">
<!--bean class="org.me.security.BindAuthenticator">
<constructor-arg><ref local="initialDirContextFactory" /></constructor-arg>
<property name="userDnPatterns"><list><value>cn=Computers,dc =harbinger,dc=com</value></list></property>
</bean-->
<bean class="org.acegisecurity.providers.ldap.authentica tor.PasswordComparisonAuthenticator">
<constructor-arg><ref local="initialDirContextFactory"/></constructor-arg>
<property name="userDnPatterns"><value>cn=(0),CN=Users,dc=sy scon,dc=com</value></property>
<property name="userSearch" ref="userSearch"/>
</bean>
</constructor-arg>
<constructor-arg index="1">
<bean class="org.acegisecurity.providers.ldap.populator. DefaultLdapAuthoritiesPopulator">
<constructor-arg index="0"><ref local="initialDirContextFactory" /></constructor-arg>
<constructor-arg index="1"><value>cn=groups,</value></constructor-arg>
<property name="groupRoleAttribute"><value>cn</value></property>
</bean>
</constructor-arg>
</bean>
I have tried 3 ways to achiece this
1) PasswordComparisonAuthenticator :- here i am getting error
org.acegisecurity.AuthenticationServiceException: LdapCallback;[LDAP: error code 1 - 000020D6: SvcErr: DSID-03100684, problem 5012 (DIR_ERROR), data 0
2)BindAuthenticator :
3)FilterBasedLdapUserSearch here i get same error as in point 1.
I also received error code 16 and 49 when i was trying different values of search filter
Can anybody help me with this....It will be really greatful.
Thanks in advance


Reply With Quote