Great, works fine.
-------------------------------
And, there is one more hurdle that I am facing now. Presently, the situation is like any member registered in the LDAP server can login into CA Release Automation application. In order to constrain the access only to the members of a particular group (cn=cara-users,ou=groups,ou=devops,o=techmahindra in my case), I had implemented the memberOf attribute (overlay) in my OpenLDAP server. And, in order to use the memberOf attribute (overlay), I gave the following in the applicationContext-acegi-security.xml file:
<b:bean id="ldapAuthProvider"
class="com.nolio.platform.server.dataservices.services.auth.providers.NolioLdapAuthenticationProvider">
<b:constructor-arg>
<b:bean class="org.springframework.security.ldap.authentication.BindAuthenticator">
<b:constructor-arg ref="ldapSecurityContextSource"/>
<b:property name="userDnPatterns">
<b:list>
<b:value>uid={0},ou=devops,o=techmahindra</b:value>
<b:value>memberOf=cn=cara-users,ou=groups,ou=devops,o=techmahindra</b:value>
</b:list>
</b:property>
</b:bean>
</b:constructor-arg>
This is not working for me - that is, even if the user is not a member of cn=cara-users,ou=groups,ou=devops,o=techmahindra,login is possible.
I also tried the following:
<b:bean id="ldapAuthProvider"
class="com.nolio.platform.server.dataservices.services.auth.providers.NolioLdapAuthenticationProvider">
<b:constructor-arg>
<b:bean class="org.springframework.security.ldap.authentication.BindAuthenticator">
<b:constructor-arg ref="ldapSecurityContextSource"/>
<b:property name="userDnPatterns">
<b:list>
<b:value>(&(uid={0},ou=devops,o=techmahindra)(memberOf=cn=cara-users,ou=groups,ou=devops,o=techmahindra))</b:value>
</b:list>
</b:property>
</b:bean>
</b:constructor-arg>
The application crashes in this scenario.
Hence, I am not sure what needs to be done here. Your inputs are much appreciated.