2007-09-17 08:26:46 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
|
|
|
|
|
|
<beans>
|
|
|
|
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="filterChainProxy" class="org.springframework.security.util.FilterChainProxy">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="filterInvocationDefinitionSource">
|
|
|
|
<value>
|
|
|
|
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
|
|
|
PATTERN_TYPE_APACHE_ANT
|
|
|
|
/login_error.jsp=httpSessionContextIntegrationFilter
|
2007-09-22 17:37:44 -04:00
|
|
|
/**=httpSessionContextIntegrationFilter, exceptionTranslationFilter, ntlmFilter, filterSecurityInterceptor
|
2007-09-17 08:26:46 -04:00
|
|
|
</value>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- The first item in the Chain: httpSessionContextIntegrationFilter -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="httpSessionContextIntegrationFilter" class="org.springframework.security.context.HttpSessionContextIntegrationFilter">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="context">
|
2007-09-22 17:37:44 -04:00
|
|
|
<value>org.springframework.security.context.SecurityContextImpl</value>
|
2007-09-17 08:26:46 -04:00
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- the second item in the chain: exceptionTranslationFilter -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="exceptionTranslationFilter" class="org.springframework.security.ui.ExceptionTranslationFilter">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="authenticationEntryPoint" ref="ntlmEntryPoint"/>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- the third item in the chain: ntlmFilter -->
|
2007-09-21 07:41:36 -04:00
|
|
|
<bean id="ntlmFilter" class="org.springframework.security.ui.ntlm.NtlmProcessingFilter">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="defaultDomain" value="YOURDOMAIN"/>
|
|
|
|
<!-- It is better to use a WINS server if available over a specific domain controller
|
|
|
|
<property name="domainController" value="FOO"/> -->
|
|
|
|
<property name="netbiosWINS" value="192.168.0.3"/>
|
|
|
|
<property name="authenticationManager" ref="providerManager"/>
|
|
|
|
</bean>
|
|
|
|
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="providerManager" class="org.springframework.security.providers.ProviderManager">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="providers">
|
|
|
|
<list>
|
|
|
|
<ref local="daoAuthenticationProvider"/>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="daoAuthenticationProvider" class="org.springframework.security.providers.dao.DaoAuthenticationProvider">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="userDetailsService">
|
|
|
|
<ref local="memoryUserDetailsService"/>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- NOTE: You will need to write a custom UserDetailsService in most cases -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="memoryUserDetailsService" class="org.springframework.security.userdetails.memory.InMemoryDaoImpl">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="userMap">
|
|
|
|
<value>jdoe=PASSWORD,ROLE_USER</value>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- the fourth item in the chain: filterSecurityInterceptor -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="filterSecurityInterceptor" class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="authenticationManager"><ref local="providerManager"/></property>
|
|
|
|
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
|
|
|
|
<property name="objectDefinitionSource">
|
|
|
|
<value>
|
|
|
|
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
|
|
|
PATTERN_TYPE_APACHE_ANT
|
|
|
|
/**=ROLE_USER
|
|
|
|
</value>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- authenticationManager defined above -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="accessDecisionManager" class="org.springframework.security.vote.UnanimousBased">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="allowIfAllAbstainDecisions">
|
|
|
|
<value>false</value>
|
|
|
|
</property>
|
|
|
|
<property name="decisionVoters">
|
|
|
|
<list>
|
|
|
|
<ref local="roleVoter"/>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="roleVoter" class="org.springframework.security.vote.RoleVoter"/>
|
2007-09-17 08:26:46 -04:00
|
|
|
|
2007-09-21 07:41:36 -04:00
|
|
|
<bean id="ntlmEntryPoint" class="org.springframework.security.ui.ntlm.NtlmProcessingFilterEntryPoint">
|
2007-09-17 08:26:46 -04:00
|
|
|
<property name="authenticationFailureUrl" value="/login_error.jsp"/>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- Done with the chain -->
|
|
|
|
|
|
|
|
<!-- This bean automatically receives AuthenticationEvent messages from DaoAuthenticationProvider -->
|
2007-09-22 17:37:44 -04:00
|
|
|
<bean id="loggerListener" class="org.springframework.security.event.authentication.LoggerListener"/>
|
2007-09-17 08:26:46 -04:00
|
|
|
|
|
|
|
</beans>
|