Begin config schema changes/fixes
[shibboleth/sp.git] / schemas / shibboleth-targetconfig-1.0.xsd
1 <?xml version="1.0" encoding="US-ASCII"?>
2 <schema targetNamespace="urn:mace:shibboleth:target:config:1.0"
3         xmlns="http://www.w3.org/2001/XMLSchema"
4         xmlns:conf="urn:mace:shibboleth:target:config:1.0"
5         xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
6         elementFormDefault="qualified"
7         attributeFormDefault="unqualified"
8         blockDefault="substitution"
9         version="1.1">
10
11         <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
12         <import namespace="urn:oasis:names:tc:SAML:1.0:assertion" schemaLocation="cs-sstc-schema-assertion-1.1.xsd"/>
13
14         <annotation>
15                 <documentation>
16         1.0 schema for XML-based configuration of Shibboleth target libraries and modules.
17         First appearing in Shibboleth 1.2 release.
18         </documentation>
19     </annotation>
20
21         <complexType name="PluggableType">
22         <complexContent>
23             <restriction base="anyType">
24                 <sequence>
25                     <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
26                 </sequence>
27                                 <attribute name="type" type="string" use="required"/>
28                                 <attribute name="uri" type="anyURI" use="optional"/>
29                 <anyAttribute namespace="##other" processContents="lax"/>
30             </restriction>
31         </complexContent>
32         </complexType>
33
34         <element name="ShibbolethTargetConfig" type="conf:SPConfigType"/>
35         <element name="SPConfig" type="conf:SPConfigType"/>
36         <complexType name="SPConfigType">
37                 <annotation>
38                         <documentation>Root element of configuration file</documentation>
39                 </annotation>
40                 <sequence>
41                         <element ref="conf:Extensions" minOccurs="0"/>
42                         <choice minOccurs="0">
43                                 <element name="Global" type="conf:GlobalConfigurationType"/>
44                                 <element name="SHAR" type="conf:GlobalConfigurationType"/>
45                         </choice>
46                         <choice minOccurs="0">
47                                 <element name="Local" type="conf:LocalConfigurationType"/>
48                                 <element name="SHIRE" type="conf:LocalConfigurationType"/>
49                         </choice>
50                         <element ref="conf:Applications"/>
51                         <element name="CredentialsProvider" type="conf:PluggableType" minOccurs="0" maxOccurs="unbounded"/>
52                 </sequence>
53                 <attribute name="logger" type="anyURI" use="optional"/>
54                 <attribute name="clockSkew" type="unsignedInt" use="optional"/>
55                 <anyAttribute namespace="##other" processContents="lax"/>
56         </complexType>
57
58         <element name="Extensions">
59                 <annotation>
60                         <documentation>Container for extension libraries and custom configuration</documentation>
61                 </annotation>
62                 <complexType>
63                         <sequence>
64                                 <element name="Library" minOccurs="0" maxOccurs="unbounded">
65                                         <complexType>
66                                     <complexContent>
67                                         <restriction base="anyType">
68                                                                 <sequence>
69                                                                         <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
70                                                                 </sequence>
71                                                 <attribute name="path" type="anyURI" use="required"/>
72                                                                 <attribute name="fatal" type="boolean" use="optional"/>
73                                                                 <anyAttribute namespace="##other" processContents="lax"/>
74                                         </restriction>
75                                     </complexContent>
76                                         </complexType>
77                                 </element>
78                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
79                         </sequence>
80                 </complexType>
81         </element>
82
83         <complexType name="GlobalConfigurationType">
84                 <annotation>
85                         <documentation>Container for global (server independent) configuration</documentation>
86                 </annotation>
87                 <sequence>
88                         <element ref="conf:Extensions" minOccurs="0"/>
89                         <choice>
90                                 <element name="UnixListener">
91                                         <complexType mixed="false">
92                                                 <complexContent>
93                                                         <restriction base="anyType">
94                                                                 <attribute name="address" type="string" use="required"/>
95                                                         </restriction>
96                                                 </complexContent>
97                                         </complexType>
98                                 </element>
99                                 <element name="TCPListener">
100                                         <complexType mixed="false">
101                                                 <complexContent>
102                                                         <restriction base="anyType">
103                                                                 <attribute name="address" type="string" use="required"/>
104                                                                 <attribute name="port" type="unsignedInt" use="required"/>
105                                                                 <attribute name="acl" use="optional" default="127.0.0.1">
106                                                                         <simpleType>
107                                                                                 <list itemType="string"/>
108                                                                         </simpleType>
109                                                                 </attribute>
110                                                         </restriction>
111                                                 </complexContent>
112                                         </complexType>
113                                 </element>
114                                 <element name="Listener" type="conf:PluggableType"/>
115                         </choice>
116                         <choice>
117                                 <element name="MemorySessionCache">
118                                         <complexType mixed="false">
119                                                 <complexContent>
120                                                         <restriction base="anyType">
121                                                                 <attributeGroup ref="conf:SessionCacheProperties"/>
122                                                                 <anyAttribute namespace="##other" processContents="lax"/>
123                                                         </restriction>
124                                                 </complexContent>
125                                         </complexType>
126                                 </element>
127                                 <element name="MySQLSessionCache">
128                                         <complexType>
129                                                 <sequence>
130                                                         <element name="Argument" type="string" minOccurs="0" maxOccurs="unbounded"/>
131                                                 </sequence>
132                                                 <attributeGroup ref="conf:SessionCacheProperties"/>
133                                                 <attribute name="mysqlTimeout" type="unsignedInt" use="optional" default="14400"/>
134                                                 <anyAttribute namespace="##other" processContents="lax"/>
135                                         </complexType>
136                                 </element>
137                                 <element name="SessionCache">
138                                         <complexType>
139                                                 <complexContent>
140                                                         <extension base="conf:PluggableType">
141                                                                 <attributeGroup ref="conf:SessionCacheProperties"/>
142                                                         </extension>
143                                                 </complexContent>
144                                         </complexType>
145                                 </element>
146                         </choice>
147                         <choice minOccurs="0">
148                                 <element name="MySQLReplayCache">
149                                         <complexType>
150                                                 <sequence>
151                                                         <element name="Argument" type="string" minOccurs="0" maxOccurs="unbounded"/>
152                                                 </sequence>
153                                                 <anyAttribute namespace="##other" processContents="lax"/>
154                                         </complexType>
155                                 </element>
156                                 <element name="ReplayCache" type="conf:PluggableType"/>
157                         </choice>
158                         <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
159                 </sequence>
160                 <attribute name="logger" type="anyURI" use="optional"/>
161                 <anyAttribute namespace="##other" processContents="lax"/>
162         </complexType>
163
164         <attributeGroup name="SessionCacheProperties">
165         <attribute name="cleanupInterval" type="unsignedInt" use="optional" default="300"/>
166         <attribute name="cacheTimeout" type="unsignedInt" use="optional" default="28800"/>
167                 <attribute name="AAConnectTimeout" type="unsignedInt" use="optional" default="15"/>
168                 <attribute name="AATimeout" type="unsignedInt" use="optional" default="30"/>
169                 <attribute name="defaultLifetime" type="unsignedInt" use="optional" default="1800"/>
170                 <attribute name="retryInterval" type="unsignedInt" use="optional" default="300"/>
171                 <attribute name="strictValidity" type="boolean" use="optional" default="true"/>
172                 <attribute name="propagateErrors" type="boolean" use="optional" default="false"/>
173         </attributeGroup>
174
175         <complexType name="LocalConfigurationType">
176                 <annotation>
177                         <documentation>
178                         Container for configuration of locally integrated or platform-specific
179                         features (e.g. web server filters)
180                         </documentation>
181                 </annotation>
182                 <sequence>
183                         <element ref="conf:Extensions" minOccurs="0"/>
184                         <element name="RequestMapProvider" type="conf:PluggableType" minOccurs="0"/>
185                         <element name="Implementation" minOccurs="0">
186                                 <complexType>
187                                         <choice maxOccurs="unbounded">
188                                                 <element ref="conf:ISAPI"/>
189                                                 <element ref="conf:NSAPI"/>
190                                                 <element ref="conf:Java"/>
191                                                 <any namespace="##other" processContents="lax"/>
192                                         </choice>
193                                 </complexType>
194                         </element>
195                         <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
196                 </sequence>
197                 <attribute name="logger" type="anyURI" use="optional"/>
198                 <anyAttribute namespace="##other" processContents="lax"/>
199         </complexType>
200         
201         <element name="ISAPI">
202                 <complexType>
203                         <sequence>
204                                 <element name="Site" maxOccurs="unbounded">
205                                         <complexType mixed="false">
206                                                 <complexContent>
207                                                         <restriction base="anyType">
208                                                                 <sequence>
209                                                                         <element name="Alias" type="string" minOccurs="0" maxOccurs="unbounded"/>
210                                                                 </sequence>
211                                                                 <attribute name="id" type="unsignedInt" use="required"/>
212                                                                 <attribute name="name" type="string" use="required"/>
213                                         <attribute name="port" type="unsignedInt" use="optional"/>
214                                                                 <attribute name="scheme" type="string" use="optional"/>
215                                                         </restriction>
216                                                 </complexContent>
217                                         </complexType>
218                                 </element>
219                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
220                         </sequence>
221                         <attribute name="normalizeRequest" type="boolean" use="optional"/>
222                         <anyAttribute namespace="##other" processContents="lax"/>
223                 </complexType>
224         </element>
225         <element name="NSAPI" type="anyType"/>
226         <element name="Java" type="anyType"/>
227
228         <element name="htaccess" type="conf:UniOperatorType">
229                 <annotation>
230                         <documentation>
231                         A simple example access policy language extension that supersedes Apache .htaccess
232                         </documentation>
233                 </annotation>
234         </element>
235         <element name="OR" type="conf:MultiOperatorType"/>
236         <element name="AND" type="conf:MultiOperatorType"/>
237         <element name="NOT" type="conf:UniOperatorType"/>
238         <complexType name="UniOperatorType">
239                 <choice>
240                         <element ref="conf:AND"/>
241                         <element ref="conf:OR"/>
242                         <element ref="conf:NOT"/>
243                         <element ref="conf:Rule"/>
244                 </choice>
245         </complexType>
246         <complexType name="MultiOperatorType">
247                 <choice minOccurs="2" maxOccurs="unbounded">
248                         <element ref="conf:AND"/>
249                         <element ref="conf:OR"/>
250                         <element ref="conf:NOT"/>
251                         <element ref="conf:Rule"/>
252                 </choice>
253         </complexType>
254         <element name="Rule">
255                 <complexType>
256                         <simpleContent>
257                                 <extension base="conf:listOfStrings">
258                                         <attribute name="require" type="string" use="required"/>
259                                 </extension>
260                         </simpleContent>
261                 </complexType>
262         </element>
263         <simpleType name="listOfStrings">
264                 <list itemType='string'/>
265         </simpleType>
266         
267         <attributeGroup name="ContentSettings">
268                 <attribute name="requireSession" type="boolean" use="optional"/>
269                 <attribute name="exportAssertion" type="boolean" use="optional"/>
270                 <anyAttribute namespace="##other" processContents="lax"/>
271         </attributeGroup>
272         <element name="AccessControlProvider" type="conf:PluggableType"/>
273
274     <element name="RequestMap">
275                 <annotation>
276                         <documentation>
277                         Built-in request mapping syntax, decomposes URLs into Host/Path/Path/...
278                         </documentation>
279                 </annotation>
280         <complexType>
281             <sequence>
282                 <choice minOccurs="0">
283                         <element ref="conf:htaccess"/>
284                         <element ref="conf:AccessControlProvider"/>
285                     </choice>
286                 <element ref="conf:Host" minOccurs="0" maxOccurs="unbounded"/>
287             </sequence>
288             <attribute name="applicationId" type="string" fixed="default"/>
289                 <attributeGroup ref="conf:ContentSettings"/>
290         </complexType>
291     </element>
292
293     <element name="Host">
294         <complexType>
295                 <sequence>
296                 <choice minOccurs="0">
297                         <element ref="conf:htaccess"/>
298                         <element ref="conf:AccessControlProvider"/>
299                     </choice>
300                         <element ref="conf:Path" minOccurs="0" maxOccurs="unbounded"/>
301                 </sequence>
302                 <attribute name="scheme" use="optional">
303                             <simpleType>
304                                 <restriction base="string">
305                                     <enumeration value="http"/>
306                                     <enumeration value="https"/>
307                                     <enumeration value="ftp"/>
308                                     <enumeration value="ldap"/>
309                                     <enumeration value="ldaps"/>
310                                 </restriction>
311                             </simpleType>
312                 </attribute>
313                 <attribute name="name" type="string" use="required"/>
314                 <attribute name="port" type="unsignedInt" use="optional"/>
315                 <attribute name="applicationId" type="string" use="optional"/>
316                 <attributeGroup ref="conf:ContentSettings"/>
317         </complexType>
318     </element>
319
320     <element name="Path">
321         <complexType>
322                 <sequence>
323                 <choice minOccurs="0">
324                         <element ref="conf:htaccess"/>
325                         <element ref="conf:AccessControlProvider"/>
326                     </choice>
327                         <element ref="conf:Path" minOccurs="0" maxOccurs="unbounded"/>
328                 </sequence>
329                 <attribute name="name" type="string" use="required"/>
330                 <attribute name="applicationId" type="string" use="optional"/>
331                 <attributeGroup ref="conf:ContentSettings"/>
332         </complexType>
333     </element>
334
335         <element name="Applications">
336                 <annotation>
337                         <documentation>
338                         Container for global target settings and application-specific overrides
339                         </documentation>
340                 </annotation>
341                 <complexType>
342                         <sequence>
343                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
344                                 <element ref="conf:Sessions"/>
345                                 <element ref="conf:Errors"/>
346                                 <element ref="conf:CredentialUse" minOccurs="0"/>
347                                 <choice minOccurs="0" maxOccurs="unbounded">
348                     <element ref="saml:AttributeDesignator"/>
349                     <element ref="saml:Audience"/>
350                     <element name="AAPProvider" type="conf:PluggableType"/>
351                     <element name="FederationProvider" type="conf:PluggableType"/>
352                     <element name="TrustProvider" type="conf:PluggableType"/>
353                     <element name="RevocationProvider" type="conf:PluggableType"/>
354                                 </choice>
355                                 <element ref="conf:Application" minOccurs="0" maxOccurs="unbounded"/>
356                         </sequence>
357                         <attribute name="id" type="string" fixed="default"/>
358                         <attribute name="providerId" type="anyURI" use="required"/>
359                 <anyAttribute namespace="##other" processContents="lax"/>
360                 </complexType>
361         </element>
362         
363         <element name="Application">
364                 <annotation>
365                         <documentation>
366                         Container for application-specific overrides
367                         </documentation>
368                 </annotation>
369                 <complexType>
370                         <sequence>
371                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
372                                 <element ref="conf:Sessions"/>
373                                 <element ref="conf:Errors" minOccurs="0"/>
374                                 <element ref="conf:CredentialUse" minOccurs="0"/>
375                                 <choice minOccurs="0" maxOccurs="unbounded">
376                     <element ref="saml:AttributeDesignator"/>
377                     <element ref="saml:Audience"/>
378                     <element name="AAPProvider" type="conf:PluggableType"/>
379                     <element name="FederationProvider" type="conf:PluggableType"/>
380                     <element name="TrustProvider" type="conf:PluggableType"/>
381                     <element name="RevocationProvider" type="conf:PluggableType"/>
382                                 </choice>
383                         </sequence>
384                         <attribute name="id" type="string" use="required"/>
385                         <attribute name="providerId" type="anyURI" use="optional"/>
386                 <anyAttribute namespace="##other" processContents="lax"/>
387                 </complexType>
388         </element>
389
390         <element name="Sessions">
391                 <annotation>
392                         <documentation>Container for specifying app session establishment and policy</documentation>
393                 </annotation>
394                 <complexType>
395                         <attribute name="wayfURL" type="anyURI" use="optional"/>
396                         <!-- deprecated --> <attribute name="shireURL" type="anyURI" use="optional"/>
397                         <attribute name="shireSSL" type="boolean" use="optional"/>
398                         <attribute name="cookieName" type="string" use="optional"/>
399                         <attribute name="cookieProps" type="string" use="optional"/>
400                         <attribute name="lifetime" type="unsignedInt" use="optional"/>
401                         <attribute name="timeout" type="unsignedInt" use="optional"/>
402                         <attribute name="checkAddress" type="boolean" use="optional"/>
403                         <attribute name="oldAuthnRequest" type="boolean" use="optional"/>
404                         <anyAttribute namespace="##any" processContents="lax"/>
405                 </complexType>
406         </element>
407
408         <element name="Errors">
409                 <annotation>
410                         <documentation>Container for error templates and associated details</documentation>
411                 </annotation>
412                 <complexType>
413             <complexContent>
414                 <restriction base="anyType">
415                         <!-- deprecated --> <attribute name="shire" type="anyURI" use="optional"/>
416                                         <attribute name="session" type="anyURI" use="optional"/>
417                         <attribute name="rm" type="anyURI" use="required"/>
418                         <attribute name="access" type="anyURI" use="optional"/>
419                         <attribute name="supportContact" type="string" use="optional"/>
420                         <attribute name="logoLocation" type="anyURI" use="optional"/>
421                         <attribute name="styleSheet" type="anyURI" use="optional"/>
422                                         <anyAttribute namespace="##any" processContents="lax"/>
423                 </restriction>
424             </complexContent>
425                 </complexType>
426         </element>
427
428         <attributeGroup name="CredentialUseGroup">
429                 <attribute name="TLS" type="string" use="required"/>
430                 <attribute name="Signing" type="string" use="required"/>
431                 <attribute name="signRequest" type="boolean" use="optional" default="false"/>
432                 <attribute name="signedResponse" type="boolean" use="optional" default="false"/>
433                 <attribute name="signedAssertions" type="boolean" use="optional" default="false"/>
434         </attributeGroup>
435
436         <element name="CredentialUse">
437                 <annotation>
438                         <documentation>Container for specifying credentials to use</documentation>
439                 </annotation>
440                 <complexType>
441                         <sequence>
442                                 <element name="RelyingParty" minOccurs="0" maxOccurs="unbounded">
443                                         <complexType mixed="false">
444                                                 <complexContent>
445                                                         <restriction base="anyType">
446                                                                 <attribute name="Name" type="string" use="required"/>
447                                                                 <attributeGroup ref="conf:CredentialUseGroup"/>
448                                                         </restriction>
449                                                 </complexContent>
450                                         </complexType>
451                                 </element>
452                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
453                         </sequence>
454                         <attributeGroup ref="conf:CredentialUseGroup"/>
455                 <anyAttribute namespace="##other" processContents="lax"/>
456                 </complexType>
457         </element>
458 </schema>
459