Add Shib metadata extensions config file to Spring config.
[java-idp.git] / test / data / conf1 / internal.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <beans xmlns="http://www.springframework.org/schema/beans" 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.0.xsd">
5     
6     <!-- Spring configuration file that boostraps OpenSAML -->
7     <bean id="shibboleth.OpensamlConfig" class="edu.internet2.middleware.shibboleth.common.config.OpensamlConfigBean" lazy-init="false">
8         <constructor-arg>
9             <list>
10                 <bean id="default" class="org.opensaml.util.resource.ClasspathResource">
11                     <constructor-arg value="/default-config.xml" />
12                 </bean>
13                 <bean id="schema" class="org.opensaml.util.resource.ClasspathResource">
14                     <constructor-arg value="/schema-config.xml" />
15                 </bean>
16                 <bean id="signature" class="org.opensaml.util.resource.ClasspathResource">
17                     <constructor-arg value="/signature-config.xml" />
18                 </bean>
19                 <bean id="encryption" class="org.opensaml.util.resource.ClasspathResource">
20                     <constructor-arg value="/encryption-config.xml" />
21                 </bean>
22                 <bean id="soap11" class="org.opensaml.util.resource.ClasspathResource">
23                     <constructor-arg value="/soap11-config.xml" />
24                 </bean>
25                 <bean id="saml1Assertion" class="org.opensaml.util.resource.ClasspathResource">
26                     <constructor-arg value="/saml1-assertion-config.xml" />
27                 </bean>
28                 <bean id="saml1Protocol" class="org.opensaml.util.resource.ClasspathResource">
29                     <constructor-arg value="/saml1-protocol-config.xml" />
30                 </bean>
31                 <bean id="saml1Metadata" class="org.opensaml.util.resource.ClasspathResource">
32                     <constructor-arg value="/saml1-metadata-config.xml" />
33                 </bean>
34                 <bean id="saml2Assertion" class="org.opensaml.util.resource.ClasspathResource">
35                     <constructor-arg value="/saml2-assertion-config.xml" />
36                 </bean>
37                 <bean id="saml2Protocol" class="org.opensaml.util.resource.ClasspathResource">
38                     <constructor-arg value="/saml2-protocol-config.xml" />
39                 </bean>
40                 <bean id="saml2ThirdParty" class="org.opensaml.util.resource.ClasspathResource">
41                     <constructor-arg value="/saml2-protocol-thirdparty-config.xml" />
42                 </bean>
43                 <bean id="saml2Metadata" class="org.opensaml.util.resource.ClasspathResource">
44                     <constructor-arg value="/saml2-metadata-config.xml" />
45                 </bean>
46                 <bean id="saml2MetadataQuery" class="org.opensaml.util.resource.ClasspathResource">
47                     <constructor-arg value="/saml2-metadata-query-config.xml" />
48                 </bean>               
49                 <bean id="shibMetadataExtensions" class="org.opensaml.util.resource.ClasspathResource">
50                     <constructor-arg value="/shibboleth-metadata-ext-config.xml" />
51                 </bean>   
52             </list>
53         </constructor-arg>
54     </bean>
55     
56     <bean id="shibboleth.IdGenerator" class="org.opensaml.common.impl.SecureRandomIdentifierGenerator">
57         <constructor-arg value="SHA1PRNG" />
58     </bean>
59
60     <bean id="shibboleth.VelocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean" >
61         <property name="velocityProperties">
62             <props>
63                 <prop key="resource.loader">classpath, string</prop>
64                 <prop key="classpath.resource.loader.class">
65                     org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
66                 </prop>
67                 <prop key="string.resource.loader.class">
68                     org.apache.velocity.runtime.resource.loader.StringResourceLoader
69                 </prop>
70             </props>
71         </property>
72     </bean>
73
74     <bean id="shibboleth.TaskTimer" class="java.util.Timer" destroy-method="cancel">
75         <constructor-arg value="true" type="boolean" />
76     </bean>
77
78     <bean id="shibboleth.ParserPool" class="org.opensaml.xml.parse.BasicParserPool">
79         <property name="maxPoolSize" value="50" />
80         <property name="createBuildersAtPoolLimit" value="true" />
81         <property name="coalescing" value="true" />
82         <property name="ignoreComments" value="true" />
83         <property name="ignoreElementContentWhitespace" value="true" />
84         <property name="namespaceAware" value="true" />
85     </bean>
86
87     <bean id="shibboleth.SAML2SSOMessageSecurityPolicyFactoryNoIssuerAuth"
88           parent="shibboleth.SAML2SSOMessageSecurityPolicyFactoryIssuerAuth">
89         <property name="requiredAuthenticatedIssuer" value="false" />
90     </bean>
91     
92     <bean id="shibboleth.SAML2SSOMessageSecurityPolicyFactoryIssuerAuth"
93           parent="shibboleth.BaseSAML2SecurityPolicyFactory">
94         <property name="issuerRole">
95             <bean id="shibboleth.SAML2SSORole" class="javax.xml.namespace.QName">
96                 <constructor-arg value="urn:oasis:names:tc:SAML:2.0:metadata" />
97                 <constructor-arg value="SPSSODescriptor" />
98             </bean>
99         </property>
100     </bean>
101     
102     <bean id="shibboleth.SAML2AttributeQueryMessageSecurityPolicyFactoryNoIssuerAuth"
103           parent="shibboleth.SAML2AttributeQueryMessageSecurityPolicyFactoryIssuerAuth">
104         <property name="requiredAuthenticatedIssuer" value="false" />
105     </bean>
106     
107     <bean id="shibboleth.SAML2AttributeQueryMessageSecurityPolicyFactoryIssuerAuth"
108           parent="shibboleth.BaseSAML2SecurityPolicyFactory">
109         <property name="issuerRole">
110             <bean id="shibboleth.SAML2AttributeQueryRole" class="javax.xml.namespace.QName">
111                 <constructor-arg value="urn:oasis:names:tc:SAML:2.0:metadata" />
112                 <constructor-arg value="SPSSODescriptor" />
113             </bean>
114         </property>
115     </bean>
116     
117     <bean id="shibboleth.BaseSAML2SecurityPolicyFactory" abstract="true" class="org.opensaml.common.binding.security.SAMLSecurityPolicyFactory">
118         <property name="issuerProtocol" value="urn:oasis:names:tc:SAML:2.0:protocol" />
119         <property name="policyRuleFactories">
120             <list>
121                 <ref bean="shibboleth.SAML2ProtocolMessageRuleFactory" />
122                 <ref bean="shibboleth.MessageIssueInstantRuleFactory" />
123             </list>
124         </property>
125         <property name="requiredAuthenticatedIssuer" value="true" />
126     </bean>
127     
128     <bean id="shibboleth.SAML2ProtocolMessageRuleFactory" class="org.opensaml.saml2.binding.security.SAML2ProtocolMessageRuleFactory" />
129     
130     <bean id="shibboleth.MessageIssueInstantRuleFactory" class="org.opensaml.common.binding.security.IssueInstantRuleFactory">
131         <property name="clockSkew" value="5" />
132         <property name="expires" value="10" />
133     </bean>
134     
135     <bean id="shibboleth.MessageEncoderFactory" class="org.opensaml.common.binding.encoding.MessageEncoderFactory">
136         <property name="encoderBuilders">
137             <map>
138                 <entry>
139                     <key>
140                         <value>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST</value>
141                     </key>
142                     <bean id="shibboleth.SAML2HttpPostEncoderBuilder" class="org.opensaml.saml2.binding.encoding.HTTPPostEncoderBuilder">
143                         <constructor-arg ref="shibboleth.VelocityEngine" />
144                         <constructor-arg value="/templates/saml2-post-binding.vm"/>
145                     </bean>
146                 </entry>
147                 <entry>
148                     <key>
149                         <value>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect</value>
150                     </key>
151                     <bean id="shibboleth.SAML2HttpRedirectEncoderBuilder" class="org.opensaml.saml2.binding.encoding.HTTPRedirectDeflateEncoderBuilder" />
152                 </entry>
153                 <entry>
154                     <key>
155                         <value>urn:oasis:names:tc:SAML:2.0:bindings:SOAP</value>
156                     </key>
157                     <bean id="shibboleth.SAML2HttpSoap11EncoderBuilder" class="org.opensaml.saml2.binding.encoding.HTTPSOAP11EncoderBuilder" />
158                 </entry>
159                 <entry>
160                     <key>
161                         <value>urn:oasis:names:tc:SAML:1.0:profiles:browser-post</value>
162                     </key>
163                     <bean id="shibboleth.SAML1HttpPostEncoderBuilder" class="org.opensaml.saml1.binding.encoding.HTTPPostEncoderBuilder">
164                         <constructor-arg ref="shibboleth.VelocityEngine" />
165                         <constructor-arg value="/templates/saml1-post-binding.vm"/>
166                     </bean>
167                 </entry>
168                 <entry>
169                     <key>
170                         <value>urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding</value>
171                     </key>
172                     <bean id="shibboleth.SAML1HttpSoap11EncoderBuilder" class="org.opensaml.saml1.binding.encoding.HTTPSOAP11EncoderBuilder" />
173                 </entry>
174             </map>
175         </property>
176     </bean>
177     
178     <bean id="shibboleth.MessageDecoderFactory" class="org.opensaml.common.binding.decoding.MessageDecoderFactory">
179         <property name="decoderBuilders">
180             <map>
181                 <entry>
182                     <key>
183                         <value>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST</value>
184                     </key>
185                     <bean id="shibboleth.SAML2HttpPostDecoderBuilder" class="org.opensaml.saml2.binding.decoding.HTTPPostDecoderBuilder">
186                         <property name="parser" ref="shibboleth.ParserPool" />
187                     </bean>
188                 </entry>
189                 <entry>
190                     <key>
191                         <value>urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect</value>
192                     </key>
193                     <bean id="shibboleth.SAML2HttpRedirectDecoderBuilder" class="org.opensaml.saml2.binding.decoding.HTTPRedirectDeflateDecoderBuilder" >
194                         <property name="parser" ref="shibboleth.ParserPool" />
195                     </bean>
196                 </entry>
197                 <entry>
198                     <key>
199                         <value>urn:oasis:names:tc:SAML:2.0:bindings:SOAP</value>
200                     </key>
201                     <bean id="shibboleth.SAML2HttpSoap11DecoderBuilder" class="org.opensaml.saml2.binding.decoding.HTTPSOAP11DecoderBuilder" >
202                         <property name="parser" ref="shibboleth.ParserPool" />
203                     </bean>
204                 </entry>
205                 <entry>
206                     <key>
207                         <value>urn:oasis:names:tc:SAML:1.0:profiles:browser-post</value>
208                     </key>
209                     <bean id="shibboleth.SAML1HttpPostDecoderBuilder" class="org.opensaml.saml1.binding.decoding.HTTPPostDecoderBuilder" >
210                         <property name="parser" ref="shibboleth.ParserPool" />
211                     </bean>
212                 </entry>
213                 <entry>
214                     <key>
215                         <value>urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding</value>
216                     </key>
217                     <bean id="shibboleth.SAML1HttpSoap11DecoderBuilder" class="org.opensaml.saml1.binding.decoding.HTTPSOAP11DecoderBuilder" >
218                         <property name="parser" ref="shibboleth.ParserPool" />
219                     </bean>
220                 </entry>
221             </map>
222         </property>
223     </bean>
224     
225     <bean id="shibboleth.SessionManager" class="edu.internet2.middleware.shibboleth.idp.session.impl.SessionManagerImpl" />
226     
227     <bean id="shibboleth.SAML2AttributeAuthority"
228           class="edu.internet2.middleware.shibboleth.common.attribute.provider.ShibbolethSAML2AttributeAuthority">
229           <constructor-arg ref="shibboleth.AttributeResolver" />
230           <property name="filteringEngine" ref="shibboleth.AttributeFilterEngine" />
231     </bean>
232     
233     <!-- We're not operating in a servlet container so this won't work -->
234     <!-- 
235     <bean id="shibboleth.ServletAttributeExporter"
236         class="org.springframework.web.context.support.ServletContextAttributeExporter">
237         <property name="attributes">
238             <map>
239                 <entry>
240                     <key>
241                         <value>handlerManager</value>
242                     </key>
243                     <ref bean="shibboleth.ProfileHandler" />
244                 </entry>
245             </map>
246         </property>
247     </bean>
248     -->
249     
250 </beans>