]> git.argeo.org Git - lgpl/argeo-commons.git/blob - auth-services.xml
158b18fb423738be36dbdab5f3217fcab90e3644
[lgpl/argeo-commons.git] / auth-services.xml
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 xsi:schemaLocation="
5 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
6
7 <!-- COMMON -->
8 <bean
9 class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
10 <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
11 <property name="locations">
12 <value>osgibundle:auth.properties</value>
13 </property>
14 </bean>
15
16 <!-- SERVICES -->
17 <bean id="systemExecutionService" class="org.argeo.security.core.KeyBasedSystemExecutionService">
18 <property name="authenticationManager" ref="authenticationManager" />
19 <property name="systemAuthenticationKey" value="${argeo.security.systemKey}" />
20 </bean>
21
22 <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
23 <property name="providers">
24 <list>
25 <ref bean="anonymousAuthenticationProvider" />
26 <ref bean="authByAdapterProvider" />
27 <ref bean="ldapAuthenticationProvider" />
28 </list>
29 </property>
30 </bean>
31
32 <!-- Authentication provider -->
33 <bean id="authByAdapterProvider"
34 class="org.springframework.security.adapters.AuthByAdapterProvider">
35 <description><![CDATA[System authentication]]></description>
36 <property name="key" value="${argeo.security.systemKey}" />
37 </bean>
38
39 <bean id="anonymousAuthenticationProvider"
40 class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
41 <description><![CDATA[Anonymous authentication]]></description>
42 <property name="key" value="${argeo.security.systemKey}" />
43 </bean>
44
45 <!-- Internal authentication, used by during the general authentication
46 initialization himself, in order to prevent the following dependency cycle:
47 Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider
48 <= Repository.login() in init() -->
49 <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
50 <property name="providers">
51 <list>
52 <ref bean="authByAdapterProvider" />
53 </list>
54 </property>
55 </bean>
56
57 <bean
58 class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
59 <description><![CDATA[Executes initialization with a system authentication]]></description>
60 <property name="authenticationManager" ref="internalAuthenticationManager" />
61 </bean>
62 </beans>