Commit 7cb0903f authored by Laurent Velez's avatar Laurent Velez
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

19442jsonSchema.json

0 → 100644
+2 −0
Original line number Diff line number Diff line
{
     "$schema": "http://json-schema.org/draft-04/schema#",
     "definitions": {

    "InputDocumentsType": {
	"type": "object",
	"properties": {
		"doc": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentType"
			}
		},
		"transformed": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-TransformedDataType"
			}
		},
		"docHash": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/DocumentHashType"
			}
		}
	}
    },

    "DocumentHashType": {
	"type": "object",
	"allOf": [
		{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentHashType"}
	],
	"properties": {
		"pAdESSFieldName": {"type": "string"}
	}
    },

	"OptionalInputsVerifyType": {
		"type": "object",
		"allOf": [
			{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-OptionalOutputsVerifyType"}
		],
		"properties": {
			"processSigs": {
				"$ref": "#/definitions/SigsRefsType"
			},
			"useSigValPol":{
				"$ref":"#/definitions/SigValPolicyType "
			},
			"returnValReport": {
				"$ref": "#/definitions/ReturnValReportType"
			},
			"proofsOfExist": {
				"$ref": "#/definitions/ProofsOfExistenceType"
			},
			"etsiReturnAugmentedSig": {
				"level": "string",
				"format" : "uri"
			},
			"tstkQualityLevel": {
				"type": "string",
				"format": "uri"
			}
		}
	},

	"NsPrefixMayppingType": {
		"type": "object",
		"properties": {
			"NsURI": {
				"type": "string",
				"format": "uri"
			},
			"NsPrefix": {"type": "string"}
		},
		"required": ["NsURI"]
	},
"XAdESSignaturePtrType": {
	"type": "object",
	"properties": {
		"nsPrefixMapping": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/NsPrefixMayppingType"
			}
		},
		"whichDoc": {"type": "string"},
		"xpath": {"type": "string"},
		"schemaRefs": {"type": "string"}
	}},
"SigsRefsType": {
	"type": "object",
	"properties": {
		"digRefs": {
			"type": "object",
			"properties": {
				"digVals": {
					"type": "array",
					"items": {
					"type": "string"
					}
				}, 
				"digAlg": {
					"type": "string"
				},
				"canAlg": {
					"type": "string"
				}
			}
			"required": ["digVals", "digAlg"]
		},
		"padesFieldNames": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"xadesSigPtrs": {
			"type": "array",
			"items": {
				"$ref": "#definitions/XAdESSignaturePtrType"
			}
		}
	}},

		"SigValPolicyType": {
			"type": "object",
			"properties": {
				"sigValPolID": {
					"type": "string"
				},
				"sigValPolLocs": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			}
		}, 

	"ReturnValReportType": {
		"type": "object",
		"properties": {
			"asSpecifiedBy":{
				"type": "string",
				"format": "uri"
			},
			"signIt":{"type": "boolean"}
	},

	"ProofsOfExistenceType": {
		"type": "array",
		"items": {
			"type": "object",
			"properties": {
				"time": {
					"type": "string"
				},
				"sigRef": {
					"type": "object",
					"$ref": "#/definitions/SignatureReferenceType"
				}
			}
		}
	},

	"SignatureReferenceType": {
		"type": "object",
		"properties": {
			"digRef": {
				"type": "object",
				"properties": {
					"digVal": {
						"type": "string",
						"contentEncoding": "base64"
					}, 
					"digAlg": {
						"type": "string",
						"format": "uri"
					},
					"canAlg": {
						"type": "string",
						"format": "uri"
					}
				}
				"required": ["digVal", "digAlg"]
			},
			"padesFieldName": {
				"type": "string"
			},
			"xadesSigPtr": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignaturePtrType"
			}
		}
	},
"OptionalOutputsVerifyType": {
	"type":"object",
	"allOf": [
		{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-OptionalOutputsVerifyType"}
	],
	{"properties": 
		"validationReport": {
			"$ref": "#/definitions/ValReportContainerType"
		},
		"resForEachSignature": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/ResultsForOneSignatureType"
			}
		},
		"appliedSigValPolicy": {
			"type": "string",
			"format": "uri"
		},
		"availableSigValPols":{
			"type": "array",
			"items": {
				"type": "string",
				"format": "uri"
			}
		}
	}},
