Hi Folks,
My company doesn't allows us to put ldap credentials in clear text password in in spring context configuration file. Since we need to put the encrypted password, how can I control the LDAP Context to decrypt the password before doing any search operation. This is how my config file will look like:-
<beans>
<bean id="ldapcontext" class="org.springframework.ldap.core.support.LdapC ontextSource">
<property name="url" value="ldap://host.arcds.com:XXXX" />
<property name="base" value="dc=mycorp,dc=com" />
<property name="userName" value="cn=Directory Manager" />
<property name="password" value="encrypted password" />
<property name="pooled" value="true" />
</bean>
<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate" >
<constructor-arg ref="ldapcontext" />
</bean>
<bean id="personDao" class="com.mycorp.ldap.dao.personDaoImpl">
<property name="ldapTemplate" ref="ldapTemplate" />
</bean>
</beans>
Since we are injecting the ldapcontext in our bean, how do I make my password decrypt before ldaptemplate binds with the LDAP for any search or CRUD operation.
Please help.
Thanks
Amit


Reply With Quote
