Copied over mapping and filtering schemas.
[shibboleth/sp.git] / schemas / shibboleth-2.0-afp.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <schema targetNamespace="urn:mace:shibboleth:2.0:afp" xmlns="http://www.w3.org/2001/XMLSchema"
4     xmlns:afp="urn:mace:shibboleth:2.0:afp" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">\r
5 \r
6     <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="classpath:/schema/xmldsig-core-schema.xsd" />\r
7 \r
8     <annotation>
9         <documentation>Schema for the attribute filter policies.</documentation>
10     </annotation>
11
12     <element name="AttributeFilterPolicyGroup" type="afp:AttributeFilterPolicyGroupType">
13         <annotation>
14             <documentation>
15                 Root element of the attribute filter policy. Represents a named group of filter policies.
16             </documentation>
17         </annotation>
18     </element>
19     <complexType name="AttributeFilterPolicyGroupType">
20         <complexContent>
21             <extension base="afp:IndentityType">
22                 <sequence>
23                     <element ref="afp:PolicyRequirementRule" minOccurs="0" maxOccurs="unbounded">
24                         <annotation>
25                             <documentation>
26                                 Defines a set of applications requirements that may be reused across multiple filter
27                                 policies.
28                             </documentation>
29                         </annotation>
30                     </element>
31                     <element ref="afp:AttributeRule" minOccurs="0" maxOccurs="unbounded">
32                         <annotation>
33                             <documentation>
34                                 Defines an attribute rule that may be reused across multiple filter policies.
35                             </documentation>
36                         </annotation>
37                     </element>
38                     <element ref="afp:PermitValueRule" minOccurs="0" maxOccurs="unbounded">
39                         <annotation>
40                             <documentation>
41                                 Defines an attribute value filter that may be reused across multiple attribtue rules.
42                             </documentation>
43                         </annotation>
44                     </element>\r
45                     <element ref="afp:AttributeFilterPolicy" minOccurs="0" maxOccurs="unbounded">
46                         <annotation>
47                             <documentation>
48                                 A policy that defines the set of attribute value filters that will be applied if its
49                                 application requirements are met.
50                             </documentation>
51                         </annotation>
52                     </element>
53                     <element ref="ds:Signature" minOccurs="0">
54                         <annotation>
55                             <documentation>
56                                 Digital signature for the policy. Policies that are fetched from an external source,
57                                 such as a federation site, should be signed.
58                             </documentation>
59                         </annotation>
60                     </element>\r
61                 </sequence>\r
62             </extension>
63         </complexContent>\r
64     </complexType>
65
66     <element name="AttributeFilterPolicy" type="afp:AttributeFilterPolicyType">
67         <annotation>
68             <documentation>
69                 A policy that defines a set of attribute value filters rules that should be used if given requirements
70                 are met.
71             </documentation>
72         </annotation>
73     </element>
74     <complexType name="AttributeFilterPolicyType">
75         <complexContent>
76             <extension base="afp:IndentityType">
77                 <sequence>
78                     <choice>
79                         <element ref="afp:PolicyRequirementRule">
80                             <annotation>
81                                 <documentation>
82                                     A requirement that if met signals that this filter policy should be used.
83                                 </documentation>
84                             </annotation>
85                         </element>
86                         <element name="PolicyRequirementRuleReference" type="afp:ReferenceType">
87                             <annotation>
88                                 <documentation>
89                                     Rerfence to a PolicyRequirement defined within this policy group or another.
90                                 </documentation>
91                             </annotation>
92                         </element>
93                     </choice>
94                     <choice minOccurs="0" maxOccurs="unbounded">
95                         <element ref="afp:AttributeRule">
96                             <annotation>
97                                 <documentation>
98                                     A rule that describes how values of an attribute will be filtered.
99                                 </documentation>
100                             </annotation>
101                         </element>
102                         <element name="AttributeRuleReference" type="afp:ReferenceType">
103                             <annotation>
104                                 <documentation>
105                                     Rerfence to a AttribtueRule defined within this policy group or another.
106                                 </documentation>
107                             </annotation>
108                         </element>
109                     </choice>
110                 </sequence>
111             </extension>
112         </complexContent>
113     </complexType>\r
114 \r
115     <element name="AttributeRule" type="afp:AttributeRuleType">
116         <annotation>
117             <documentation>A rule that describes how values of an attribute will be filtered.</documentation>
118         </annotation>
119     </element>\r
120     <complexType name="AttributeRuleType">
121         <complexContent>
122             <extension base="afp:IndentityType">
123                 <choice>
124                     <element ref="afp:PermitValueRule">
125                         <annotation>
126                             <documentation>
127                                 A filter for attribute values. If the filter evaluates to true the value is permitted,
128                                 otherwise it is filtered out.
129                             </documentation>
130                         </annotation>
131                     </element>
132                     <element name="PermitValueRuleReference" type="afp:ReferenceType">
133                         <annotation>
134                             <documentation>
135                                 Rerfence to a PermitValueRule defined within this policy group or another.
136                             </documentation>
137                         </annotation>
138                     </element>
139                 </choice>
140                 <attribute name="attributeID" type="string" use="required">
141                     <annotation>
142                         <documentation>The ID of the attribute to which this rule applies.</documentation>
143                     </annotation>
144                 </attribute>
145             </extension>
146         </complexContent>\r
147     </complexType>
148
149     <element name="PolicyRequirementRule" type="afp:MatchFunctorType">
150         <annotation>
151             <documentation>A requirement that if met signals that a filter policy should be used.</documentation>
152         </annotation>
153     </element>
154     <element name="PermitValueRule" type="afp:MatchFunctorType">
155         <annotation>
156             <documentation>
157                 A filter for attribtue values. If the filter evaluates to true the value is permitted, otherwise it is
158                 filtered out.
159             </documentation>
160         </annotation>
161     </element>
162     <complexType name="MatchFunctorType" abstract="true">
163         <complexContent>
164             <extension base="afp:IndentityType" />
165         </complexContent>
166     </complexType>
167
168     <complexType name="IndentityType">
169         <attribute name="id" type="string">
170             <annotation>
171                 <documentation>An ID, unique within the policy and component type.</documentation>
172             </annotation>
173         </attribute>
174     </complexType>
175
176     <complexType name="ReferenceType">
177         <attribute name="ref" type="string">
178             <annotation>
179                 <documentation>Used to reference a globally defined policy component.</documentation>
180             </annotation>
181         </attribute>
182     </complexType>
183
184 </schema>