"ResultsForOneSignatureType":{
	"type": "object",
	"properties": {
 		"result": {
			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"sigRef" : {
 			"$ref": "#/definitions/SignatureReferenceType"
		},
		"signerIdentity" : {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/saml2rw-NameIDType"
		},
		"signingTimeInfo": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SigningTimeInfoType"
		},
		"validationReport": {
			"$ref": "#/definitions/ValReportContainerType"
		},
		"manifestValResults":{
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-VerifyManifestResultsType"
		},
		"transformed":{
			"type": "array",
			"items": {"$ref:" "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-TransformedDocumentType"}
		},
	"augmentSigResult": {
			"$ref": "#definitions/AugmentSigResultType"
		},
	},
	"required": ["result"]},
"ValReportContainerType":{
	"type": "object",
	"properties": {
		"etsiTS11910202XMLReport":{
			"type": "string",
			"contentEncoding": "base64"
		},
		"other":{
			"type": "object",
			"properties": {
				"content": {
					"type": "string",
					"contentEncoding": "base64"
				},
				"specId": {"type": "string"},
				"encoding": {"type": "string"}
			}
		},
		"isSigned": {"type": "boolean"}
	}},
"AugmentSigResultType": {
	"type": "object",
	"properties": {
		"result": {
 			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"augmentedSig": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-AugmentedSignatureType"
		},
		"sigRefInReq": {
			"$ref": "#/definitions/SignatureReferenceType"
		}
	},
	"required": ["result", "sigRef"]}


     },
"VerifyRequestType": {
	"type": "object",
	"properties": {
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"reqID": {
			"type": "string"
		},
		"inDocs": {
			"$ref": "#/definitions/InputDocumentsType"
		},
		"optInp": {
			"$ref": "#/definitions/OptionalInputsVerifyType"
		},
		"sigObj": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignatureObjectType"
		}
	}},
"VerifyResponseType": {
	"type": "object",
	"properties": {
		"result": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dsb-ResultType"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"reqID": {
			"type": "string"
		},
		"respID": {
			"type": "string"
		},
		"optOutp": {
			"$ref": "#/definitions/OptionalOutputsVerifyType"
		}
	}},
"AugmentRequest": {
	"type": "object",
	"properties": {
		"inDocs": {"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-InputDocumentsType"},
		"reqID": {
			"type": "string"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string",
				"format": "uri"
			}
		},
		"claimedIdentity": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-ClaimedIdentityType"
		},
		"returnAugmentedSig": {
			"type": "string"
			"format": "uri"
		},
		"processSigs": {
			"$ref": "#/definitions/SigsRefsType"
		},
		"sigObj": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignatureObjectType"
		},
		"addKeyInfo": {
			"type": "array",
			"items": {"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-AdditionalKeyInfoType"}
		},
		"tstksQualityLevel": {
			"type": "string"
			"format": "uri"
		}
	},
	"required": ["profile","returnAugmentedSig"]},
"AugmentResponseType": {
	"type": "object",
	"properties": {
		"result": {
			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"reqID": {
			"type": "string"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"augmentSigsResults": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/AugmentSigResultType"
			}
		}
		"docsWithSignatures": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentWithSignatureType"
			}
		}
	},
	"required": ["result", "profile"]}

}
 No newline at end of file

19442xmlSchema.xsd

