From 225293fccc4bb04bb8ebfc379b6819d33412f661 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 8 Sep 2023 07:34:43 +1000 Subject: [PATCH] Add SHC signature test case --- validator/manifest.json | 148 ++++++++++++++++++++++++++++++++++++---- validator/shc-dd.txt | 1 + 2 files changed, 137 insertions(+), 12 deletions(-) create mode 100644 validator/shc-dd.txt diff --git a/validator/manifest.json b/validator/manifest.json index be3f1c3e..6b2301ef 100644 --- a/validator/manifest.json +++ b/validator/manifest.json @@ -23186,6 +23186,63 @@ } } }, + { + "name": "shc-dd", + "file": "shc-dd.txt", + "version": "4.0", + "java": { + "outcome": { + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "not-found", + "details": { + "text": "Implied profile http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm not known to validator" + }, + "expression": [ + "Payload" + ] + }, + { + "severity": "warning", + "code": "business-rule", + "details": { + "text": "The signature is valid, but the issuer https://test.fhir.org/icao is not a trusted issuer" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + } + ] + } + }, + "profile": { + "packages": [ + "hl7.fhir.uv.shc-vaccination#0.6.2" + ], + "source": "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm", + "java": { + "outcome": { + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "warning", + "code": "business-rule", + "details": { + "text": "The signature is valid, but the issuer https://test.fhir.org/icao is not a trusted issuer" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + } + ] + } + } + } + }, { "name": "shc.jwt", "file": "shc.jwt", @@ -23198,14 +23255,36 @@ "resourceType": "OperationOutcome", "issue": [ { - "severity": "information", - "code": "informational", + "severity": "error", + "code": "not-found", "details": { - "text": "The FHIR Validator does not check the JWT signature (see https://demo-portals.smarthealth.cards/VerifierPortal.html or https://github.com/smart-on-fhir/health-cards-dev-tools) (Issuer = 'http://local.fhir.org:960/r4/')" + "text": "JWT iss 'http://local.fhir.org:960/r4/' must start with https://" }, "diagnostics": "[1,1]", "expression": [ - "JWT" + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", + "details": { + "text": "JWT iss 'http://local.fhir.org:960/r4/' must not have trailing /" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", + "details": { + "text": "Unable to verify the signature, because unable to retrieve JWKS from http://local.fhir.org:960/r4/.well-known/jwks.json: Connection refused" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" ] }, { @@ -23356,14 +23435,36 @@ "resourceType": "OperationOutcome", "issue": [ { - "severity": "information", - "code": "informational", + "severity": "error", + "code": "not-found", + "details": { + "text": "JWT iss 'http://local.fhir.org:960/r4/' must start with https://" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", "details": { - "text": "The FHIR Validator does not check the JWT signature (see https://demo-portals.smarthealth.cards/VerifierPortal.html or https://github.com/smart-on-fhir/health-cards-dev-tools) (Issuer = 'http://local.fhir.org:960/r4/')" + "text": "JWT iss 'http://local.fhir.org:960/r4/' must not have trailing /" }, "diagnostics": "[1,1]", "expression": [ - "JWT" + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", + "details": { + "text": "Unable to verify the signature, because unable to retrieve JWKS from http://local.fhir.org:960/r4/.well-known/jwks.json: Connection refused" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" ] }, { @@ -23514,14 +23615,36 @@ "resourceType": "OperationOutcome", "issue": [ { - "severity": "information", - "code": "informational", + "severity": "error", + "code": "not-found", + "details": { + "text": "JWT iss 'http://local.fhir.org:960/r4/' must start with https://" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", + "details": { + "text": "JWT iss 'http://local.fhir.org:960/r4/' must not have trailing /" + }, + "diagnostics": "[1,1]", + "expression": [ + "jwt" + ] + }, + { + "severity": "error", + "code": "not-found", "details": { - "text": "The FHIR Validator does not check the JWT signature (see https://demo-portals.smarthealth.cards/VerifierPortal.html or https://github.com/smart-on-fhir/health-cards-dev-tools) (Issuer = 'http://local.fhir.org:960/r4/')" + "text": "Unable to verify the signature, because unable to retrieve JWKS from http://local.fhir.org:960/r4/.well-known/jwks.json: Connection refused" }, "diagnostics": "[1,1]", "expression": [ - "verifiableCredential[0].JWT" + "jwt" ] }, { @@ -32568,6 +32691,7 @@ "file": "shlink.txt", "description": "SHLink validation", "version": "4.0", + "use-test": false, "java": { "outcome": { "resourceType": "OperationOutcome", diff --git a/validator/shc-dd.txt b/validator/shc-dd.txt new file mode 100644 index 00000000..cee4014c --- /dev/null +++ b/validator/shc-dd.txt @@ -0,0 +1 @@ +shc:/567629595326546034602925407728043360287028656767542228092862372537602870286471674522280928632074452537575542030334264141564025615543557254434145396563665203440556404563400625243224040644432924374158714063626057360108453531537170742424415037455972294472384310210555667460374472606833327226655921400534533137112238536341205004103824627220603734707260603620257234273308564363267258337231373774553009763745660971260903350628770372523654624404753021055676607605435800760944393266655975302207201255402232437165103342407234343828401061595804674306395308307411395243554076575629627165714174304273255704352771442971233275586054677530615304106170762576302508255037053020674423286066117653597268684168432066232566554203440666390740372721032869102107403003032907750020385810502433302511095004692853074403446534355843756673326455290907076734351043032238766975532444632508037769267305747754355028386809112952307666227153560341620958033604704250507227575558047139047571636035246528332225615233730736702370084423732771303374396968526172746229412059762731603931262541106754732159727239683231772733715259102009253257666727704211000710222025313176083855576562533367762735223536537170446866273524260935216342571238256431123832045245692158360643290775392644297657777612623010611043546656635276042268033476046243062937094332525535574165295322556835073904416371676637380426387634530928693076663555436452535076557075746529271025550852126556000650685652650464430356533311657265076505413008650027524010763132632862621157325705054222755639064339632068530932350472625768411273562074012320584359765050072976045352087029063521046437067556615871723567344268215610007508366867365977327320297209290635306671042804240843646629773622646158355665662912365210547036 \ No newline at end of file