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"
|
4
|
xmlns:security="http://www.springframework.org/schema/security"
|
5
|
xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
|
6
|
xmlns:context="http://www.springframework.org/schema/context"
|
7
|
xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
|
8
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
9
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
|
10
|
|
11
|
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
|
12
|
default-autowire="byType">
|
13
|
|
14
|
|
15
|
<task:annotation-driven executor="myExecutor" scheduler="myScheduler"/>
|
16
|
<task:executor id="myExecutor" pool-size="5"/>
|
17
|
<task:scheduler id="myScheduler" pool-size="10"/>
|
18
|
<context:component-scan base-package="eu.dnetlib.repo.manager.server.config"/>
|
19
|
|
20
|
|
21
|
<bean id="maillib" class="eu.dnetlib.utils.MailLibrary" init-method="init">
|
22
|
<property name="mailhost" value="${services.validator.mail.host}"/>
|
23
|
<property name="smtpPort" value="${services.validator.mail.port}"/>
|
24
|
<property name="authenticate" value="${services.validator.mail.authenticate}"/>
|
25
|
<property name="username" value="${services.validator.mail.username}"/>
|
26
|
<property name="password" value="${services.validator.mail.password}"/>
|
27
|
<property name="from" value="${services.validator.mail.fromAddress}"/>
|
28
|
<property name="replyTo" value="${services.validator.mail.replyToAddress}"/>
|
29
|
<property name="mode" value="${services.validator.mail.mode}"/>
|
30
|
<property name="debug" value="${services.validator.mail.debug}"/>
|
31
|
</bean>
|
32
|
|
33
|
|
34
|
<bean id="webexpressionHandler"
|
35
|
class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler"/>
|
36
|
|
37
|
<bean class="eu.dnetlib.repo.manager.server.utils.FrontEndLinkURIAuthenticationSuccessHandler" id="frontEndRedirect">
|
38
|
<property name="frontEndURI" value="${webapp.front}"/>
|
39
|
</bean>
|
40
|
|
41
|
<!-- Enable SPEL annotation-->
|
42
|
<security:global-method-security pre-post-annotations="enabled" proxy-target-class="true"
|
43
|
authentication-manager-ref="authenticationManager"/>
|
44
|
|
45
|
<security:http auto-config="false" use-expressions="true"
|
46
|
disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint"
|
47
|
pattern="/**">
|
48
|
</security:http>
|
49
|
|
50
|
<!--Disable authentication from this service-->
|
51
|
<bean id="authenticationEntryPoint"
|
52
|
class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
|
53
|
<security:authentication-manager alias="authenticationManager"/>
|
54
|
|
55
|
</beans>
|