Tagging 2.4RC1 release.
[shibboleth/sp.git] / schemas / shibboleth-2.0-attribute-map.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <schema targetNamespace="urn:mace:shibboleth:2.0:attribute-map"
3         xmlns="http://www.w3.org/2001/XMLSchema"
4         xmlns:am="urn:mace:shibboleth:2.0:attribute-map"
5         xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
6         elementFormDefault="qualified"
7         version="2.3">
8
9     <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" />
10
11     <annotation>
12         <documentation>
13             This schema maps SAML attributes into Shibboleth internal attributes.
14         </documentation>
15     </annotation>
16
17     <simpleType name="string">
18         <restriction base="string">
19             <minLength value="1"/>
20         </restriction>
21     </simpleType>
22
23     <simpleType name="anyURI">
24         <restriction base="anyURI">
25             <minLength value="1"/>
26         </restriction>
27     </simpleType>
28
29     <simpleType name="listOfStrings">
30         <list itemType="am:string"/>
31     </simpleType>
32
33     <complexType name="PluggableType">
34         <sequence>
35             <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
36         </sequence>
37         <attribute name="type" type="am:string" use="required"/>
38         <anyAttribute namespace="##any" processContents="lax"/>
39     </complexType>
40     
41     <element name="Attributes">
42         <annotation>
43             <documentation>The set of SAML 1/2 attribute mappings.</documentation>
44         </annotation>
45         <complexType>
46             <sequence>
47                 <element name="MetadataProvider" type="am:PluggableType" minOccurs="0"/>
48                 <element name="TrustEngine" type="am:PluggableType" minOccurs="0"/>
49                 <element name="AttributeFilter" type="am:PluggableType" minOccurs="0"/>
50                 <element name="Attribute" type="am:AttributeType" maxOccurs="unbounded"/>
51                 <element ref="ds:Signature" minOccurs="0"/>
52             </sequence>
53             <attribute name="metadataPolicyId" type="am:string"/>
54         </complexType>
55     </element>
56
57     <complexType name="AttributeType">
58         <annotation>
59             <documentation>Rule for mapping a SAML 1/2 attribute to an internal attribute.</documentation>
60         </annotation>
61         <sequence>
62             <element name="AttributeDecoder" type="am:AttributeDecoderType" minOccurs="0"/>
63         </sequence>
64         <attribute name="id" type="am:string" use="required">
65             <annotation>
66                 <documentation>The internal attribute ID to which this SAML attribute maps.</documentation>
67             </annotation>
68         </attribute>
69         <attribute name="aliases" type="am:listOfStrings">
70             <annotation>
71                 <documentation>Optional aliases for the internal attribute to which this SAML attribute maps.</documentation>
72             </annotation>
73         </attribute>
74         <attribute name="name" type="am:string" use="required">
75             <annotation>
76                 <documentation>The SAML 1 AttributeName or SAML 2 Name of the attribute.</documentation>
77             </annotation>
78         </attribute>
79         <attribute name="nameFormat" type="am:string">
80             <annotation>
81                 <documentation>The SAML 1 Namespace or SAML 2 NameFormat of the attribute.</documentation>
82             </annotation>
83         </attribute>
84         <attribute name="isRequested" type="boolean">
85           <annotation>
86             <documentation>Marks an attribute as requested by the service.</documentation>
87           </annotation>
88         </attribute>
89         <attribute name="isRequired" type="boolean">
90           <annotation>
91             <documentation>Marks an attribute as required by the service.</documentation>
92           </annotation>
93         </attribute>
94     </complexType>
95     
96     <complexType name="AttributeDecoderType" abstract="true">
97         <annotation>
98             <documentation>
99                 Decodes a SAML attribute into its Shibboleth-internal representation.
100             </documentation>
101         </annotation>
102         <attribute name="caseSensitive" type="boolean">
103             <annotation>
104                 <documentation>
105                     Flag controlling case sensitivity when comparisons to the attribute's values are done.
106                 </documentation>
107             </annotation>
108         </attribute>
109         <attribute name="internal" type="boolean">
110             <annotation>
111                 <documentation>Flag controlling whether the resulting attribute should be exported for CGI use.</documentation>
112             </annotation>
113         </attribute>
114         <attribute name="hashAlg" type="am:string">
115             <annotation>
116                 <documentation>
117                     Crypto-provider-specific name of hash algorithm to use,
118                     turning the decoded result into a simple string.
119                 </documentation>
120             </annotation>
121         </attribute>
122     </complexType>
123     
124     <complexType name="StringAttributeDecoder">
125         <annotation>
126             <documentation>
127                 Decoder for attributes with string values.
128             </documentation>
129         </annotation>
130         <complexContent>
131             <extension base="am:AttributeDecoderType" />
132         </complexContent>
133     </complexType>
134
135     <complexType name="ScopedAttributeDecoder">
136         <annotation>
137             <documentation>
138                 Decoder for attributes with scoped values.
139             </documentation>
140         </annotation>
141         <complexContent>
142             <extension base="am:AttributeDecoderType">
143                 <attribute name="scopeDelimiter" type="am:string">
144                     <annotation>
145                         <documentation>
146                             The character(s) used to delimit the scoped information from the scope.
147                         </documentation>
148                     </annotation>
149                 </attribute>
150             </extension>
151         </complexContent>
152     </complexType>
153     
154     <complexType name="NameIDAttributeDecoder">
155         <annotation>
156             <documentation>
157                 Decoder for attributes with NameID values.
158             </documentation>
159         </annotation>
160         <complexContent>
161             <extension base="am:AttributeDecoderType">
162                 <attribute name="formatter" type="am:string">
163                     <annotation>
164                         <documentation>
165                             The pattern used to generate string versions of the attribute's values.
166                         </documentation>
167                     </annotation>
168                 </attribute>
169                 <attribute name="defaultQualifiers" type="boolean">
170                     <annotation>
171                         <documentation>
172                             Flag controlling whether to default in values for NameQualifier/SPNameQualifier if not set.
173                         </documentation>
174                     </annotation>
175                 </attribute>
176             </extension>
177         </complexContent>
178     </complexType>
179
180     <complexType name="NameIDFromScopedAttributeDecoder">
181         <annotation>
182             <documentation>
183                 Decoder for attributes with scoped values that produces a NameID attribute with
184                 the scope dropped and the NameQualifiers defaulted.
185             </documentation>
186         </annotation>
187         <complexContent>
188             <extension base="am:ScopedAttributeDecoder">
189                 <attribute name="format" type="am:anyURI">
190                     <annotation>
191                         <documentation>
192                             Value to use as the NameID Format.
193                         </documentation>
194                     </annotation>
195                 </attribute>
196                 <attribute name="defaultQualifiers" type="boolean">
197                     <annotation>
198                         <documentation>
199                             Flag controlling whether to default in values for NameQualifier/SPNameQualifier if not set.
200                         </documentation>
201                     </annotation>
202                 </attribute>
203                 <attribute name="formatter" type="am:string">
204                     <annotation>
205                         <documentation>
206                             The pattern used to generate string versions of the attribute's values.
207                         </documentation>
208                     </annotation>
209                 </attribute>
210             </extension>
211         </complexContent>
212     </complexType>
213
214     <complexType name="KeyInfoAttributeDecoder">
215         <annotation>
216             <documentation>
217                 Decoder for attributes with ds:KeyInfo values.
218             </documentation>
219         </annotation>
220         <complexContent>
221             <extension base="am:AttributeDecoderType">
222                 <sequence>
223                     <element name="KeyInfoResolver" type="am:PluggableType" minOccurs="0"/>
224                 </sequence>
225                 <attribute name="hash" type="boolean">
226                     <annotation>
227                         <documentation>
228                             Flag controlling whether to hash keys before base64-encoding them.
229                         </documentation>
230                     </annotation>
231                 </attribute>
232                 <attribute name="keyInfoHashAlg" type="am:string">
233                     <annotation>
234                         <documentation>
235                             Crypto-provider-specific name of hash algorithm to use.
236                         </documentation>
237                     </annotation>
238                 </attribute>
239             </extension>
240         </complexContent>
241     </complexType>
242
243     <complexType name="XMLAttributeDecoder">
244         <annotation>
245             <documentation>
246                 Decoder for directly serializing XML values.
247             </documentation>
248         </annotation>
249         <complexContent>
250             <extension base="am:AttributeDecoderType"/>
251         </complexContent>
252     </complexType>
253
254     <complexType name="DOMAttributeDecoder">
255         <annotation>
256             <documentation>
257                 Decoder for extracting information from XML values.
258             </documentation>
259         </annotation>
260         <complexContent>
261             <extension base="am:AttributeDecoderType">
262                 <sequence>
263                     <element name="Mapping" minOccurs="0">
264                         <annotation>
265                             <documentation>Optional transform to turn qualified XML names into string names.</documentation>
266                         </annotation>
267                         <complexType>
268                             <attribute name="from" type="QName" use="required"/>
269                             <attribute name="to" type="am:string" use="required"/>
270                         </complexType>
271                     </element>
272                 </sequence>
273                 <attribute name="formatter" type="am:string">
274                     <annotation>
275                         <documentation>
276                             The pattern used to generate strings from the XML.
277                         </documentation>
278                     </annotation>
279                 </attribute>
280             </extension>
281         </complexContent>
282     </complexType>
283
284     <complexType name="Base64AttributeDecoder">
285         <annotation>
286             <documentation>
287                 Decoder for attributes with base64-encoded string values.
288             </documentation>
289         </annotation>
290         <complexContent>
291             <extension base="am:AttributeDecoderType" />
292         </complexContent>
293     </complexType>
294
295 </schema>