0 → 100644
+210 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:etsival="http://uri.etsi.org/19442/v1.1.1#" xmlns:etsivr="http://uri.etsi.org/19102/v1.2.1#" targetNamespace="http://uri.etsi.org/19442/v1.1.1#" xmlns:dss2="http://docs.oasis-open.org/dss-x/ns/core" xmlns:dsb="http://docs.oasis-open.org/dss-x/ns/base" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="http://docs.oasis-open.org/dss-x/ns/core" schemaLocation="http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/oasis-dss-core-schema-v2.0.xsd"/>
	<xs:import namespace="http://docs.oasis-open.org/dss-x/ns/base" schemaLocation="http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/oasis-dss-base-schema.xsd"/>
	<xs:import namespace="http://uri.etsi.org/19102/v1.2.1#" schemaLocation="https://forge.etsi.org/rep/esi/x19_10202_validation_report/raw/v1.2.1/1910202xmlSchema.xsd"/>
	<!--
	===============================================================================
	=======================REDEFINITIONS OF DSS-X TYPES==============================
	===============================================================================
	-->
	<xs:redefine schemaLocation="foo_dss_core.xsd">
		<xs:complexType name="dss2:OptionalInputsVerifyType">
			<xs:complexContent>
				<xs:extension base="dss2:OptionalInputsVerifyType">
					<xs:sequence>
						<xs:element ref="etsival:ProcessSignatures" minOccurs="0"/>
						<xs:element ref="etsival:UseSignatureValidationPolicy" minOccurs="0"/>
						<xs:element ref="etsival:ReturnValidationReport" minOccurs="0"/>
						<xs:element ref="etsival:ReturnAugmentedSignature" minOccurs="0"/>
						<xs:element ref="etsival:ProofsOfExistence" minOccurs="0"/>
						<xs:element name="TSTokensQualityLevel" type="xs:anyURI" minOccurs="0"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
		<xs:complexType name="dss2:OptionalOutputsVerifyType">
			<xs:complexContent>
				<xs:extension base="dss2:OptionalOutputsVerifyType">
					<xs:sequence>
						<xs:element ref="etsival:ValidationReport" minOccurs="0"/>
						<xs:element ref="etsival:ResultsForOneSignature" minOccurs="0" maxOccurs="unbounded"/>
						<xs:element ref="etsival:AppliedSignatureValidationPolicy" minOccurs="0"/>
						<xs:element ref="etsival:AvailableSignatureValidationPolicies" minOccurs="0"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
		<xs:complexType name="dss2:DocumentHashType">
			<xs:complexContent>
				<xs:extension base="dss2:DocumentHashType">
					<xs:sequence>
						<xs:element name="PAdESFieldName" type="xs:string" minOccurs="0"/>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:redefine>
	<!--
	===============================================================================
	||                                                            VALIDATION PROTOCOL                                                                        ||
	===============================================================================
	-->
	<!--
	===============================================================================
	======================REQUEST MESSAGE COMPONENTS==========================
	===============================================================================
	-->
	<!--
	========================= SignaturesReferencesType=============================
	-->
	<xs:element name="ProcessSignatures" type="etsival:SignaturesReferencesType"/>
	<xs:complexType name="SignaturesReferencesType">
		<xs:sequence>
			<xs:element ref="etsival:DigestReferences" minOccurs="0"/>
			<xs:element ref="etsivr:XAdESSignaturePtr" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="PAdESFieldName" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="DigestReferences" type="etsival:DigestReferencesType"/>
	<xs:complexType name="DigestReferencesType">
		<xs:sequence>
			<xs:element name="CanonicalizationMethod" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="DigestMethod" type="xs:anyURI"/>
			<xs:element name="DigestValue" type="xs:base64Binary" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	========================= UseSignatureValidationPolicyType=============================
	-->
	<xs:element name="UseSignatureValidationPolicy" type="etsival:UseSignatureValidationPolicyType"/>
	<xs:complexType name="UseSignatureValidationPolicyType">
		<xs:sequence>
			<xs:element name="SignatureValidationPolicyID" type="xs:anyURI"/>
			<xs:element name="SignaturePolicyLocation" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	========================= ReturnValidationReport=============================
	-->
	<xs:element name="ReturnValidationReport" type="etsival:ReturnValidationReportType"/>
	<xs:complexType name="ReturnValidationReportType">
		<xs:sequence>
			<xs:element name="AsSpecifiedBy" type="xs:anyURI"/>
		</xs:sequence>
		<xs:attribute name="SignIt" type="xs:boolean" default="false"/>
	</xs:complexType>
	<!--
	========================= ProofsOfExistence=============================
	-->
	<xs:element name="ProofsOfExistence" type="etsival:ProofsOfExistenceType"/>
	<xs:complexType name="ProofsOfExistenceType">
		<xs:sequence>
			<xs:element ref="etsival:ProofOfExistence" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ProofOfExistence" type="etsival:ProofOfExistenceType"/>
	<xs:complexType name="ProofOfExistenceType">
		<xs:sequence>
			<xs:element name="Time" type="xs:dateTime"/>
			<xs:element name="SignatureReference" type="etsivr:SignatureReferenceType"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	===============================================================================
	======================RESPONSE MESSAGE COMPONENTS===========================
	===============================================================================
	-->
	<!--
	===========================ResultsForOneSignature=============================
	-->
	<xs:element name="ResultsForOneSignature" type="etsival:ResultsForOneSignatureType"/>
	<xs:complexType name="ResultsForOneSignatureType">
		<xs:sequence>
			<xs:element ref="dsb:Result"/>
			<xs:element name="SignatureReference" type="etsivr:SignatureReferenceType" minOccurs="0"/>
			<xs:element ref="dss2:SignerIdentity" minOccurs="0"/>
			<xs:element ref="dss2:SigningTimeInfo" minOccurs="0"/>
			<xs:element ref="etsival:ValidationReport" minOccurs="0"/>
			<xs:element ref="dss2:VerifyManifestResults" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="dss2:TransformedDocument" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="etsival:AugmentSignatureResult" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	===========================AppliedSignatureValidationPolicy=============================
	-->
	<xs:element name="AppliedSignatureValidationPolicy" type="xs:anyURI"/>
	<!--
	===========================AvailableSignatureValidationPoliciesType=============================
	-->
	<xs:element name="AvailableSignatureValidationPolicies" type="etsival:AvailableSignatureValidationPoliciesType"/>
	<xs:complexType name="AvailableSignatureValidationPoliciesType">
		<xs:sequence>
			<xs:element name="AvailableSignatureValidationPolicyID" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	====================================ValidationReport======================================
	-->
	<xs:element name="ValidationReport" type="etsival:ValidationReportContainerType"/>
	<xs:complexType name="ValidationReportContainerType">
		<xs:choice>
			<xs:element name="ETSITS11910202XMLReport" type="etsivr:ValidationReportType" minOccurs="0"/>
			<xs:element name="other" type="xs:base64Binary" minOccurs="0"/>
		</xs:choice>
		<xs:attribute name="isSigned" type="xs:boolean" use="required"/>
		<xs:attribute name="Encoding" type="xs:string" use="optional"/>
		<xs:attribute name="SpecificationId" type="xs:anyURI" use="optional"/>
	</xs:complexType>
	<!--
	===============================================================================
	||                                                            AUGMENTATION PROTOCOL                                                                 ||
	===============================================================================
	-->
	<!--
	===========================AugmentRequest=============================
	-->
	<xs:element name="AugmentRequest" type="etsival:AugmentRequestType"/>
	<xs:complexType name="AugmentRequestType">
		<xs:complexContent>
			<xs:extension base="dss2:RequestBaseType">
				<xs:sequence>
					<xs:element ref="dss2:InputDocuments" minOccurs="0"/>
					<xs:element name="AdditionalInputs" type="dss2:OptionalInputsVerifyType"/>
					<xs:element ref="dss2:SignatureObject" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--
	===========================AugmentRequest=============================
	-->
	<xs:element name="ReturnAugmentedSignature" type="etsival:ReturnAugmentedSignatureType"/>
	<xs:complexType name="ReturnAugmentedSignatureType">
		<xs:attribute name="Level" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!--
	===========================AugmentResponse=============================
	-->
	<xs:element name="AugmentResponse" type="etsival:AugmentResponseType"/>
	<xs:complexType name="AugmentResponseType">
		<xs:complexContent>
			<xs:extension base="dsb:ResponseBaseType">
				<xs:sequence>
					<xs:element ref="etsival:AugmentSignatureResult" maxOccurs="unbounded"/>
					<xs:element ref="dss2:DocumentWithSignature" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="AugmentSignatureResult" type="etsival:AugmentSignatureResultType"/>
	<xs:complexType name="AugmentSignatureResultType">
		<xs:sequence>
			<xs:element ref="dsb:Result"/>
			<xs:element name="SignatureRefInRequest" type="etsivr:SignatureReferenceType" minOccurs="0"/>
			<xs:element ref="dss2:AugmentedSignature" minOccurs="0"/>
			<xs:element name="PAdESFieldName" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>