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"
5 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
8 class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
9 <property name=
"systemPropertiesModeName" value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE" />
10 <property name=
"locations">
11 <value>osgibundle:security.properties
</value>
15 <bean id=
"authenticationManager" class=
"org.springframework.security.providers.ProviderManager">
16 <property name=
"providers">
18 <ref bean=
"authByAdapterProvider" />
19 <ref bean=
"anonymousAuthenticationProvider" />
20 <ref bean=
"userDetailsManager" />
25 <!-- Authentication providers -->
26 <bean id=
"authByAdapterProvider"
27 class=
"org.springframework.security.adapters.AuthByAdapterProvider">
28 <property name=
"key" value=
"${argeo.security.systemKey}" />
31 <bean id=
"anonymousAuthenticationProvider"
32 class=
"org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
33 <description><![CDATA[Anonymous authentication]]
></description>
34 <property name=
"key" value=
"${argeo.security.systemKey}" />
38 <bean id=
"userDetailsManager"
39 class=
"org.argeo.security.jackrabbit.JackrabbitUserAdminService"
40 init-method=
"init" destroy-method=
"destroy" depends-on=
"systemInit">
41 <property name=
"repository" ref=
"nodeRepository" />
42 <property name=
"securityModel" ref=
"jcrSecurityModel" />
45 <bean name=
"jcrSecurityModel" class=
"org.argeo.security.jcr.SimpleJcrSecurityModel"
46 depends-on=
"argeoDataModel" />
48 <bean id=
"argeoDataModel" class=
"org.argeo.jackrabbit.JackrabbitWrapper"
49 init-method=
"init" destroy-method=
"destroy">
50 <description><![CDATA[Make sure that Argeo base data model is registered]]
></description>
51 <property name=
"cndFiles">
53 <value>/org/argeo/jcr/argeo.cnd
</value>
56 <property name=
"repository" ref=
"nodeRepository" />
57 <property name=
"bundleContext" ref=
"bundleContext" />
60 <!-- Internal authentication, used by during the general authentication
61 initialization himself, in order to prevent the following dependency cycle:
62 Repository.login() <= AuthenticationManager <= JackrabbitUserAdminService
63 <= Repository.login() in init() -->
64 <bean id=
"internalAuthenticationManager" class=
"org.springframework.security.providers.ProviderManager">
65 <property name=
"providers">
67 <ref bean=
"authByAdapterProvider" />
73 class=
"org.argeo.security.core.AuthenticatedApplicationContextInitialization">
74 <description><![CDATA[Executes initialization with a system authentication]]
></description>
75 <property name=
"authenticationManager" ref=
"internalAuthenticationManager" />
76 <property name=
"systemAuthenticationKey" value=
"${argeo.security.systemKey}" />