1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="daoAuthenticationProvider"
class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="userDetailsService">
<ref bean="userService" />
</property>
<property name="saltSource">
<ref bean="reflectionSaltSource" />
</property>
<property name="passwordEncoder">
<ref bean="md5PasswordEncoder" />
</property>
<property name="hideUserNotFoundExceptions">
<value>false</value>
</property>
</bean>
<bean id="authenticationManager"
class="org.acegisecurity.providers.ProviderManager" abstract="false"
singleton="true" lazy-init="default" autowire="default"
dependency-check="default">
<property name="providers">
<list>
<ref bean="rememberMeAuthenticationProvider"/>
<ref bean="daoAuthenticationProvider"/>
</list>
</property>
</bean>
<bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="rolePrefix">
<value>ROLE_</value>
</property>
</bean>
<bean id="accessDecisionManager"
class="org.acegisecurity.vote.AffirmativeBased" abstract="false"
singleton="true" lazy-init="default" autowire="default"
dependency-check="default">
<property name="decisionVoters">
<list>
<ref bean="roleVoter" />
</list>
</property>
<property name="allowIfAllAbstainDecisions">
<value>false</value>
</property>
</bean>
<bean id="filterSecurityInterceptor"
class="org.acegisecurity.intercept.web.FilterSecurityInterceptor"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="authenticationManager">
<ref bean="authenticationManager" />
</property>
<property name="accessDecisionManager">
<ref bean="accessDecisionManager" />
</property>
<property name="objectDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/login.jsf=ROLE_ANONYMOUS
/*.jsf=ROLE_VIEWER,ROLE_USER,ROLE_ADMIN,ROLE_SUPERADMIN
/pages/core/**=ROLE_ADMIN,ROLE_SUPERADMIN
</value>
</property>
<property name="validateConfigAttributes">
<value type="boolean">true</value>
</property>
</bean>
<bean id="formLoginAuthenticationProcessingFilter"
class="org.acegisecurity.ui.basicauth.BasicProcessingFilterEntryPoint"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="realmName">
<value>Ebonus authentification</value>
</property>
</bean>
<bean id="exceptionTranslationFilter"
class="org.acegisecurity.ui.ExceptionTranslationFilter"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="authenticationEntryPoint">
<ref bean="formLoginAuthenticationEntryPoint" />
</property>
</bean>
<bean id="httpSessionContextIntegrationFilter"
class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
</bean>
<bean id="filterChainProxy"
class="org.acegisecurity.util.FilterChainProxy" abstract="false"
singleton="true" lazy-init="default" autowire="default"
dependency-check="default">
<property name="filterInvocationDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/**=httpSessionContextIntegrationFilter,formAuthenticationProcessingFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
</value>
</property>
</bean>
<!-- Filter to integrate user roles with HttpServletRequest -->
<bean id="securityContextHolderAwareRequestFilter"
class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter" />
<bean id="loggerListener"
class="org.acegisecurity.event.authentication.LoggerListener" />
<!-- <bean id="basicProcessingFilter"-->
<!-- class="org.acegisecurity.ui.basicauth.BasicProcessingFilter"-->
<!-- abstract="false" singleton="true" lazy-init="default"-->
<!-- autowire="default" dependency-check="default">-->
<!-- <property name="authenticationManager">-->
<!-- <ref bean="authenticationManager" />-->
<!-- </property>-->
<!-- <property name="authenticationEntryPoint">-->
<!-- <ref bean="authenticationEntryPoint" />-->
<!-- </property>-->
<!-- </bean>-->
<bean id="plainTextPasswordEncoder"
class="org.acegisecurity.providers.encoding.PlaintextPasswordEncoder"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
</bean>
<!-- bean used for the form login authentification -->
<bean id="formAuthenticationProcessingFilter"
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="authenticationManager">
<ref bean="authenticationManager" />
</property>
<property name="authenticationFailureUrl">
<value>/login.jsf?login_error=1</value>
</property>
<property name="defaultTargetUrl">
<value>/</value>
</property>
<property name="filterProcessesUrl">
<value>/j_acegi_security_check.jsp</value>
</property>
<property name="rememberMeServices">
<ref bean="rememberMeServices"/>
</property>
</bean>
<bean id="formLoginAuthenticationEntryPoint"
class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="loginFormUrl">
<value>/login.jsf</value>
</property>
<property name="forceHttps">
<value>false</value>
</property>
</bean>
<bean id="rememberMeServices"
class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices">
<property name="userDetailsService">
<ref bean="userService" />
</property>
<property name="key">
<value>eBonus</value>
</property>
<property name="tokenValiditySeconds">
<value>1209600</value>
</property>
<property name="parameter">
<value>_acegi_security_remember_me</value>
</property>
</bean>
<bean id="rememberMeAuthenticationProvider"
class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider">
<property name="key">
<value>eBonus</value>
</property>
</bean>
<bean id="rememberMeProcessingFilter"
class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter">
<property name="rememberMeServices">
<ref local="rememberMeServices" />
</property>
<property name="authenticationManager">
<ref local="authenticationManager" />
</property>
</bean>
<bean id="anonymousProcessingFilter"
class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
<property name="key">
<value>anonymous</value>
</property>
<property name="userAttribute">
<value>anonymous,ROLE_ANONYMOUS</value>
</property>
</bean>
<bean id="anonymousAuthenticationProvider"
class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
<property name="key">
<value>anonymous</value>
</property>
</bean>
</beans> |
Partager