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">
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>
14 <bean id=
"argeoDataModel" class=
"org.argeo.jackrabbit.JackrabbitWrapper"
15 init-method=
"init" destroy-method=
"destroy">
16 <description><![CDATA[Make sure that Argeo base data model is registered]]
></description>
17 <property name=
"cndFiles">
19 <value>/org/argeo/jcr/argeo.cnd
</value>
22 <property name=
"repository" ref=
"nodeRepository" />
23 <property name=
"bundleContext" ref=
"bundleContext" />
25 <bean class=
"org.argeo.jackrabbit.JackrabbitAuthorizations"
27 <property name=
"principalPrivileges">
29 <entry key=
"jcr:all" value=
"ROLE_ADMIN" />
32 <property name=
"repository" ref=
"argeoDataModel" />
35 <bean id=
"authenticationManager" class=
"org.springframework.security.providers.ProviderManager">
36 <property name=
"providers">
38 <ref bean=
"authByAdapterProvider" />
39 <ref bean=
"osJcrAuthenticationProvider" />
44 <!-- Authentication providers -->
45 <bean id=
"osJcrAuthenticationProvider" class=
"org.argeo.security.jcr.OsJcrAuthenticationProvider"
46 init-method=
"init" destroy-method=
"destroy" depends-on=
"argeoDataModel">
47 <property name=
"repository" ref=
"nodeRepository" />
48 <property name=
"jcrSecurityModel" ref=
"jcrSecurityModel" />
51 <bean name=
"jcrSecurityModel" class=
"org.argeo.security.jackrabbit.JackrabbitSecurityModel" />
53 <bean id=
"authByAdapterProvider"
54 class=
"org.springframework.security.adapters.AuthByAdapterProvider">
55 <description><![CDATA[System authentication]]
></description>
56 <property name=
"key" value=
"${argeo.security.systemKey}" />
59 <!-- Internal authentication, used by the general authentication process
60 himself, in order to prevent the following dependency cycle: Repository.login()
61 <= AuthenticationManager <= osJcrAuthenticationProvider <= Repository.login()
63 <bean id=
"internalAuthenticationManager" class=
"org.springframework.security.providers.ProviderManager">
64 <property name=
"providers">
66 <ref bean=
"authByAdapterProvider" />
72 class=
"org.argeo.security.core.AuthenticatedApplicationContextInitialization">
73 <description><![CDATA[Executes initialization with a system authentication]]
></description>
74 <property name=
"authenticationManager" ref=
"internalAuthenticationManager" />
77 <!-- Dummy user manager -->
78 <bean id=
"userDetailsManager" class=
"org.argeo.security.jcr.OsJcrUserAdminService"
79 init-method=
"init" destroy-method=
"destroy">
80 <property name=
"repository" ref=
"nodeRepository" />