]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - security/modules/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml
Big cleanup of the security layers
[lgpl/argeo-commons.git] / security / modules / org.argeo.security.dao.jackrabbit / META-INF / spring / security-jcr-services.xml
diff --git a/security/modules/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml b/security/modules/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml
new file mode 100644 (file)
index 0000000..49ace03
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="locations">
+                       <value>osgibundle:security.properties</value>
+               </property>
+       </bean>
+
+       <bean id="systemExecutionService" class="org.argeo.security.core.KeyBasedSystemExecutionService">
+               <property name="systemAuthenticationKey" value="${argeo.security.systemKey}" />
+               <property name="authenticationManager" ref="authenticationManager" />
+       </bean>
+
+       <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
+               <property name="providers">
+                       <list>
+                               <ref bean="authByAdapterProvider" />
+                               <ref bean="remoteJcrAuthenticationProvider" />
+                       </list>
+               </property>
+       </bean>
+
+       <!-- Authentication providers -->
+       <bean id="remoteJcrAuthenticationProvider" class="org.argeo.security.jcr.RemoteJcrAuthenticationProvider">
+               <property name="repositoryFactory" ref="repositoryFactory" />
+       </bean>
+
+       <bean id="authByAdapterProvider"
+               class="org.springframework.security.adapters.AuthByAdapterProvider">
+               <property name="key" value="${argeo.security.systemKey}" />
+       </bean>
+
+</beans>
\ No newline at end of file