<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="serverManagementSecurityInterceptor" class="org.acegisecurity.intercept.method.aopallia nce.MethodSecurityInterceptor">
<property name="authenticationManager"
ref="authenticationManager" />
<property name="accessDecisionManager"
ref="accessDecisionManager" />
<property name="objectDefinitionSource">
<value>
xx.xxx.loginserver.Server.*=ROLE_READ
</value>
</property>
</bean>
<bean id="accessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased" >
<property name="decisionVoters">
<list>
<bean class="org.acegisecurity.vote.RoleVoter">
<property name="rolePrefix" value="ROLE_" />
</bean>
</list>
</property>
</bean>
<bean id="authenticationManager"
class="org.acegisecurity.providers.ProviderManager " >
<property name="providers">
<list>
<ref local="authenticationProvider" />
</list>
</property>
</bean>
<bean id="authenticationProvider"
class="org.acegisecurity.providers.dao.DaoAuthenti cationProvider">
<property name="userDetailsService" ref="authenticationDao"/>
<property name="hideUserNotFoundExceptions" value="false" />
</bean>
<!-- TODO REPLACE IN MEMORY DAO -->
<bean id="authenticationDao"
class="org.acegisecurity.userdetails.memory.InMemo ryDaoImpl">
<property name="userMap">
<value>
user1=xxx, ROLE_READ
user2=xxx2,ROLE_READ,ROLE_WRITE
</value>
</property>
</bean>
<bean id="autoProxyCreator"
class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<value>serverManagementSecurityInterceptor</value>
</list>
</property>
<property name="beanNames">
<list>
<value>server</value>
</list>
</property>
<property name="proxyTargetClass" value="true" />
</bean>
<bean id="server" class="xx.xxx.loginserver.Server" />
</beans>