summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
blob: bd59bbd5d0298e6b878cc1cad624befa6a1b453c (plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2011 by Graz University of Technology, Austria
  MOCCA has been developed by the E-Government Innovation Center EGIZ, a joint
  initiative of the Federal Chancellery Austria and Graz University of Technology.

  Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
  the European Commission - subsequent versions of the EUPL (the "Licence");
  You may not use this work except in compliance with the Licence.
  You may obtain a copy of the Licence at:
  http://www.osor.eu/eupl/

  Unless required by applicable law or agreed to in writing, software
  distributed under the Licence is distributed on an "AS IS" basis,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the Licence for the specific language governing permissions and
  limitations under the Licence.

  This product combines work with different licenses. See the "NOTICE" text
  file for details on the various modules and licenses.
  The "NOTICE" text file is part of the distribution. Any derivative works
  that you distribute must include a readable copy of the "NOTICE" text file.
-->
<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.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">

	<!-- configuration -->
	<bean id="configurationResource"
		class="org.springframework.web.context.support.ServletContextParameterFactoryBean">
		<property name="initParamName" value="configurationResource" />
	</bean>

	<bean id="configuration" class="at.gv.egiz.bku.spring.ConfigurationFactoryBean">
		<property name="configurationResource" ref="configurationResource" />
		<property name="failOnMissingResource" value="true" />
	</bean>

  <bean id="sslPKIProfile" class="at.gv.egiz.bku.spring.PKIProfileFactoryBean">
    <property name="configuration" ref="configuration"/>
    <property name="trustProfileId" value="SSL"/>
  </bean>

  <bean id="sslSocketFactory" class="at.gv.egiz.bku.spring.SSLSocketFactoryBean">
    <property name="configuration" ref="configuration"/>
    <property name="pkiProfile" ref="sslPKIProfile"/>
  </bean>

  <bean id="hostnameVerifier" class="at.gv.egiz.bku.spring.ConfigurableHostnameVerifier">
    <property name="configuration" ref="configuration"/>
  </bean>

	<bean id="urlDereferencer" class="at.gv.egiz.bku.utils.urldereferencer.URLDereferencerImpl"
		factory-method="getInstance">
		<property name="SSLSocketFactory" ref="sslSocketFactory"/>
		<property name="hostnameVerifier" ref="hostnameVerifier"/>
	</bean>
  
	<!-- security manager for the command invoker -->
	<bean id="securityManager" class="at.gv.egiz.bku.spring.SecurityManagerFactoryBean">
		<property name="configuration" ref="configuration" />
	</bean>

	<!-- command invoker -->
	<bean id="slCommandInvoker" class="at.gv.egiz.bku.binding.SLCommandInvokerImpl">
		<property name="securityManager" ref="securityManager" />
	</bean>

	<!-- Security Layer command factory -->

	<bean id="abstractCommandFactory" class="at.gv.egiz.bku.slcommands.AbstractSLCommandFactory"
		abstract="true">
    <property name="configuration" ref="configuration"/>
  </bean>

	<bean id="certificatesInfoboxFactory"
		class="at.gv.egiz.bku.slcommands.impl.CertificatesInfoboxFactory" />
  <bean id="identityLinkInfoboxFactory"
    class="at.gv.egiz.bku.slcommands.impl.IdentityLinkInfoboxFactory">
    <property name="identityLinkTransformer">
      <bean class="at.gv.egiz.idlink.IdentityLinkTransformer">
        <property name="urlDereferencer" ref="urlDereferencer"/>
      </bean>
    </property>
  </bean>
	<bean id="cardChannelInfoboxFactory"
		class="at.gv.egiz.bku.slcommands.impl.CardChannelInfoboxFactory" />
	<bean id="svPersonendatenInfoboxFactory"
		class="at.gv.egiz.bku.slcommands.impl.SVPersonendatenInfoboxFactory" />

	<bean id="infoboxFactory" class="at.gv.egiz.bku.slcommands.impl.InfoboxFactory">
		<property name="infoboxFactories">
			<map>
				<entry key="Certificates" value-ref="certificatesInfoboxFactory" />
				<entry key="IdentityLink" value-ref="identityLinkInfoboxFactory" />
				<entry key="CardChannel" value-ref="cardChannelInfoboxFactory" />
				<entry key="SV-Personendaten" value-ref="svPersonendatenInfoboxFactory" />
			</map>
		</property>
	</bean>

	<bean id="nullOperationCommandFactory"
		class="at.gv.egiz.bku.slcommands.impl.NullOperationCommandFactory"
		parent="abstractCommandFactory" />
	<bean id="nullOperationRequest" class="javax.xml.namespace.QName">
		<constructor-arg
			value="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" />
		<constructor-arg value="NullOperationRequest" />
	</bean>
	<bean id="infoboxReadCommandFactory"
		class="at.gv.egiz.bku.slcommands.impl.InfoboxReadCommandFactory"
		parent="abstractCommandFactory">
		<property name="infoboxFactory" ref="infoboxFactory" />
	</bean>
	<bean id="infoboxReadRequest" class="javax.xml.namespace.QName">
		<constructor-arg
			value="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" />
		<constructor-arg value="InfoboxReadRequest" />
	</bean>
	<bean id="infoboxUpdateCommandFactory"
		class="at.gv.egiz.bku.slcommands.impl.InfoboxUpdateCommandFactory"
		parent="abstractCommandFactory">
		<property name="infoboxFactory" ref="infoboxFactory" />
	</bean>
	<bean id="infoboxUpdateRequest" class="javax.xml.namespace.QName">
		<constructor-arg
			value="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" />
		<constructor-arg value="InfoboxUpdateRequest" />
	</bean>
	<bean id="createXMLSignatureCommandFactory"
		class="at.gv.egiz.bku.slcommands.impl.CreateXMLSignatureCommandFactory"
		parent="abstractCommandFactory" />
	<bean id="createXMLSignatureRequest" class="javax.xml.namespace.QName">
		<constructor-arg
			value="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" />
		<constructor-arg value="CreateXMLSignatureRequest" />
	</bean>
	<bean id="getStatusCommandFactory" class="at.gv.egiz.bku.slcommands.impl.GetStatusCommandFactory"
		parent="abstractCommandFactory" />
	<bean id="getStatusRequest" class="javax.xml.namespace.QName">
		<constructor-arg
			value="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" />
		<constructor-arg value="GetStatusRequest" />
	</bean>

	<bean id="slCommandFactory" class="at.gv.egiz.bku.slcommands.SLCommandFactory"
		factory-method="getInstance">
		<property name="concreteFactories">
			<map>
				<entry key-ref="nullOperationRequest" value-ref="nullOperationCommandFactory" />
				<entry key-ref="infoboxReadRequest" value-ref="infoboxReadCommandFactory" />
				<entry key-ref="infoboxUpdateRequest" value-ref="infoboxUpdateCommandFactory" />
				<entry key-ref="createXMLSignatureRequest" value-ref="createXMLSignatureCommandFactory" />
				<entry key-ref="getStatusRequest" value-ref="getStatusCommandFactory" />
			</map>
		</property>
		<!--
			The following properties may be used to introduce additional XML
			schemas and binding classes to the command factory.
		-->
		<!--
			If property jaxbContextPackageNames is not set the default JAXBContext
			is created with the package names given below.
		-->
		<!--
		<property name="jaxbContextPackageNames">
		  <list>
		    <value>at.buergerkarte.namespaces.securitylayer._1</value>
		    <value>org.w3._2000._09.xmldsig_</value>
        <value>at.buergerkarte.namespaces.cardchannel</value>
        <value>at.buergerkarte.namespaces.securitylayer._20020225_</value>
        <value>at.buergerkarte.namespaces.securitylayer._20020831_</value>
		  </list>
		</property>
		-->
		<!--
			If property schemaUrls is not set the default schema is created from
			the URLs listed below.
		-->
		<!--
		<property name="schemaUrls">
		  <list>
		    <value>classpath:at/gv/egiz/bku/slschema/xml.xsd</value>
		    <value>classpath:at/gv/egiz/bku/slschema/xmldsig-core-schema.xsd</value>
		    <value>classpath:at/gv/egiz/bku/slschema/Core-1.2.xsd</value>
        <value>classpath:at/gv/egiz/bku/slschema/Core.20020225.xsd</value>
        <value>classpath:at/gv/egiz/bku/slschema/Core.20020831.xsd</value>
		  </list>
		</property>
		-->
	</bean>

	<!-- STAL factory -->
	<bean id="stalFactory" class="at.gv.egiz.stal.service.impl.RequestBrokerSTALFactory"
		scope="singleton">
		<property name="configuration" ref="configuration" />
	</bean>
	
	<!-- binding processor factories -->
	<bean id="httpBindingProcessorFactory" class="at.gv.egiz.bku.binding.HTTPBindingProcessorFactory">
    <property name="configuration" ref="configuration" />
    <property name="urlDereferencer" ref="urlDereferencer" />
    <property name="sslSocketFactory" ref="sslSocketFactory" />
    <property name="hostnameVerifier" ref="hostnameVerifier" />
    <property name="slCommandFactory" ref="slCommandFactory" />
	</bean>
  <bean id="samlBindingProcessorFactory" class="at.gv.egiz.mocca.id.SAMLBindingProcessorFactory">
    <property name="configuration" ref="configuration" />
    <property name="slCommandFactory" ref="slCommandFactory" />
    <property name="urlDereferencer" ref="urlDereferencer" />
  </bean>

	<!-- binding processor manager -->
	<bean id="bindingProcessorManager" class="at.gv.egiz.bku.binding.BindingProcessorManagerImpl"
		scope="singleton">
		<property name="configuration" ref="configuration" />
		<property name="stalFactory" ref="stalFactory" />
		<property name="slCommandInvoker" ref="slCommandInvoker" />
		<property name="factories">
		  <list>
		    <ref bean="httpBindingProcessorFactory"/>
		    <ref bean="samlBindingProcessorFactory"/>
		  </list>
		</property>
	</bean>

	<bean id="attributeExporter"
		class="org.springframework.web.context.support.ServletContextAttributeExporter">
		<property name="attributes">
			<map>
				<entry key="bindingProcessorManager" value-ref="bindingProcessorManager"/>
			</map>
		</property>
	</bean>

	<!-- Shutdown Event handler -->
	<bean id="shutdownHandler" class="at.gv.egiz.bku.spring.ShutdownHandler">
		<property name="bindingProcessorManager" ref="bindingProcessorManager" />
	</bean>
	
  <!-- do not launch MBeanServer by default
   |   (the contextPathFactoryBean requires Servlet 2.5)
	<bean
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="properties">
      <map>
        <entry key="contextPath">
          <bean class="at.gv.egiz.bku.online.spring.ServletContextPathFactoryBean"/>
        </entry>
      </map>
    </property>
  </bean>

  <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
    <property name="locateExistingServerIfPossible" value="true" />
  </bean>
   
  <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
    <property name="server" ref="mbeanServer"/>
    <property name="beans">
      <map>
        <entry
          key="at.gv.egiz.mocca:type=bindingProcessorManager,contextPath=${contextPath},name=HTTP"
          value-ref="bindingProcessorManager" />
        <entry
          key="at.gv.egiz.mocca:type=stalFactory,contextPath=${contextPath},name=RequestBrocker"
          value-ref="stalFactory" />
        <entry
          key="at.gv.egiz.mocca:type=slCommandInvoker,contextPath=${contextPath},name=CommandInvoker"
          value-ref="slCommandInvoker" />
      </map>
    </property>
  </bean>
  -->
	

</beans>