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