Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update LDAP manager security credentials to use permanent manager logi

Status
Not open for further replies.

patharh

Programmer
Jan 10, 2012
1
GB
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns=" xmlns:xsi=" xmlns:security=" xmlns:util=" xsi:schemaLocation="
<bean id="userSearch"
class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg index="0" value="ou=IGGroup,ou=IG Users" />
<constructor-arg index="1" value="sAMAccountName={0}" />
<constructor-arg index="2" ref="initialDirContextFactory" />
<property name="searchSubtree" value="true" />
</bean>
<!--
<bean id="userSearch"
class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg index="0"
value="ou=IT,ou=IGUK,ou=IGGroup,ou=IG Users" />
<constructor-arg index="1"
value="((objectclass=user)(sAMAccountName=KoprulM)(memberOf=CN=RLE-IT-DEVELOPMENT-TESTING-Testing and Analysis Staff,OU=Role,OU=Security Groups,OU=Administrative Area,DC=igi,DC=ig,DC=local))" />
<constructor-arg index="2" ref="initialDirContextFactory" />
<property name="searchSubtree" value="true" />
</bean>
-->
<bean id="ldapAuthProvider"
class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
<constructor-arg>
<bean
class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
<constructor-arg ref="initialDirContextFactory" />
<property name="userSearch" ref="userSearch" />
</bean>
</constructor-arg>
<constructor-arg ref="ldapAuthoritiesPopulator" />

</bean>

<bean id="ldapAuthoritiesPopulator"
class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator">
<constructor-arg ref="initialDirContextFactory" />
<constructor-arg
value="ou=Role,ou=Security Groups,ou=Administrative Area" />



</bean>





<bean id="initialDirContextFactory"
class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
<constructor-arg
value="ldap://igi.ig.local:389/dc=igi,dc=ig,dc=local" />
<property name="extraEnvVars" ref="environmentMap" />

<property name="managerDn" value="igi\patharh" />
<property name="managerPassword" value="******" />

</bean>

<util:map id="environmentMap" map-class="java.util.HashMap">
<entry key="java.naming.security.principal" value="user" />
<entry key="java.naming.security.credentials" value="password" />
<entry key="java.naming.security.authentication" value="simple" />
<entry key="java.naming.factory.initial"
value="com.sun.jndi.ldap.LdapCtxFactory" />


</util:map>
</beans>









This is the xml we are using where we are hard-coding the username
and password(here i have given as *****).
i have a login pase and have used spring framework's acegi security and integrated it with ldap.


can any one help me out what needs to be done?please!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top