Closed jonnyry closed 5 years ago
Extra requirements for validating requesting_device: an requesting_device.identifier element should be present containing both system and value elements requesting_device.version and requesting_device.model elements must also be populated.
In order to ensure consumers are built in line with recently clarified JWT requirements at:
https://gpconnect-0-5-2.netlify.com/integration_cross_organisation_audit_and_provenance.html#jwt-payload
Suggest the following JWT validation should occur, and return an
OperationOutcome
with information on the error in thediagnostics
element where a failure occurs:Check the following claim names are present in the JWT:
iss
(issuer)sub
(subject)aud
(audience)exp
(expiry)iat
(issued at)reason_for_request
requested_record
requested_scope
requesting_device
requesting_organization
requesting_practitioner
Check
iat
andexp
as per #222Check that
reason_for_request
==directcare
Check that
aud
==https://authorize.fhir.nhs.net/token
Check that
requested_scope
is in the list of valid values:patient/*.read
organization/*.read
Check
requesting_organization
is anOrganization
resource with:id
elementname
elementidentifier
element withsystem
element containinghttps://fhir.nhs.net/Id/ods-organization-code
value
elementCheck
requesting_practitioner
is aPractitioner
resource with:id
elementname
element, withfamily
elementgiven
elementidentifier
element, withsystem
element containinghttp://fhir.nhs.net/sds-user-id
value
elementThis has been transposed from the 1.2.3 ticket: https://github.com/nhsconnect/gpconnect-demonstrator/issues/209