Skip to content

Commit 33472e1

Browse files
committed
Added schemas to completely validate AuthResponse (including dummy microsoft cgg/2016 schema
1 parent 4980fcf commit 33472e1

11 files changed

Lines changed: 2830 additions & 0 deletions

lib/schemas/CoreVocabularies-AggregateComponents-1.1.xsd

Lines changed: 1703 additions & 0 deletions
Large diffs are not rendered by default.

lib/schemas/CoreVocabularies-BasicComponents-1.1.xsd

Lines changed: 416 additions & 0 deletions
Large diffs are not rendered by default.

lib/schemas/eidas-saml-extensions.xsd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
xmlns:eidas="http://eidas.europa.eu/saml-extensions"
99
version="1">
1010

11+
<xsd:import namespace="http://eidas.europa.eu/attributes/naturalperson" schemaLocation="saml_eidas_natural_person.xsd"/>
12+
<xsd:import namespace="http://schemas.microsoft.com/cgg/2016/identity/claims/approvedclaim" schemaLocation="microsoft_cgg_2016.xsd"/>
13+
1114
<xsd:element name="SPType" type="SPTypeType"/>
1215

1316
<xsd:simpleType name="SPTypeType">

lib/schemas/eidas_schema.xsd

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsd:schema
3+
xmlns="http://eidas.europa.eu/attributes/naturalperson"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
targetNamespace="http://eidas.europa.eu/attributes/naturalperson"
6+
elementFormDefault="qualified"
7+
attributeFormDefault="unqualified"
8+
version="1">
9+
10+
<xsd:attribute name="LatinScript" type="xsd:boolean" default="true"/>
11+
12+
<!--
13+
Mandatory attribute types for a natural person.
14+
-->
15+
<xsd:simpleType name="PersonIdentifierType">
16+
<xsd:annotation>
17+
<xsd:documentation>
18+
Unique identifier for the natural person as defined by the eIDAS Regulation.
19+
</xsd:documentation>
20+
</xsd:annotation>
21+
<xsd:restriction base="xsd:string"/>
22+
</xsd:simpleType>
23+
24+
<xsd:complexType name="CurrentFamilyNameType">
25+
<xsd:annotation>
26+
<xsd:documentation>
27+
Current family name of the natural person.
28+
</xsd:documentation>
29+
</xsd:annotation>
30+
<xsd:simpleContent>
31+
<xsd:extension base="xsd:string">
32+
<xsd:attribute ref="LatinScript"/>
33+
</xsd:extension>
34+
</xsd:simpleContent>
35+
</xsd:complexType>
36+
37+
<xsd:complexType name="CurrentGivenNameType">
38+
<xsd:annotation>
39+
<xsd:documentation>
40+
Current given names of the natural person.
41+
</xsd:documentation>
42+
</xsd:annotation>
43+
<xsd:simpleContent>
44+
<xsd:extension base="xsd:string">
45+
<xsd:attribute ref="LatinScript"/>
46+
</xsd:extension>
47+
</xsd:simpleContent>
48+
</xsd:complexType>
49+
50+
<xsd:simpleType name="DateOfBirthType">
51+
<xsd:annotation>
52+
<xsd:documentation>
53+
Date of Birth for the Natural Person (Based on xsd:date i.e. YYYY-MM-DD format).
54+
</xsd:documentation>
55+
</xsd:annotation>
56+
<xsd:restriction base="xsd:date"/>
57+
</xsd:simpleType>
58+
59+
<!--
60+
Optional attribute types for a natural person.
61+
-->
62+
<xsd:complexType name="CurrentAddressStructuredType">
63+
<xsd:annotation>
64+
<xsd:documentation>
65+
Current address of the natural person.
66+
</xsd:documentation>
67+
</xsd:annotation>
68+
<xsd:sequence>
69+
<xsd:element name="PoBox" type="xsd:string" minOccurs="0" maxOccurs="1"/>
70+
<xsd:element name="LocatorDesignator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
71+
<xsd:element name="LocatorName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
72+
<xsd:element name="CvaddressArea" type="xsd:string" minOccurs="0" maxOccurs="1"/>
73+
<xsd:element name="Thoroughfare" type="xsd:string" minOccurs="0" maxOccurs="1"/>
74+
<xsd:element name="PostName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
75+
<xsd:element name="AdminunitFirstline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
76+
<xsd:element name="AdminunitSecondline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
77+
<xsd:element name="PostCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
78+
</xsd:sequence>
79+
</xsd:complexType>
80+
81+
<xsd:simpleType name="CurrentAddressType">
82+
<xsd:annotation>
83+
<xsd:documentation>
84+
Current address of the natural person as a base64 encoded string.
85+
</xsd:documentation>
86+
</xsd:annotation>
87+
<xsd:restriction base="xsd:string"/>
88+
</xsd:simpleType>
89+
90+
<xsd:simpleType name="GenderType">
91+
<xsd:annotation>
92+
<xsd:documentation>
93+
Gender of the natural person.
94+
</xsd:documentation>
95+
</xsd:annotation>
96+
<xsd:restriction base="xsd:string">
97+
<xsd:enumeration value="Male"/>
98+
<xsd:enumeration value="Female"/>
99+
<xsd:enumeration value="Unspecified"/>
100+
</xsd:restriction>
101+
</xsd:simpleType>
102+
103+
<xsd:complexType name="BirthNameType">
104+
<xsd:annotation>
105+
<xsd:documentation>
106+
First name(s) and family name(s) of the natural person at birth.
107+
</xsd:documentation>
108+
</xsd:annotation>
109+
<xsd:simpleContent>
110+
<xsd:extension base="xsd:string">
111+
<xsd:attribute ref="LatinScript"/>
112+
</xsd:extension>
113+
</xsd:simpleContent>
114+
</xsd:complexType>
115+
116+
<xsd:complexType name="PlaceOfBirthType">
117+
<xsd:annotation>
118+
<xsd:documentation>
119+
Place of birth for a natural person.
120+
</xsd:documentation>
121+
</xsd:annotation>
122+
<xsd:simpleContent>
123+
<xsd:extension base="xsd:string">
124+
</xsd:extension>
125+
</xsd:simpleContent>
126+
</xsd:complexType>
127+
128+
129+
130+
131+
<!--
132+
Mandatory attribute types for a legal person.
133+
-->
134+
<xsd:simpleType name="LegalPersonIdentifierType">
135+
<xsd:annotation>
136+
<xsd:documentation>
137+
Unique identifier for the legal person as defined by the eIDAS Regulation.
138+
</xsd:documentation>
139+
</xsd:annotation>
140+
<xsd:restriction base="xsd:string"/>
141+
</xsd:simpleType>
142+
143+
<xsd:complexType name="LegalNameType">
144+
<xsd:annotation>
145+
<xsd:documentation>
146+
Current legal name for the legal person or organisation.
147+
</xsd:documentation>
148+
</xsd:annotation>
149+
<xsd:simpleContent>
150+
<xsd:extension base="xsd:string">
151+
<xsd:attribute ref="LatinScript"/>
152+
</xsd:extension>
153+
</xsd:simpleContent>
154+
</xsd:complexType>
155+
156+
<!--
157+
Optional attribute types for a legal person.
158+
-->
159+
<xsd:complexType name="LegalPersonAddressStructuredType">
160+
<xsd:annotation>
161+
<xsd:documentation>
162+
The address the legal person has registered with the MS authority or operating address if not registered. For a company this should be the registered address within the MS issuing the eID.
163+
</xsd:documentation>
164+
</xsd:annotation>
165+
<xsd:sequence>
166+
<xsd:element name="PoBox" type="xsd:string" minOccurs="0" maxOccurs="1"/>
167+
<xsd:element name="LocatorDesignator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
168+
<xsd:element name="LocatorName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
169+
<xsd:element name="CvaddressArea" type="xsd:string" minOccurs="0" maxOccurs="1"/>
170+
<xsd:element name="Thoroughfare" type="xsd:string" minOccurs="0" maxOccurs="1"/>
171+
<xsd:element name="PostName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
172+
<xsd:element name="AdminunitFirstline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
173+
<xsd:element name="AdminunitSecondline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
174+
<xsd:element name="PostCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
175+
</xsd:sequence>
176+
</xsd:complexType>
177+
178+
<xsd:simpleType name="LegalPersonAddressType">
179+
<xsd:annotation>
180+
<xsd:documentation>
181+
The address the legal person has registered with the MS authority or operating address if not registered. For a company this should be the registered address within the MS issuing the eID as a base64 encoded string.
182+
</xsd:documentation>
183+
</xsd:annotation>
184+
<xsd:restriction base="xsd:string"/>
185+
</xsd:simpleType>
186+
187+
<xsd:simpleType name="VATRegistrationNumberType">
188+
<xsd:annotation>
189+
<xsd:documentation>VAT - VAT registration number
190+
</xsd:documentation>
191+
</xsd:annotation>
192+
<xsd:restriction base="xsd:string"/>
193+
</xsd:simpleType>
194+
195+
<xsd:simpleType name="TaxReferenceType">
196+
<xsd:annotation>
197+
<xsd:documentation>TAX-Ref - tax reference number
198+
</xsd:documentation>
199+
</xsd:annotation>
200+
<xsd:restriction base="xsd:string"/>
201+
</xsd:simpleType>
202+
203+
<xsd:simpleType name="D-2012-17-EUIdentifierType">
204+
<xsd:annotation>
205+
<xsd:documentation>D-2012/17/EU - the identifier used under Directive 2012/17/EU
206+
</xsd:documentation>
207+
</xsd:annotation>
208+
<xsd:restriction base="xsd:string"/>
209+
</xsd:simpleType>
210+
211+
<xsd:simpleType name="LEIType">
212+
<xsd:annotation>
213+
<xsd:documentation>LEI - Legal Entity Identifier
214+
</xsd:documentation>
215+
</xsd:annotation>
216+
<xsd:restriction base="xsd:string"/>
217+
</xsd:simpleType>
218+
219+
<xsd:simpleType name="EORIType">
220+
<xsd:annotation>
221+
<xsd:documentation>EORI - Economic Operator Registration and Identification
222+
</xsd:documentation>
223+
</xsd:annotation>
224+
<xsd:restriction base="xsd:string"/>
225+
</xsd:simpleType>
226+
227+
<xsd:simpleType name="SEEDType">
228+
<xsd:annotation>
229+
<xsd:documentation>SEED - System for Exchange of Excise Data
230+
</xsd:documentation>
231+
</xsd:annotation>
232+
<xsd:restriction base="xsd:string"/>
233+
</xsd:simpleType>
234+
235+
<xsd:simpleType name="SICType">
236+
<xsd:annotation>
237+
<xsd:documentation>SIC - Standard Industrial Classification
238+
</xsd:documentation>
239+
</xsd:annotation>
240+
<xsd:restriction base="xsd:string"/>
241+
</xsd:simpleType>
242+
243+
</xsd:schema>

lib/schemas/microsoft_cgg_2016.xsd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsd:schema
3+
xmlns="http://schemas.microsoft.com/cgg/2016/identity/claims/approvedclaim"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
targetNamespace="http://schemas.microsoft.com/cgg/2016/identity/claims/approvedclaim"
6+
elementFormDefault="qualified"
7+
attributeFormDefault="unqualified"
8+
version="1">
9+
10+
<xsd:simpleType name="string">
11+
<xsd:annotation>
12+
<xsd:documentation>
13+
Unique identifier for the natural person as defined by the eIDAS Regulation.
14+
</xsd:documentation>
15+
</xsd:annotation>
16+
<xsd:restriction base="xsd:string"/>
17+
</xsd:simpleType>
18+
19+
</xsd:schema>

lib/schemas/saml-schema-protocol-2.0.xsd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
schemaLocation="saml-schema-assertion-2.0.xsd"/>
1414
<import namespace="http://www.w3.org/2000/09/xmldsig#"
1515
schemaLocation="xmldsig-core-schema.xsd"/>
16+
<import namespace="http://eidas.europa.eu/saml-extensions"
17+
schemaLocation="eidas-saml-extensions.xsd"/>
1618
<annotation>
1719
<documentation>
1820
Document identifier: saml-schema-protocol-2.0
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xsd:schema
3+
xmlns="http://eidas.europa.eu/saml-extensions"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
targetNamespace="http://eidas.europa.eu/saml-extensions"
6+
elementFormDefault="qualified"
7+
attributeFormDefault="unqualified"
8+
xmlns:eidas="http://eidas.europa.eu/saml-extensions"
9+
version="1">
10+
11+
<xsd:element name="SPType" type="SPTypeType"/>
12+
13+
<xsd:simpleType name="SPTypeType">
14+
<xsd:restriction base="xsd:string">
15+
<xsd:enumeration value="public"/>
16+
<xsd:enumeration value="private"/>
17+
</xsd:restriction>
18+
</xsd:simpleType>
19+
<xsd:element name="RequestedAttributes" type="eidas:RequestedAttributesType" />
20+
<xsd:complexType name="RequestedAttributesType">
21+
<xsd:sequence>
22+
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="eidas:RequestedAttribute"/>
23+
</xsd:sequence>
24+
</xsd:complexType>
25+
<xsd:element name="RequestedAttribute" type="eidas:RequestedAttributeType" />
26+
<xsd:complexType name="RequestedAttributeType">
27+
<xsd:sequence>
28+
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="eidas:AttributeValue"/>
29+
</xsd:sequence>
30+
<xsd:attribute name="Name" use="required" type="xsd:string"/>
31+
<xsd:attribute name="NameFormat" use="required" type="xsd:anyURI"/>
32+
<xsd:attribute name="FriendlyName" use="optional" type="xsd:string"/>
33+
<xsd:attribute name="isRequired" use="optional" type="xsd:boolean"/>
34+
<xsd:anyAttribute namespace="##other" processContents="lax"/>
35+
</xsd:complexType>
36+
<xsd:element name="AttributeValue" type="xsd:anyType" />
37+
38+
</xsd:schema>

0 commit comments

Comments
 (0)