<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://id.swedenconnect.se/svt/1.0/sig-prop/ns" xmlns:svt="http://id.swedenconnect.se/svt/1.0/sig-prop/ns"> <xs:element name="SignatureValidationToken" type="svt:SignatureValidationTokenType" /> <xs:complexType name="SignatureValidationTokenType"> <xs:simpleContent> <xs:extension base="xs:string"> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:schema>
<ds:Signature Id="MySignatureId"> ... <ds:Object> <ds:SignatureProperties> <ds:SignatureProperty Target="#MySignatureId"> <svt:SignatureValidationToken> eyJ0eXAiOiJKV1QiLCJhb...2aNZ </svt:SignatureValidationToken> </ds:SignatureProperty> </ds:SignatureProperties> </ds:Object> </ds:Signature>
svt = { jti: text iss: text iat: uint ? aud: text / [* text] ? exp: uint sig_val_claims: SigValClaims } SigValClaims = { ver: text profile: text hash_algo: text sig: [+ Signature] ? ext: Extension } Signature = { sig_ref: SigReference sig_data_ref: [+ SignedDataReference] signer_cert_ref: CertReference sig_val: [+ PolicyValidation] ? time_val: [* TimeValidation] ? ext: Extension } SigReference = { ? id: text / null sig_hash: binary-value sb_hash: binary-value } SignedDataReference = { ref: text hash: binary-value } CertReference = { type: "chain" / "chain_hash" ref: [+ text] } PolicyValidation = { pol: text res: "PASSED" / "FAILED" / "INDETERMINATE" ? msg: text / null ? ext: Extension } TimeValidation = { "time": uint type: text iss: text ? id: text / null ? hash: binary-value / null ? val: [* PolicyValidation] ? ext: Extension } Extension = { + text => text } / null binary-value = text ; base64 classic with padding
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Signature Validation Token JSON Schema", "description": "Schema defining the payload format for SVTs", "type": "object", "required": [ "jti", "iss", "iat", "sig_val_claims" ], "properties": { "jti": { "description": "JWT ID", "type": "string" }, "iss": { "description": "Issuer", "type": "string" }, "iat": { "description": "Issued At", "type": "integer" }, "aud": { "description": "Audience", "type": [ "string", "array" ], "items": {"type": "string"} }, "exp": { "description": "Expiration time (seconds since epoch)", "type": "integer" }, "sig_val_claims": { "description": "Signature validation claims", "type": "object", "required": [ "ver", "profile", "hash_algo", "sig" ], "properties": { "ver": { "description": "Version", "type": "string" }, "profile": { "description": "Implementation profile", "type": "string" }, "hash_algo": { "description": "Hash algorithm URI", "type": "string" }, "sig": { "description": "Validated signatures", "type": "array", "items": { "$ref": "#/$def/Signature" }, "minItems": 1 }, "ext": { "description": "Extension map", "$ref": "#/$def/Extension" } }, "additionalProperties": false } }, "additionalProperties": false, "$def": { "Signature":{ "type": "object", "required": [ "sig_ref", "sig_data_ref", "signer_cert_ref", "sig_val" ], "properties": { "sig_ref": { "description": "Signature Reference", "$ref": "#/$def/SigReference" }, "sig_data_ref": { "description": "Signed data array", "type": "array", "items": { "$ref" : "#/$def/SignedDataReference" }, "minItems": 1 }, "signer_cert_ref": { "description": "Signer certificate reference", "$ref": "#/$def/CertReference" }, "sig_val": { "description": "Signature validation results", "type": "array", "items": { "$ref": "#/$def/PolicyValidation" }, "minItems": 1 }, "time_val": { "description": "Time validations", "type": "array", "items": { "$ref": "#/$def/TimeValidation" } }, "ext": { "description": "Extension map", "$ref": "#/$def/Extension" } }, "additionalProperties": false }, "SigReference":{ "type": "object", "required": [ "sig_hash", "sb_hash" ], "properties": { "sig_hash": { "description": "Hash of the signature value", "type": "string", "format": "base64" }, "sb_hash": { "description": "Hash of the Signed Bytes", "type": "string", "format": "base64" }, "id": { "description": "Signature ID reference", "type": ["string","null"] } }, "additionalProperties": false }, "SignedDataReference": { "type": "object", "required": [ "ref", "hash" ], "properties": { "ref": { "description": "Reference to the signed data", "type": "string" }, "hash": { "description": "Signed data hash", "type": "string", "format": "base64" } }, "additionalProperties": false }, "CertReference":{ "type": "object", "required": [ "type", "ref" ], "properties": { "type": { "description": "Type of certificate reference", "type": "string", "enum": ["chain","chain_hash"] }, "ref": { "description": "Certificate reference data", "type": "array", "items": { "type": "string", "format": "base64" }, "minItems": 1 } }, "additionalProperties": false }, "PolicyValidation":{ "type": "object", "required": [ "pol", "res" ], "properties": { "pol": { "description": "Policy identifier", "type": "string" }, "res": { "description": "Signature validation result", "type": "string", "enum": ["PASSED","FAILED","INDETERMINATE"] }, "msg": { "description": "Message", "type": ["string","null"] }, "ext": { "description": "Extension map", "$ref": "#/$def/Extension" } }, "additionalProperties": false }, "TimeValidation":{ "type": "object", "required": [ "time", "type", "iss" ], "properties": { "time": { "description": "Verified time", "type": "integer" }, "type": { "description": "Type of time validation proof", "type": "string" }, "iss": { "description": "Issuer of the time proof", "type": "string" }, "id": { "description": "Time evidence identifier", "type": ["string","null"] }, "hash": { "description": "Hash of time evidence", "type": ["string","null"], "format": "base64" }, "val": { "description": "Validation result", "type": "array", "items": { "$ref": "#/$def/PolicyValidation" } }, "ext": { "description": "Extension map", "$ref": "#/$def/Extension" } }, "additionalProperties": false }, "Extension": { "description": "Extension map", "type": ["object","null"], "required": [], "additionalProperties": { "type": "string" } } } }
eyJraWQiOiJPZW5JKzQzNEpoYnZmRG50ZlZcLzhyT3hHN0ZrdnlqYUtWSmFWcUlG QlhvaFZoQWU1Zks4YW5vdjFTNjg4cjdLYmFsK2Z2cGFIMWo4aWJnNTJRQnkxUFE9 PSIsInR5cCI6IkpXVCIsImFsZyI6IlJTNTEyIn0.eyJhdWQiOiJodHRwOlwvXC9l eGFtcGxlLmNvbVwvYXVkaWVuY2UxIiwiaXNzIjoiaHR0cHM6XC9cL3N3ZWRlbmNv bm5lY3Quc2VcL3ZhbGlkYXRvciIsImlhdCI6MTYwMzQ1ODQyMSwianRpIjoiNGQx Mzk2ZjFmZjcyOGY0MGQ1MjQwM2I2MWM1NzQ0ODYiLCJzaWdfdmFsX2NsYWltcyI6 eyJzaWciOlt7ImV4dCI6bnVsbCwic2lnX3ZhbCI6W3sibXNnIjoiT0siLCJleHQi Om51bGwsInJlcyI6IlBBU1NFRCIsInBvbCI6Imh0dHA6XC9cL2lkLnN3ZWRlbmNv bm5lY3Quc2VcL3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ZCIsImhhc2giOiJLUmtnYlo2 UFwvbmhVNjNJTWswR2lVZlVcL0RUd3ZlWWl0ZVFrd0dlSnFDNUJ6VE5WOGJRYnBl ZFRUdVdKUHhxdkowUlk4NGh3bTdlWVwvZzBIckFPZWdLdz09In1dLCJ0aW1lX3Zh bCI6W119XSwiZXh0IjpudWxsLCJ2ZXIiOiIxLjAiLCJwcm9maWxlIjoiWE1MIiwi aGFzaF9hbGdvIjoiaHR0cDpcL1wvd3d3LnczLm9yZ1wvMjAwMVwvMDRcL3htbGVu YyNzaGE1MTIifX0.TdHCoIUSZj2zMINKg7E44-8VE_mJq6TG1OoPwnYSs_hyUbuX mrLJpuk8GR5YrndeOucPUYAwPxHt_f68JIQyFTi0agO9VJjn1R7Pj3Jt6WG9pYVN n5LH-D1maxD11ZxxbcYeHbsstd2Sy2uMa3BdpsstGdPymSmc6GxY5uJoL0-5vwo_ 3l-4Bb3LCTiuxYPcmztKIbDy2hEgJ3Hx1K4HF0SHgn3InpqBev3hm2SLw3hH5BCM rywBAhHYE6OGE0aOJ6ktA5UP0jIIHfaw9i1wIiJtHTaGuvtyWSLk5cshmun9Hkdk kRTA75bzuq0Iyd0qh070rA8Gje-s4Tw4xzttgKx1KSkvy8n5FqvzWdsZvclCG2mY Y9rMxh_7607NXcxajAP4yDOoKNs5nm937ULe0vCN8a7WTrFuiaGjry7HhzRM4C5A qxbDOBXPLyoMr4qn4LRJCHxOeLZ6o3ugvDOOWsyjk3eliyBwDu8qJH7UmyicLxDc Cr0hUK_kvREqjD2Z
{ "kid":"OenI+434JhbvfDntfV\/8rOxG7FkvyjaKVJaVqIFBXohVhAe5fK8anov 1S688r7Kbal+fvpaH1j8ibg52QBy1PQ==", "typ":"JWT", "alg":"RS512" }
{ "aud" : "http://example.com/audience1", "iss" : "https://swedenconnect.se/validator", "iat" : 1603458421, "jti" : "4d1396f1ff728f40d52403b61c574486", "sig_val_claims" : { "sig" : [ { "ext" : null, "sig_val" : [ { "msg" : "OK", "ext" : null, "res" : "PASSED", "pol" : "http://id.swedenconnect.se/svt/sigval-policy/ ts-pkix/01" } ], "sig_ref" : { "sig_hash" : "ycePVLIzdcpK97IYOhFIf1ny79HmICbSVzIeZNbizo7rGIw HNN0zXISyKGjCvnonOaQGfL/P3vDtB88yKSWeXg==", "id" : "id-73989c6fc063636ab5e753f10f757467", "sb_hash" : "BoPV4WCA9sAIahjK1HajfFxi+AzC4JGTuf39W3ZWjczDCURx dc9YeteHtcxGVeggpxHJ75/cQ7HN1dDdliyIwg==" }, "signer_cert_ref" : { "ref" : [ "1+aaJetg7relERlUDYEiU4ZIZhT4RUviIQZuK7o1GFKaTPQ6y+ kx/PNtDrpuqQ6XfrkH9wYDK4ey0y4WrNErnw==", "h4PDxb5ZKmx1eTSqvVvYG8g33s05JzwB+NgEHFU4gc9tqG0kgH kf6W3oLzkTwwurIh6Y9AafZYqc2zP2pE2p4Q==", "Dd2C5sB0IOQeMVnEBkM5Q9W96mBHNwwa2tzXMs+LwuYcOUvPkr yGR0aPG8O9nIP3lbw6KjQ1hDmRk6zC8x2jdg==" ], "type" : "chain_hash" }, "sig_data_ref" : [ { "ref" : "", "hash" : "FcGpOOf8ilcPt21GDd2cGnLGDxRS5j7svM4app2H41dDELm2Czc eTY02ndeJfWjintmQ376IlXTOAr31yzYzsg==" }, { "ref" : "#xades-11a155d92bf55774613bb7b661477cfd", "hash" : "KRkgbZ6P/nhU63IMk0GiUfU/DTwveYiteQkwGeJqC5BzTNV8bQb pedTTuWJPxqvJ0RY84hwm7eY/g0HrAOegKw==" } ], "time_val" : [ ] } ], "ext" : null, "ver" : "1.0", "profile" : "XML", "hash_algo" : "http://www.w3.org/2001/04/xmlenc#sha512" } }