<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

   <!-- The passthru servers  -->
   <!-- Properties that specify the server(s) to use for passthru          -->
   <!-- authentication :-                                                  -->
   <!--   useLocalServer   use the local server for authentication         -->
   <!--   domain           use domain controllers from the specified domain-->
   <!--   servers          comma delimted list of server addresses or      -->
   <!--                    names                                           -->
   <bean id="passthruServers" class="org.alfresco.filesys.auth.PassthruServerFactory">
      <property name="localServer">
         <value>${passthru.authentication.useLocalServer}</value>
      </property>
      <property name="server">
         <value>${passthru.authentication.servers}</value>
      </property>
      <property name="domain">
         <value>${passthru.authentication.domain}</value>
      </property>
      <!-- Timeout value when opening a session to an authentication server, in milliseconds -->
      <property name="timeout">
         <value>${passthru.authentication.connectTimeout}</value>
      </property>
      <!-- Offline server check interval in seconds -->
      <property name="offlineCheckInterval">
         <value>${passthru.authentication.offlineCheckInterval}</value>
      </property>
      <property name="protocolOrder">
         <value>${passthru.authentication.protocolOrder}</value>
      </property>
      <property name="nullDomainUseAnyServer">
         <value>true</value>
      </property>
   </bean>

   <!-- The authentication component.                                      -->

   <!-- Use the passthru authentication component to authenticate using    -->
   <!-- user accounts on one or more Windows servers.                      -->

   <bean id="authenticationComponent" class="org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl"
      parent="authenticationComponentBase">
      <property name="passthruServers">
         <ref bean="passthruServers" />
      </property>
      <property name="personService">
         <ref bean="personService" />
      </property>
      <property name="nodeService">
         <ref bean="nodeService" />
      </property>
      <property name="transactionService">
         <ref bean="transactionComponent" />
      </property>
      <property name="guestAccess">
         <value>${passthru.authentication.guestAccess}</value>
      </property>
      <property name="defaultAdministratorUserNameList">
         <value>${passthru.authentication.defaultAdministratorUserNames}</value>
      </property>
   </bean>

   <!-- Wrapped version to be used within subsystem -->
   <bean id="AuthenticationComponent" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
      <property name="proxyInterfaces">
         <list>
            <value>org.alfresco.repo.security.authentication.AuthenticationComponent</value>
            <value>org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator</value>
         </list>
      </property>
      <property name="transactionManager">
         <ref bean="transactionManager" />
      </property>
      <property name="target">
         <ref bean="authenticationComponent" />
      </property>
      <property name="transactionAttributes">
         <props>
            <prop key="*">${server.transaction.mode.default}</prop>
         </props>
      </property>
   </bean>

   <!-- Authenticaton service for chaining -->
   <bean id="localAuthenticationService" class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
      <property name="ticketComponent">
         <ref bean="ticketComponent" />
      </property>
      <property name="authenticationComponent">
         <ref bean="authenticationComponent" />
      </property>
      <property name="sysAdminParams">
         <ref bean="sysAdminParams" />
      </property>
      <property name="auditComponent">
         <ref bean="auditComponent" />
      </property>
   </bean>

   <!-- CIFS authentication and SMB session listener -->
   <bean id="cifsAuthenticator" class="org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator" parent="cifsAuthenticatorBase">
      <property name="active">
         <value>${passthru.authentication.authenticateCIFS}</value>
      </property>
      <property name="passthruServers">
         <ref bean="passthruServers" />
      </property>
   </bean>

   <!-- FTP authentication -->
   <bean id="ftpAuthenticator" class="org.alfresco.filesys.auth.ftp.PassthruFtpAuthenticator" parent="ftpAuthenticatorBase">
      <property name="active">
         <value>${passthru.authentication.authenticateFTP}</value>
      </property>
      <property name="passthruServers">
         <ref bean="passthruServers" />
      </property>
   </bean>

</beans>