1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
4
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
5
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
6
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
|
7
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
8
|
|
9
|
<context:annotation-config />
|
10
|
|
11
|
<import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServiceClients.xml" />
|
12
|
|
13
|
<bean id="cdmEntitySessionManager"
|
14
|
class="eu.etaxonomy.taxeditor.session.CdmEntitySessionManager" />
|
15
|
|
16
|
<bean id="cdmApplicationRemoteConfiguration"
|
17
|
class="eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration" />
|
18
|
|
19
|
|
20
|
<bean id="cdmServiceRequestExecutor"
|
21
|
class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor" />
|
22
|
|
23
|
<bean id="cachedCommonService"
|
24
|
class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" />
|
25
|
|
26
|
<bean id="accessDecisionManager"
|
27
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.UnanimousBasedUnrevokable" >
|
28
|
|
29
|
<property name="decisionVoters">
|
30
|
<list>
|
31
|
<bean
|
32
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.GrantAlwaysVoter" />
|
33
|
<bean
|
34
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonNodeVoter" />
|
35
|
<bean
|
36
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.TaxonBaseVoter" />
|
37
|
<bean
|
38
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionBaseVoter" />
|
39
|
<bean
|
40
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.voter.DescriptionElementVoter" />
|
41
|
</list>
|
42
|
</property>
|
43
|
</bean>
|
44
|
|
45
|
<!-- CdmPermissionEvaluator.hasPermissions() evaluates the CdmPermissions
|
46
|
like TAXONNODE.UPDATE{20c8f083-5870-4cbd-bf56-c5b2b98ab6a7} -->
|
47
|
<bean id="cdmPermissionEvaluator"
|
48
|
class="eu.etaxonomy.cdm.persistence.hibernate.permission.CdmPermissionEvaluator">
|
49
|
<property name="accessDecisionManager" ref="accessDecisionManager" />
|
50
|
</bean>
|
51
|
|
52
|
<!-- The CdmSecurityHibernateInterceptor checks onSave() and on flushDirty()
|
53
|
if the currently authenticated principal or token has sufficient permissions
|
54
|
on the entity to be persisted -->
|
55
|
<bean id="securityHibernateInterceptor"
|
56
|
class="eu.etaxonomy.cdm.persistence.hibernate.CdmSecurityHibernateInterceptor">
|
57
|
<property name="permissionEvaluator" ref="cdmPermissionEvaluator" />
|
58
|
</bean>
|
59
|
|
60
|
<bean id="authenticationManager"
|
61
|
class="org.springframework.security.authentication.ProviderManager">
|
62
|
<property name="providers">
|
63
|
<list>
|
64
|
<ref local="daoAuthenticationProvider" />
|
65
|
</list>
|
66
|
</property>
|
67
|
</bean>
|
68
|
|
69
|
<bean id="daoAuthenticationProvider"
|
70
|
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
|
71
|
<property name="userDetailsService" ref="userService" />
|
72
|
<property name="saltSource" ref="saltSource" />
|
73
|
<property name="passwordEncoder" ref="passwordEncoder" />
|
74
|
</bean>
|
75
|
|
76
|
<bean id="passwordEncoder"
|
77
|
class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />
|
78
|
|
79
|
<bean id="saltSource"
|
80
|
class="org.springframework.security.authentication.dao.ReflectionSaltSource">
|
81
|
<property name="userPropertyToUse" value="getUsername" />
|
82
|
</bean>
|
83
|
|
84
|
|
85
|
<bean id="cdmServiceCacher"
|
86
|
class="eu.etaxonomy.cdm.api.cache.CdmServiceCacher" />
|
87
|
|
88
|
|
89
|
</beans>
|