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