https://issues.shibboleth.net/jira/browse/SSPCPP-155
[shibboleth/cpp-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.1">
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     <element name="Attributes">
31         <annotation>
32             <documentation>The set of SAML 1/2 attribute mappings.</documentation>
33         </annotation>
34         <complexType>
35             <sequence>
36                 <element name="Attribute" type="am:AttributeType" maxOccurs="unbounded"/>
37             </sequence>
38         </complexType>
39     </element>
40
41     <complexType name="AttributeType">
42         <annotation>
43             <documentation>Rule for mapping a SAML 1/2 attribute to an internal attribute.</documentation>
44         </annotation>
45         <sequence>
46             <element name="AttributeDecoder" type="am:AttributeDecoderType" minOccurs="0"/>
47         </sequence>
48         <attribute name="id" type="am:string" use="required">
49             <annotation>
50                 <documentation>The internal attribute ID to which this SAML attribute maps.</documentation>
51             </annotation>
52         </attribute>
53         <attribute name="aliases" type="am:listOfStrings">
54             <annotation>
55                 <documentation>Optional aliases for the internal attribute to which this SAML attribute maps.</documentation>
56             </annotation>
57         </attribute>
58         <attribute name="name" type="am:string" use="required">
59             <annotation>
60                 <documentation>The SAML 1 AttributeName or SAML 2 Name of the attribute.</documentation>
61             </annotation>
62         </attribute>
63         <attribute name="nameFormat" type="am:string">
64             <annotation>
65                 <documentation>The SAML 1 Namespace or SAML 2 NameFormat of the attribute.</documentation>
66             </annotation>
67         </attribute>
68     </complexType>
69     
70     <complexType name="AttributeDecoderType" abstract="true">
71         <annotation>
72             <documentation>
73                 Decodes a SAML attribute into its Shibboleth-internal representation.
74             </documentation>
75         </annotation>
76         <attribute name="caseSensitive" type="boolean" default="true">
77             <annotation>
78                 <documentation>
79                     Flag controlling case sensitivity when comparisons to the attribute's values are done.
80                 </documentation>
81             </annotation>
82         </attribute>
83     </complexType>
84     
85     <complexType name="StringAttributeDecoder">
86         <annotation>
87             <documentation>
88                 Decoder for attributes with string values.
89             </documentation>
90         </annotation>
91         <complexContent>
92             <extension base="am:AttributeDecoderType" />
93         </complexContent>
94     </complexType>
95
96     <complexType name="ScopedAttributeDecoder">
97         <annotation>
98             <documentation>
99                 Decoder for attributes with scoped values.
100             </documentation>
101         </annotation>
102         <complexContent>
103             <extension base="am:AttributeDecoderType">
104                 <attribute name="scopeDelimiter" type="am:string">
105                     <annotation>
106                         <documentation>
107                             The character(s) used to delimit the scoped information from the scope.
108                         </documentation>
109                     </annotation>
110                 </attribute>
111             </extension>
112         </complexContent>
113     </complexType>
114     
115     <complexType name="NameIDAttributeDecoder">
116         <annotation>
117             <documentation>
118                 Decoder for attributes with NameID values.
119             </documentation>
120         </annotation>
121         <complexContent>
122             <extension base="am:AttributeDecoderType">
123                 <attribute name="formatter" type="am:string">
124                     <annotation>
125                         <documentation>
126                             The pattern used to generate string versions of the attribute's values.
127                         </documentation>
128                     </annotation>
129                 </attribute>
130             </extension>
131         </complexContent>
132     </complexType>
133
134     <complexType name="NameIDFromScopedAttributeDecoder">
135         <annotation>
136             <documentation>
137                 Decoder for attributes with scoped values that produces a NameID attribute with
138                 the scope dropped and the NameQualifiers defaulted.
139             </documentation>
140         </annotation>
141         <complexContent>
142             <extension base="am:ScopedAttributeDecoder">
143                 <attribute name="format" type="am:anyURI">
144                     <annotation>
145                         <documentation>
146                             Value to use as the NameID Format.
147                         </documentation>
148                     </annotation>
149                 </attribute>
150                 <attribute name="formatter" type="am:string">
151                     <annotation>
152                         <documentation>
153                             The pattern used to generate string versions of the attribute's values.
154                         </documentation>
155                     </annotation>
156                 </attribute>
157             </extension>
158         </complexContent>
159     </complexType>
160
161 </schema>