Fandom

Documentation

AcegiMsad

133pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Acegi Security and Microsoft Active Directory 2003 Edit

Used versions:

  • Spring Framework 1.2.8
  • Acegi Security 1.0.3
   <bean id="initialDirContextFactory"
      class="org.acegisecurity.ldap.DefaultInitialDirContextFactory">
      <constructor-arg
         value="ldap://ldap.myserver.com:389/dc=myserver,dc=com" />
      <property name="managerDn">
         <value>
            <![CDATA[cn=LDAPUser,ou=Country,dc=myserver,dc=com]]>
         </value>
      </property>
      <property name="managerPassword">
         <value>SomePassword</value>
      </property>
      <property name="extraEnvVars">
         <map>
            <entry>
               <key>
                  <value>java.naming.referral</value>
               </key>
               <value>follow</value>
            </entry>
         </map>
      </property>
   </bean>

   <bean id="authenticationProvider"
      class="org.acegisecurity.providers.ldap.LdapAuthenticationProvider">
      <constructor-arg>
         <ref local="bindAuthenticator" />
      </constructor-arg>
      <constructor-arg>
         <ref local="defaultLdapAuthoritiesPopulator" />
      </constructor-arg>
   </bean>

   <bean id="bindAuthenticator"
      class="org.acegisecurity.providers.ldap.authenticator.BindAuthenticator">
      <constructor-arg>
         <ref local="initialDirContextFactory" />
      </constructor-arg>
      <property name="userSearch">
         <ref local="userSearch" />
      </property>
   </bean>

   <bean id="defaultLdapAuthoritiesPopulator"
      class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator">
      <constructor-arg>
         <ref local="initialDirContextFactory" />
      </constructor-arg>
      <constructor-arg>
         <value></value>
      </constructor-arg>
      <property name="convertToUpperCase">
         <value>true</value>
      </property>
      <property name="rolePrefix">
         <value></value>
      </property>
      <property name="searchSubtree">
         <value>true</value>
      </property>
      <property name="groupSearchFilter">
         <value>member={0}</value>
      </property>
      <property name="groupRoleAttribute">
         <value>cn</value>
      </property>
   </bean>

   <bean id="userSearch"
      class="org.acegisecurity.ldap.search.FilterBasedLdapUserSearch">
      <constructor-arg>
         <value></value>
      </constructor-arg>
      <constructor-arg>
         <value>(sAMAccountName={0})</value>
      </constructor-arg>
      <constructor-arg>
         <ref local="initialDirContextFactory" />
      </constructor-arg>
      <property name="searchSubtree">
         <value>true</value>
      </property>
      <property name="derefLinkFlag">
         <value>true</value>
      </property>
   </bean>

Also on Fandom

Random Wiki