Skip to content

Commit

Permalink
Add schemas for eIDAS extensions, elements and attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
  • Loading branch information
c00kiemon5ter committed Aug 9, 2022
1 parent 0a030cb commit 14c649a
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 0 deletions.
86 changes: 86 additions & 0 deletions src/saml2/data/schemas/eidas-schema-attribute-legalperson.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://eidas.europa.eu/attributes/legalperson" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://eidas.europa.eu/attributes/legalperson" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xsd:attribute name="LatinScript" type="xsd:boolean" default="true"/>
<!-- Mandatory attribute types for a legal person. -->
<xsd:simpleType name="LegalPersonIdentifierType">
<xsd:annotation>
<xsd:documentation>Unique identifier for the legal person as defined by the eIDAS Regulation.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:complexType name="LegalNameType">
<xsd:annotation>
<xsd:documentation>Current legal name for the legal person or organisation.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="LatinScript"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Optional attribute types for a legal person. -->
<xsd:complexType name="LegalPersonAddressStructuredType">
<xsd:annotation>
<xsd:documentation>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.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="PoBox" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LocatorDesignator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LocatorName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CvaddressArea" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Thoroughfare" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PostName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="AdminunitFirstline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="AdminunitSecondline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PostCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="LegalPersonAddressType">
<xsd:annotation>
<xsd:documentation>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.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="VATRegistrationNumberType">
<xsd:annotation>
<xsd:documentation>VAT - VAT registration number</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="TaxReferenceType">
<xsd:annotation>
<xsd:documentation>TAX-Ref - tax reference number</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="D-2012-17-EUIdentifierType">
<xsd:annotation>
<xsd:documentation>D-2012/17/EU - the identifier used under Directive 2012/17/EU</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="LEIType">
<xsd:annotation>
<xsd:documentation>LEI - Legal Entity Identifier</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="EORIType">
<xsd:annotation>
<xsd:documentation>EORI - Economic Operator Registration and Identification</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="SEEDType">
<xsd:annotation>
<xsd:documentation>SEED - System for Exchange of Excise Data </xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="SICType">
<xsd:annotation>
<xsd:documentation>SIC - Standard Industrial Classification</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:schema>
88 changes: 88 additions & 0 deletions src/saml2/data/schemas/eidas-schema-attribute-naturalperson.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://eidas.europa.eu/attributes/naturalperson" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://eidas.europa.eu/attributes/naturalperson" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xsd:attribute name="LatinScript" type="xsd:boolean" default="true"/>
<!-- Mandatory attribute types for a natural person. -->
<xsd:simpleType name="PersonIdentifierType">
<xsd:annotation>
<xsd:documentation>Unique identifier for the natural person as defined by the eIDAS Regulation.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:complexType name="CurrentFamilyNameType">
<xsd:annotation>
<xsd:documentation>Current family name of the natural person.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="LatinScript"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="CurrentGivenNameType">
<xsd:annotation>
<xsd:documentation>Current given names of the natural person.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="LatinScript"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="DateOfBirthType">
<xsd:annotation>
<xsd:documentation>Date of Birth for the Natural Person (Based on xsd:date i.e. YYYY-MM-DD format).</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:date"/>
</xsd:simpleType>
<!-- Optional attribute types for a natural person. -->
<xsd:complexType name="CurrentAddressStructuredType">
<xsd:annotation>
<xsd:documentation>Current address of the natural person.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="PoBox" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LocatorDesignator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LocatorName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CvaddressArea" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Thoroughfare" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PostName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="AdminunitFirstline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="AdminunitSecondline" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="PostCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="CurrentAddressType">
<xsd:annotation>
<xsd:documentation>Current address of the natural person as a base64 encoded string.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="GenderType">
<xsd:annotation>
<xsd:documentation>Gender of the natural person.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Male"/>
<xsd:enumeration value="Female"/>
<xsd:enumeration value="Unspecified"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="BirthNameType">
<xsd:annotation>
<xsd:documentation>First name(s) and family name(s) of the natural person at birth.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="LatinScript"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="PlaceOfBirthType">
<xsd:annotation>
<xsd:documentation>Place of birth for a natural person.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string"></xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
103 changes: 103 additions & 0 deletions src/saml2/data/schemas/eidas-schema-metadata-servicelist.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ser="http://eidas.europa.eu/metadata/servicelist" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" version="1.0" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://eidas.europa.eu/metadata/servicelist">
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<xs:annotation>
<xs:documentation>Document identifier: eidas-metadata-servicelist-1.0</xs:documentation>
</xs:annotation>
<xs:element name="MetadataServiceList" type="ser:MetadataServiceListType"/>
<xs:complexType name="MetadataServiceListType">
<xs:annotation>
<xs:documentation>The MetadataServiceListType is the root type for representing a metadata service list. It holds scheme information, metadata locations for each member state and optionally distribution point(s).</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="SchemeInformation" type="ser:SchemeInformationType"/>
<xs:element name="MetadataList" type="ser:MetadataSchemeEndpointListType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="DistributionPoints" type="ser:DistributionPointsType"/>
<xs:element ref="ds:Signature" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="Version" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>The version of a metadata service list.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IssueDate" type="xs:dateTime" use="required">
<xs:annotation>
<xs:documentation>Issuance time for a metadata service list.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="NextUpdate" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Time when the next metadata service list will be published.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ID" type="xs:ID">
<xs:annotation>
<xs:documentation>The unique ID for a metadata service list.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="SchemeInformationType">
<xs:annotation>
<xs:documentation>Scheme information about a published metadata service list, where the publisher and territory are included.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="IssuerName" type="xs:string"/>
<xs:element name="SchemeIdentifier" type="xs:anyURI"/>
<xs:element name="SchemeTerritory" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MetadataSchemeEndpointListType">
<xs:annotation>
<xs:documentation>Defines the metadata location(s) for a specific member state (territory).</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element type="ser:MetadataLocationType" name="MetadataLocation" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Territory" type="xs:string" use="required"/>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="DistributionPointsType">
<xs:annotation>
<xs:documentation>A list of distribution points. URLs from where the metadata service list can be downloaded.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DistributionPoint" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MetadataLocationType">
<xs:sequence>
<xs:element name="Endpoint" type="ser:MsEndpointType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>A list of eIDAS endpoints (nodes) for the current location.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="ds:KeyInfo" minOccurs="0">
<xs:annotation>
<xs:documentation>Key material (usually a certificate) that should be used to verify the signature of the downloaded metadata for this metadata location.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="Location" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>The URL from where the metadata for the endpoint(s) can be obtained.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="MsEndpointType">
<xs:annotation>
<xs:documentation>Defines a member state "endpoint" (eIDAS node).</xs:documentation>
</xs:annotation>
<xs:attribute name="EndpointType" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>The type of endpoint. Currently defined URI:s are: http://eidas.europa.eu/metadata/ept/ProxyService for an eIDAS Proxy Service, and, http://eidas.europa.eu/metadata/ept/Connector for an eIDAS Connector.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EntityID" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>The SAML entityID of the endpoint. For an eIDAS connector this is the entityID for the SP-part of the node, and for an eIDAS Proxy Service this is the entityID for the IdP-part of the node.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
</xs:schema>
33 changes: 33 additions & 0 deletions src/saml2/data/schemas/eidas-schema-saml-extensions.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:eidas="http://eidas.europa.eu/saml-extensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://eidas.europa.eu/saml-extensions" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1">
<xsd:element name="SPType" type="eidas:SPTypeType"/>
<xsd:simpleType name="SPTypeType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="public"/>
<xsd:enumeration value="private"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="NodeCountry" type="eidas:NodeCountryType"/>
<xsd:simpleType name="NodeCountryType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[A-Z][A-Z]"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name=" RequestedAttributes" type="eidas:RequestedAttributesType"/>
<xsd:complexType name="RequestedAttributesType">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="eidas:RequestedAttribute"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="RequestedAttribute" type="eidas:RequestedAttributeType"/>
<xsd:complexType name="RequestedAttributeType">
<xsd:sequence>
<xsd:element name=" AttributeValue" type="xsd:anyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="NameFormat" type="xsd:anyURI" use="required"/>
<xsd:attribute name="isRequired" type=" xsd:boolean" use="required"/>
<xsd:attribute name="FriendlyName" type="xsd:string" use="optional"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
</xsd:schema>

0 comments on commit 14c649a

Please sign in to comment.