/
service-ome.api.ILdap.xml
85 lines (72 loc) · 3.17 KB
/
service-ome.api.ILdap.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# $Id: service-ome.api.ILdap.xml 1167 2007-06-04 10:39:34Z aleksandrat $
#
# Copyright 2007 University of Dundee. All rights reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by: Aleksandra Tarkowska <aleksandrat@lifesci.dundee.ac.uk>
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<beans>
<alias name="internal-ome.api.ILdap" alias="internal-ome.api.LocalLdap"/>
<bean parent="level2" name="internal-ome.api.ILdap"
class="ome.logic.LdapImpl">
<description>
Privileged bean which has several "private" references
injected. This is not an example of what should be done.
</description>
<constructor-arg ref="contextSource"/>
<constructor-arg ref="ldapTemplate"/>
<constructor-arg ref="roles"/>
<constructor-arg ref="ldapConfig" />
<constructor-arg ref="roleProvider"/>
<constructor-arg ref="simpleSqlAction"/>
</bean>
<bean name="managed-ome.api.ILdap" parent="managedService">
<property name="proxyInterfaces">
<list>
<value>ome.api.ILdap</value>
</list>
</property>
<property name="target" ref="internal-ome.api.ILdap" />
</bean>
<bean id="ldapConfig" class="ome.security.auth.LdapConfig">
<constructor-arg index="0" value="${omero.ldap.config}"/>
<constructor-arg index="1" value="${omero.ldap.new_user_group}"/>
<constructor-arg index="2" value="${omero.ldap.user_filter}" />
<constructor-arg index="3" value="${omero.ldap.group_filter}" />
<constructor-arg index="4" value="${omero.ldap.user_mapping}" />
<constructor-arg index="5" value="${omero.ldap.group_mapping}" />
<constructor-arg index="6" value="${omero.ldap.sync_on_login}" />
<constructor-arg index="7" value="${omero.ldap.base}"/>
<constructor-arg index="8" value="${omero.ldap.new_user_group_owner}"/>
</bean>
<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
<constructor-arg ref="contextSource" />
</bean>
<bean id="contextSource" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource" ref="contextSourceSwapper"/>
</bean>
<bean id="contextSourceSwapper"
class="org.springframework.aop.target.HotSwappableTargetSource">
<constructor-arg ref="defaultContextSource"/>
</bean>
<bean id="defaultContextSource"
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="${omero.ldap.urls}"/>
<property name="userDn" value="${omero.ldap.username}" />
<property name="password" value="${omero.ldap.password}" />
<property name="base" value="${omero.ldap.base}" />
<property name="referral" value="${omero.ldap.referral}" />
<property name="dirObjectFactory"
value="org.springframework.ldap.core.support.DefaultDirObjectFactory" />
</bean>
</beans>