https://issues.shibboleth.net/jira/browse/SSPCPP-605
[shibboleth/cpp-sp.git] / schemas / shibboleth-2.0-afp-mf-basic.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <schema targetNamespace="urn:mace:shibboleth:2.0:afp:mf:basic"
4     xmlns="http://www.w3.org/2001/XMLSchema"
5     xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"
6     xmlns:afp="urn:mace:shibboleth:2.0:afp"
7     elementFormDefault="qualified"
8     version="2.1">
9
10     <import namespace="urn:mace:shibboleth:2.0:afp" schemaLocation="classpath:/schema/shibboleth-2.0-afp.xsd" />
11
12     <!-- Blanket Match Function -->
13     <complexType name="ANY">
14         <annotation>
15             <documentation>A match function that evaluates to true.</documentation>
16         </annotation>
17         <complexContent>
18             <extension base="afp:MatchFunctorType" />
19         </complexContent>
20     </complexType>
21
22     <!--  Boolean Match Functions -->
23     <complexType name="AND">
24         <annotation>
25             <documentation>
26                 A match function that performs a logical AND on the results of all contained matching functions.
27             </documentation>
28         </annotation>
29         <complexContent>
30             <extension base="afp:MatchFunctorType">
31                 <choice minOccurs="2" maxOccurs="unbounded">
32                     <element name="Rule" type="afp:MatchFunctorType">
33                         <annotation>
34                             <documentation>
35                                 The set of match function rules to be ANDed.
36                             </documentation>
37                         </annotation>
38                     </element>
39                     <element name="RuleReference" type="afp:ReferenceType">
40                         <annotation>
41                             <documentation>
42                                 The set of match function rules to be ANDed.
43                             </documentation>
44                         </annotation>
45                     </element>
46                 </choice>
47             </extension>
48         </complexContent>
49     </complexType>
50
51     <complexType name="OR">
52         <annotation>
53             <documentation>
54                 A match function that performs a logical OR on the results of all contained matching functions.
55             </documentation>
56         </annotation>
57         <complexContent>
58             <extension base="afp:MatchFunctorType">
59                 <choice minOccurs="2" maxOccurs="unbounded">
60                     <element name="Rule" type="afp:MatchFunctorType">
61                         <annotation>
62                             <documentation>
63                                 The set of match function rules to be ANDed.
64                             </documentation>
65                         </annotation>
66                     </element>
67                     <element name="RuleReference" type="afp:ReferenceType">
68                         <annotation>
69                             <documentation>
70                                 The set of match function rules to be ANDed.
71                             </documentation>
72                         </annotation>
73                     </element>
74                 </choice>
75             </extension>
76         </complexContent>
77     </complexType>
78
79     <complexType name="NOT">
80         <annotation>
81             <documentation>
82                 A match function that performs a logical NOT on the result of the contained matching function.
83             </documentation>
84         </annotation>
85         <complexContent>
86             <extension base="afp:MatchFunctorType">
87                 <choice>
88                     <element name="Rule" type="afp:MatchFunctorType">
89                         <annotation>
90                             <documentation>
91                                 The set of match function rules to be ANDed.
92                             </documentation>
93                         </annotation>
94                     </element>
95                     <element name="RuleReference" type="afp:ReferenceType">
96                         <annotation>
97                             <documentation>
98                                 The set of match function rules to be ANDed.
99                             </documentation>
100                         </annotation>
101                     </element>
102                 </choice>
103             </extension>
104         </complexContent>
105     </complexType>
106
107     <!--  Literal String Match Functions -->
108     <complexType name="AttributeRequesterString">
109         <annotation>
110             <documentation>
111                 A match function that matches the attribute request against the specified value.
112             </documentation>
113         </annotation>
114         <complexContent>
115             <extension base="basic:StringMatchType" />
116         </complexContent>
117     </complexType>
118
119     <complexType name="AttributeIssuerString">
120         <annotation>
121             <documentation>
122                 A match function that matches the attribute issuer against the specified value.
123             </documentation>
124         </annotation>
125         <complexContent>
126             <extension base="basic:StringMatchType" />
127         </complexContent>
128     </complexType>
129
130     <complexType name="PrincipalNameString">
131         <annotation>
132             <documentation>A match function that matches the principal name against the specified value.</documentation>
133         </annotation>
134         <complexContent>
135             <extension base="basic:StringMatchType" />
136         </complexContent>
137     </complexType>
138
139     <complexType name="AuthenticationMethodString">
140         <annotation>
141             <documentation>
142                 A match function that matches the authentication method against the specified value.
143             </documentation>
144         </annotation>
145         <complexContent>
146             <extension base="basic:StringMatchType" />
147         </complexContent>
148     </complexType>
149
150     <complexType name="AttributeValueString">
151         <annotation>
152             <documentation>
153                 A match function that matches the value of an attribute against the specified value. This match
154                 evaluates to true if the attribute contains the specified value.
155             </documentation>
156         </annotation>
157         <complexContent>
158             <extension base="basic:AttributeTargetedStringMatchType" />
159         </complexContent>
160     </complexType>
161
162     <complexType name="AttributeScopeString">
163         <annotation>
164             <documentation>
165                 A match function that matches the attribute scope against the specified value.
166             </documentation>
167         </annotation>
168         <complexContent>
169             <extension base="basic:AttributeTargetedStringMatchType" />
170         </complexContent>
171     </complexType>
172
173     <complexType name="AttributeTargetedStringMatchType" abstract="true">
174         <complexContent>
175             <extension base="basic:StringMatchType">
176                 <attribute name="attributeID" type="string">
177                     <annotation>
178                         <documentation>
179                             The ID of the attribute whose value should be matched. If no attribute ID is specified the
180                             ID of the containing attribute rule is assumed.
181                         </documentation>
182                     </annotation>
183                 </attribute>
184             </extension>
185         </complexContent>
186     </complexType>
187
188     <complexType name="StringMatchType" abstract="true">
189         <complexContent>
190             <extension base="afp:MatchFunctorType">
191                 <attribute name="value" type="string" use="required">
192                     <annotation>
193                         <documentation>The string value to match.</documentation>
194                     </annotation>
195                 </attribute>
196                 <attribute name="ignoreCase" type="boolean">
197                     <annotation>
198                         <documentation>
199                             A boolean flag indicating whether case should be ignored when evaluating the match.
200                         </documentation>
201                     </annotation>
202                 </attribute>
203             </extension>
204         </complexContent>
205     </complexType>
206
207     <!--  Regular Expression Match Functions -->
208     <complexType name="AttributeRequesterRegex">
209         <annotation>
210             <documentation>
211                 A match function that matches the attribute requester against the specified regular expression.
212             </documentation>
213         </annotation>
214         <complexContent>
215             <extension base="basic:RegexMatchType" />
216         </complexContent>
217     </complexType>
218
219     <complexType name="AttributeIssuerRegex">
220         <annotation>
221             <documentation>
222                 A match function that matches the attribute issuer against the specified regular expression.
223             </documentation>
224         </annotation>
225         <complexContent>
226             <extension base="basic:RegexMatchType" />
227         </complexContent>
228     </complexType>
229
230     <complexType name="PrincipalNameRegex">
231         <annotation>
232             <documentation>
233                 A match function that matches the principal name against the specified regular expression.
234             </documentation>
235         </annotation>
236         <complexContent>
237             <extension base="basic:RegexMatchType" />
238         </complexContent>
239     </complexType>
240
241     <complexType name="AuthenticationMethodRegex">
242         <annotation>
243             <documentation>
244                 A match function that matches the authentication method against the specified regular expression.
245             </documentation>
246         </annotation>
247         <complexContent>
248             <extension base="basic:RegexMatchType" />
249         </complexContent>
250     </complexType>
251
252     <complexType name="AttributeValueRegex">
253         <annotation>
254             <documentation>
255                 A match function that matches an attribute value against the specified regular expression. This function
256                 evaluates to true if any value matches the given expression.
257             </documentation>
258         </annotation>
259         <complexContent>
260             <extension base="basic:AttributeTargetedRegexMatchType" />
261         </complexContent>
262     </complexType>
263
264     <complexType name="AttributeScopeRegex">
265         <annotation>
266             <documentation>
267                 A match function that matches the attribute scope against the specified regular expression.
268             </documentation>
269         </annotation>
270         <complexContent>
271             <extension base="basic:AttributeTargetedRegexMatchType" />
272         </complexContent>
273     </complexType>
274
275     <complexType name="AttributeTargetedRegexMatchType" abstract="true">
276         <complexContent>
277             <extension base="basic:RegexMatchType">
278                 <attribute name="attributeID" type="string">
279                     <annotation>
280                         <documentation>
281                             The ID of the attribute whose value should be matched. If no attribute ID is specified the
282                             ID of the containing attribute rule is assumed.
283                         </documentation>
284                     </annotation>
285                 </attribute>
286             </extension>
287         </complexContent>
288     </complexType>
289
290     <complexType name="RegexMatchType" abstract="true">
291         <complexContent>
292             <extension base="afp:MatchFunctorType">
293                 <attribute name="regex" type="string" use="required">
294                     <annotation>
295                         <documentation>The regular expression values are matched against.</documentation>
296                     </annotation>
297                 </attribute>
298                 <attribute name="options" type="string">
299                     <annotation>
300                         <documentation>The regular expression options to apply.</documentation>
301                     </annotation>
302                 </attribute>
303             </extension>
304         </complexContent>
305     </complexType>
306
307     <!-- Misc. Functions -->
308     <complexType name="Script">
309         <annotation>
310             <documentation>
311                 A match function that evaluates a script to determine if some criteria is met. The script MUST return a
312                 boolean.
313             </documentation>
314         </annotation>
315         <complexContent>
316             <extension base="afp:MatchFunctorType">
317                 <choice>
318                     <element name="Script" type="string" minOccurs="0">
319                         <annotation>
320                             <documentation>The script to evaluate to construct the attribute.</documentation>
321                         </annotation>
322                     </element>
323                     <element name="ScriptFile" type="string" minOccurs="0">
324                         <annotation>
325                             <documentation>
326                                 The filesystem path to the script to evaluate to construct the attribute.
327                             </documentation>
328                         </annotation>
329                     </element>
330                 </choice>
331                 <attribute name="language" type="string">
332                     <annotation>
333                         <documentation>
334                             The JSR-233 name for the scripting language that will be used. By default "javascript" is
335                             supported.
336                         </documentation>
337                     </annotation>
338                 </attribute>
339             </extension>
340         </complexContent>
341     </complexType>
342
343     <complexType name="NumberOfAttributeValues">
344         <annotation>
345             <documentation>
346                 A match function that evaluates to true if the given attribute has as a number of values that falls
347                 between the minimum and maximum. This method may be used as a sanity check to ensure that an unexpected
348                 number of values did not come from the attribute resolver and be released.
349             </documentation>
350         </annotation>
351         <complexContent>
352             <extension base="afp:MatchFunctorType">
353                 <attribute name="attributeID" type="string" use="required">
354                     <annotation>
355                         <documentation>The ID of the attribute whose value should be matched.</documentation>
356                     </annotation>
357                 </attribute>
358                 <attribute name="minimum" type="nonNegativeInteger">
359                     <annotation>
360                         <documentation>Minimum number of values an attribute may have.</documentation>
361                     </annotation>
362                 </attribute>
363                 <attribute name="maximum" type="positiveInteger">
364                     <annotation>
365                         <documentation>Maximum number of values an attribute may have.</documentation>
366                     </annotation>
367                 </attribute>
368             </extension>
369         </complexContent>
370     </complexType>
371
372 </schema>