First draft
[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:cred="urn:mace:shibboleth:credentials:1.0"
6         xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" 
7         elementFormDefault="qualified"
8         attributeFormDefault="unqualified"
9         blockDefault="substitution"
10         version="1.0">
11
12         <import namespace="urn:mace:shibboleth:credentials:1.0" schemaLocation="credentials.xsd"/>
13         <import namespace="urn:oasis:names:tc:SAML:1.0:assertion" schemaLocation="cs-sstc-schema-assertion-1.1.xsd"/>
14
15         <annotation>
16                 <documentation>
17         1.0 schema for XML-based configuration of Shibboleth target libraries and modules.
18         First appearing in Shibboleth 1.3 release.
19         </documentation>
20     </annotation>
21
22         <element name="ShibbolethTargetConfig">
23                 <annotation>
24                         <documentation>Outer element of configuration file</documentation>
25                 </annotation>
26                 <complexType>
27                         <sequence>
28                                 <element ref="conf:Extensions" minOccurs="0"/>
29                                 <element ref="cred:Credentials" minOccurs="0"/>
30                                 <element ref="conf:SHAR" minOccurs="0"/>
31                                 <element ref="conf:SHIRE" minOccurs="0"/>
32                                 <element ref="conf:Applications"/>
33                         </sequence>
34                         <attribute name="schemadir" type="anyURI" use="required"/>
35                         <attribute name="logger" type="anyURI" use="optional"/>
36                         <anyAttribute namespace="##any" processContents="lax"/>
37                 </complexType>
38         </element>
39
40         <element name="Extensions">
41                 <annotation>
42                         <documentation>Container for extension libraries and custom configuration</documentation>
43                 </annotation>
44                 <complexType>
45                         <sequence>
46                                 <element name="Library" minOccurs="0" maxOccurs="unbounded">
47                                         <complexType>
48                                     <complexContent>
49                                         <extension base="anyType">
50                                                 <attribute name="path" type="anyURI" use="required"/>
51                                                                 <attribute name="fatal" type="boolean" use="optional"/>
52                                         </extension>
53                                     </complexContent>
54                                         </complexType>
55                                 </element>
56                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
57                         </sequence>
58                 </complexType>
59         </element>
60
61         <complexType name="PluggableType">
62                 <complexContent>
63                         <extension base="anyType">
64                                 <attribute name="type" type="string" use="required"/>
65                         </extension>
66                 </complexContent>
67         </complexType>
68
69         <element name="SHAR">
70                 <annotation>
71                         <documentation>Container for SHAR configuration</documentation>
72                 </annotation>
73                 <complexType>
74                         <sequence>
75                                 <element name="Listener" type="conf:PluggableType" minOccurs="0"/>
76                                 <element name="SessionCache" minOccurs="0">
77                                         <complexType>
78                                     <complexContent>
79                                         <extension base="conf:PluggableType">
80                                                 <attribute name="cleanupInterval" type="unsignedInt" use="optional"/>
81                                                 <attribute name="timeout" type="unsignedInt" use="optional"/>
82                                         </extension>
83                                     </complexContent>
84                                         </complexType>
85                                 </element>
86                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
87                         </sequence>
88                         <attribute name="logger" type="anyURI" use="optional"/>
89                         <attribute name="AATimeout" type="integer" use="optional"/>
90                         <attribute name="AAConnectTimeout" type="integer" use="optional"/>
91                         <anyAttribute namespace="##any" processContents="lax"/>
92                 </complexType>
93         </element>
94
95         <element name="SHIRE">
96                 <annotation>
97                         <documentation>
98                         Container for configuration glue between target library and the surrounding application environment.
99                         </documentation>
100                 </annotation>
101                 <complexType>
102                         <sequence>
103                                 <element ref="conf:ApplicationMap" minOccurs="0"/>
104                                 <element name="ImplementationSpecific" minOccurs="0">
105                                         <complexType>
106                                                 <choice maxOccurs="unbounded">
107                                                         <element ref="conf:ISAPI"/>
108                                                         <element ref="conf:NSAPI"/>
109                                                         <element ref="conf:Apache"/>
110                                                         <element ref="conf:Java"/>
111                                                         <any namespace="##other" processContents="lax"/>
112                                                 </choice>
113                                         </complexType>
114                                 </element>
115                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
116                         </sequence>
117                         <attribute name="logger" type="anyURI" use="optional"/>
118                         <anyAttribute namespace="##any" processContents="lax"/>
119                 </complexType>
120         </element>
121         
122         <element name="ISAPI">
123                 <complexType>
124                         <sequence>
125                                 <element name="Site" maxOccurs="unbounded">
126                                         <complexType>
127                                                 <simpleContent>
128                                                         <extension base="string">
129                                                                 <attribute name="InstanceID" type="unsignedInt" use="required"/>
130                                                                 <anyAttribute namespace="##any" processContents="lax"/>
131                                                         </extension>
132                                                 </simpleContent>
133                                         </complexType>
134                                 </element>
135                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
136                         </sequence>
137                         <anyAttribute namespace="##any" processContents="lax"/>
138                 </complexType>
139         </element>
140         <element name="Apache">
141                 <complexType>
142             <complexContent>
143                 <extension base="anyType">
144                                         <attribute name="apacheConfig" type="boolean" use="optional"/>
145                 </extension>
146             </complexContent>
147                 </complexType>
148         </element>
149         <element name="NSAPI" type="anyType"/>
150         <element name="Java" type="anyType"/>
151         
152         <group name="ContentSettings">
153                 <annotation>
154                         <documentation>
155                         Group of settings that can be applied to elements in the ApplicationMap, supersedes httpd.conf/htaccess
156                         </documentation>
157                 </annotation>
158                 <sequence>
159                         <element name="requireSession" type="boolean" minOccurs="0"/>
160                         <element name="exportAssertion" type="boolean" minOccurs="0"/>
161                         <choice minOccurs="0">
162                                 <element name="htaccess">
163                                         <complexType>
164                                                 <choice>
165                                                         <element name="OR" type="conf:OperatorType"/>
166                                                         <element name="AND" type="conf:OperatorType"/>
167                                                         <element name="NOT">
168                                                                 <complexType>
169                                                                         <complexContent>
170                                                                                 <restriction base="conf:OperatorType">
171                                                                                         <sequence>
172                                                                                                 <element ref="conf:Rule"/>
173                                                                                         </sequence>
174                                                                                 </restriction>
175                                                                         </complexContent>
176                                                                 </complexType>
177                                                         </element>
178                                                         <element ref="conf:Rule"/>
179                                                 </choice>
180                                                 <anyAttribute namespace="##any" processContents="lax"/>
181                                         </complexType>
182                                 </element>
183                                 <element name="accessPolicy" type="conf:PluggableType"/>
184                         </choice>
185                         <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
186                 </sequence>
187         </group>
188         
189         <element name="Rule">
190                 <complexType>
191                         <simpleContent>
192                                 <extension base="string">
193                                         <attribute name="requires" type="string" use="required"/>
194                                 </extension>
195                         </simpleContent>
196                 </complexType>
197         </element>
198         <complexType name="OperatorType">
199                 <sequence>
200                         <element ref="conf:Rule" maxOccurs="unbounded"/>
201                 </sequence>
202         </complexType>
203
204     <element name="ApplicationMap">
205         <complexType>
206             <sequence>
207                 <group ref="conf:ContentSettings"/>
208                 <element ref="conf:Host" minOccurs="0" maxOccurs="unbounded"/>
209             </sequence>
210             <attribute name="uri" type="anyURI" use="optional"/>
211             <anyAttribute namespace="##any" processContents="lax"/>
212         </complexType>
213     </element>
214
215     <element name="Host">
216         <complexType>
217                 <sequence>
218                 <group ref="conf:ContentSettings"/>
219                         <element ref="conf:Path" minOccurs="0" maxOccurs="unbounded"/>
220                 </sequence>
221                 <attribute name="scheme" use="optional" default="http">
222                             <simpleType>
223                                 <restriction base="string">
224                                     <enumeration value="http"/>
225                                     <enumeration value="https"/>
226                                     <enumeration value="ftp"/>
227                                     <enumeration value="ldap"/>
228                                     <enumeration value="ldaps"/>
229                                 </restriction>
230                             </simpleType>
231                 </attribute>
232                 <attribute name="name" type="string" use="required"/>
233                 <attribute name="port" type="unsignedInt" use="optional"/>
234                 <attribute name="applicationId" type="string" use="optional"/>
235             <anyAttribute namespace="##any" processContents="lax"/>
236         </complexType>
237     </element>
238
239     <element name="Path">
240         <complexType>
241                 <sequence>
242                 <group ref="conf:ContentSettings"/>
243                         <element ref="conf:Path" minOccurs="0" maxOccurs="unbounded"/>
244                 </sequence>
245                 <attribute name="name" type="string" use="required"/>
246                 <attribute name="applicationId" type="string" use="optional"/>
247             <anyAttribute namespace="##any" processContents="lax"/>
248         </complexType>
249     </element>
250
251         <element name="Applications">
252                 <annotation>
253                         <documentation>
254                         Container for global target settings and application-specific overrides
255                         </documentation>
256                 </annotation>
257                 <complexType>
258                         <sequence>
259                                 <element ref="conf:Sessions"/>
260                                 <element ref="conf:Errors"/>
261                                 <element ref="conf:Policy"/>
262                                 <element ref="conf:CredentialUse"/>
263                                 <element ref="conf:Application" minOccurs="0" maxOccurs="unbounded"/>
264                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
265                         </sequence>
266                         <attribute name="providerId" type="anyURI" use="required"/>
267                 <anyAttribute namespace="##any" processContents="lax"/>
268                 </complexType>
269         </element>
270         
271         <element name="Application">
272                 <annotation>
273                         <documentation>
274                         Container for application-specific overrides
275                         </documentation>
276                 </annotation>
277                 <complexType>
278                         <sequence>
279                                 <element ref="conf:Sessions"/>
280                                 <element ref="conf:Errors" minOccurs="0"/>
281                                 <element ref="conf:Policy" minOccurs="0"/>
282                                 <element ref="conf:CredentialUse" minOccurs="0"/>
283                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
284                         </sequence>
285                         <attribute name="id" type="string" use="required"/>
286                         <attribute name="providerId" type="anyURI" use="optional"/>
287                 <anyAttribute namespace="##any" processContents="lax"/>
288                 </complexType>
289         </element>
290
291         <element name="Errors">
292                 <annotation>
293                         <documentation>
294                         Container for error templates and associated details
295                         </documentation>
296                 </annotation>
297                 <complexType>
298             <complexContent>
299                 <extension base="anyType">
300                         <attribute name="shire" type="anyURI" use="required"/>
301                         <attribute name="rm" type="anyURI" use="required"/>
302                         <attribute name="access" type="anyURI" use="required"/>
303                         <attribute name="supportContact" type="string" use="required"/>
304                         <attribute name="logoLocation" type="anyURI" use="required"/>
305                 </extension>
306             </complexContent>
307                 </complexType>
308         </element>
309
310         <element name="Sessions">
311                 <annotation>
312                         <documentation>
313                         Container for specifying app session establishment and policy
314                         </documentation>
315                 </annotation>
316                 <complexType>
317                         <sequence>
318                                 <element name="shireURL">
319                                         <complexType>
320                                                 <simpleContent>
321                                                         <extension base="anyURI">
322                                                                 <attribute name="SSLOnly" type="boolean" use="optional"/>
323                                                         </extension>
324                                                 </simpleContent>
325                                         </complexType>
326                                 </element>
327                                 <element name="cookieName">
328                                         <complexType>
329                                                 <simpleContent>
330                                                         <extension base="string">
331                                                                 <attribute name="SSLOnly" type="boolean" use="optional"/>
332                                                         </extension>
333                                                 </simpleContent>
334                                         </complexType>
335                                 </element>
336                                 <element name="wayfURL" type="anyURI" minOccurs="0"/>
337                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
338                         </sequence>
339                         <attribute name="lifetime" type="unsignedInt" use="optional"/>
340                         <attribute name="timeout" type="unsignedInt" use="optional"/>
341                         <attribute name="normalizeRequest" type="boolean" use="optional"/>
342                         <attribute name="checkAddress" type="boolean" use="optional"/>
343                 <anyAttribute namespace="##any" processContents="lax"/>
344                 </complexType>
345         </element>
346
347         <element name="Policy">
348                 <annotation>
349                         <documentation>
350                         Container for specifying various policies for attributes, trust, and federations
351                         </documentation>
352                 </annotation>
353                 <complexType>
354                         <sequence>
355                                 <element name="Attributes" minOccurs="0">
356                                         <complexType>
357                                                 <sequence>
358                                                         <element ref="saml:AttributeDesignator" minOccurs="0" maxOccurs="unbounded"/>
359                                                         <element name="AAPProvider" type="conf:PluggableType" minOccurs="0" maxOccurs="unbounded"/>
360                                                 </sequence>
361                                                 <attribute name="signRequest" type="boolean" use="optional"/>
362                                                 <attribute name="signedResponse" type="boolean" use="optional"/>
363                                                 <anyAttribute namespace="##any" processContents="lax"/>
364                                         </complexType>
365                                 </element>
366                                 <element name="FederationProvider" type="conf:PluggableType" minOccurs="0" maxOccurs="unbounded"/>
367                                 <element name="TrustProvider" type="conf:PluggableType" minOccurs="0" maxOccurs="unbounded"/>
368                                 <element name="Audiences" minOccurs="0">
369                                         <complexType>
370                                                 <sequence>
371                                                         <element ref="saml:Audience" maxOccurs="unbounded"/>
372                                                 </sequence>
373                                                 <anyAttribute namespace="##any" processContents="lax"/>
374                                         </complexType>
375                                 </element>
376                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
377                         </sequence>
378                 <anyAttribute namespace="##any" processContents="lax"/>
379                 </complexType>
380         </element>
381         
382         <element name="CredentialUse">
383                 <annotation>
384                         <documentation>
385                         Container for specifying credentials to use
386                         </documentation>
387                 </annotation>
388                 <complexType>
389                         <sequence>
390                                 <element name="RelyingParty" minOccurs="0" maxOccurs="unbounded">
391                                         <complexType>
392                                                 <complexContent>
393                                                         <extension base="anyType">
394                                                                 <attribute name="Name" type="string" use="required"/>
395                                                                 <attribute name="TLS" type="string" use="required"/>
396                                                                 <attribute name="Signing" type="string" use="required"/>
397                                                         </extension>
398                                                 </complexContent>
399                                         </complexType>
400                                 </element>
401                                 <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
402                         </sequence>
403                         <attribute name="TLS" type="string" use="required"/>
404                         <attribute name="Signing" type="string" use="required"/>
405                 <anyAttribute namespace="##any" processContents="lax"/>
406                 </complexType>
407         </element>
408 </schema>
409