Imported Upstream version 2.2.1+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.2">
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     </complexType>
101     
102     <complexType name="StringAttributeDecoder">
103         <annotation>
104             <documentation>
105                 Decoder for attributes with string values.
106             </documentation>
107         </annotation>
108         <complexContent>
109             <extension base="am:AttributeDecoderType" />
110         </complexContent>
111     </complexType>
112
113     <complexType name="ScopedAttributeDecoder">
114         <annotation>
115             <documentation>
116                 Decoder for attributes with scoped values.
117             </documentation>
118         </annotation>
119         <complexContent>
120             <extension base="am:AttributeDecoderType">
121                 <attribute name="scopeDelimiter" type="am:string">
122                     <annotation>
123                         <documentation>
124                             The character(s) used to delimit the scoped information from the scope.
125                         </documentation>
126                     </annotation>
127                 </attribute>
128             </extension>
129         </complexContent>
130     </complexType>
131     
132     <complexType name="NameIDAttributeDecoder">
133         <annotation>
134             <documentation>
135                 Decoder for attributes with NameID values.
136             </documentation>
137         </annotation>
138         <complexContent>
139             <extension base="am:AttributeDecoderType">
140                 <attribute name="formatter" type="am:string">
141                     <annotation>
142                         <documentation>
143                             The pattern used to generate string versions of the attribute's values.
144                         </documentation>
145                     </annotation>
146                 </attribute>
147                 <attribute name="defaultQualifiers" type="boolean">
148                     <annotation>
149                         <documentation>
150                             Flag controlling whether to default in values for NameQualifier/SPNameQualifier if not set.
151                         </documentation>
152                     </annotation>
153                 </attribute>
154             </extension>
155         </complexContent>
156     </complexType>
157
158     <complexType name="NameIDFromScopedAttributeDecoder">
159         <annotation>
160             <documentation>
161                 Decoder for attributes with scoped values that produces a NameID attribute with
162                 the scope dropped and the NameQualifiers defaulted.
163             </documentation>
164         </annotation>
165         <complexContent>
166             <extension base="am:ScopedAttributeDecoder">
167                 <attribute name="format" type="am:anyURI">
168                     <annotation>
169                         <documentation>
170                             Value to use as the NameID Format.
171                         </documentation>
172                     </annotation>
173                 </attribute>
174                 <attribute name="defaultQualifiers" type="boolean">
175                     <annotation>
176                         <documentation>
177                             Flag controlling whether to default in values for NameQualifier/SPNameQualifier if not set.
178                         </documentation>
179                     </annotation>
180                 </attribute>
181                 <attribute name="formatter" type="am:string">
182                     <annotation>
183                         <documentation>
184                             The pattern used to generate string versions of the attribute's values.
185                         </documentation>
186                     </annotation>
187                 </attribute>
188             </extension>
189         </complexContent>
190     </complexType>
191
192 </schema>