diff options
author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2022-08-09 15:45:53 +0300 |
---|---|---|
committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2022-08-09 15:45:53 +0300 |
commit | 14c649a9f3f68f5d95cd0b9c53e011bfd6ed8485 (patch) | |
tree | aa31b35590422a46bf6166088d50880e867e76d1 | |
parent | 0a030cb6c7df204298d12cf061c22e7a3d9028f8 (diff) | |
download | pysaml2-14c649a9f3f68f5d95cd0b9c53e011bfd6ed8485.tar.gz |
Add schemas for eIDAS extensions, elements and attributes
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
4 files changed, 310 insertions, 0 deletions
diff --git a/src/saml2/data/schemas/eidas-schema-attribute-legalperson.xsd b/src/saml2/data/schemas/eidas-schema-attribute-legalperson.xsd new file mode 100644 index 00000000..d4d75220 --- /dev/null +++ b/src/saml2/data/schemas/eidas-schema-attribute-legalperson.xsd @@ -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> diff --git a/src/saml2/data/schemas/eidas-schema-attribute-naturalperson.xsd b/src/saml2/data/schemas/eidas-schema-attribute-naturalperson.xsd new file mode 100644 index 00000000..c8a2181d --- /dev/null +++ b/src/saml2/data/schemas/eidas-schema-attribute-naturalperson.xsd @@ -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> diff --git a/src/saml2/data/schemas/eidas-schema-metadata-servicelist.xsd b/src/saml2/data/schemas/eidas-schema-metadata-servicelist.xsd new file mode 100644 index 00000000..376b01c4 --- /dev/null +++ b/src/saml2/data/schemas/eidas-schema-metadata-servicelist.xsd @@ -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> diff --git a/src/saml2/data/schemas/eidas-schema-saml-extensions.xsd b/src/saml2/data/schemas/eidas-schema-saml-extensions.xsd new file mode 100644 index 00000000..2d5e6b09 --- /dev/null +++ b/src/saml2/data/schemas/eidas-schema-saml-extensions.xsd @@ -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> |