]> git.argeo.org Git - lgpl/argeo-commons.git/blob - security-os.xml
33b4be32fe18d3d4a63b58a6028169548363921e
[lgpl/argeo-commons.git] / security-os.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="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
5
6 <bean
7 class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
8 <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
9 <property name="locations">
10 <value>osgibundle:security.properties</value>
11 </property>
12 </bean>
13
14 <bean id="argeoDataModel" class="org.argeo.jackrabbit.JackrabbitContainer"
15 init-method="init" destroy-method="destroy">
16 <description><![CDATA[Make sure that Argeo base data model is registered]]></description>
17 <property name="cndFiles">
18 <list>
19 <value>/org/argeo/jcr/argeo.cnd</value>
20 </list>
21 </property>
22 <property name="repository" ref="nodeRepository" />
23 <property name="bundleContext" ref="bundleContext" />
24 </bean>
25
26 <bean id="systemExecutionService" class="org.argeo.security.core.KeyBasedSystemExecutionService">
27 <property name="authenticationManager" ref="authenticationManager" />
28 <property name="systemAuthenticationKey" value="${argeo.security.systemKey}" />
29 </bean>
30
31 <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
32 <property name="providers">
33 <list>
34 <ref bean="authByAdapterProvider" />
35 <ref bean="osJcrAuthenticationProvider" />
36 </list>
37 </property>
38 </bean>
39
40 <!-- Authentication providers -->
41 <bean id="osJcrAuthenticationProvider" class="org.argeo.security.jcr.OsJcrAuthenticationProvider"
42 init-method="init" destroy-method="destroy" depends-on="argeoDataModel">
43 <property name="repository" ref="nodeRepository" />
44 </bean>
45
46 <bean id="authByAdapterProvider"
47 class="org.springframework.security.adapters.AuthByAdapterProvider">
48 <description><![CDATA[System authentication]]></description>
49 <property name="key" value="${argeo.security.systemKey}" />
50 </bean>
51
52 <!-- Internal authentication, used by the general authentication process
53 himself, in order to prevent the following dependency cycle: Repository.login()
54 <= AuthenticationManager <= osJcrAuthenticationProvider <= Repository.login()
55 in init() -->
56 <bean id="internalAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
57 <property name="providers">
58 <list>
59 <ref bean="authByAdapterProvider" />
60 </list>
61 </property>
62 </bean>
63
64 <bean
65 class="org.argeo.security.core.AuthenticatedApplicationContextInitialization">
66 <description><![CDATA[Executes initialization with a system authentication]]></description>
67 <property name="authenticationManager" ref="internalAuthenticationManager" />
68 </bean>
69
70 </beans>