Signature — Signature électronique de ressource
Signature est un type de données (pas une ressource indépendante) qui encode la signature cryptographique d'une ressource. Utilisé dans Provenance, Bundle, Contract.
Objet de la ressource
Signature porte la signature électronique d'une ressource ou d'un Bundle. Formats supportés : JWS (JSON Web Signature, RFC 7515, profil FHIR), XMLDSig (XML Signature), XAdES (XML Advanced Electronic Signatures, eIDAS).
Le champ data contient la signature binaire base64. targetFormat précise quel format a été signé (JSON vs XML). sigFormat précise le format de signature.
Champs clés
| Champ | Type | Cardinalité | Rôle |
|---|---|---|---|
type | Coding[] | 1..* | Signature type (ISO 1.2.840.10065.1.12.1.* table). |
when | instant | 1..1 | Signature timestamp. |
who | Reference(Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization) | 1..1 | Signer. |
onBehalfOf | Reference(...) | 0..1 | On-behalf-of party. |
targetFormat | code (MIME) | 0..1 | Signed format. |
sigFormat | code (MIME) | 0..1 | Signature format (application/jose, application/signature+xml). |
data | base64Binary | 0..1 | Base64 signature payload. |
Exemple JSON
Signature JWS d'un Bundle clinique :
{
"type": [{
"system": "urn:iso-astm:E1762-95:2013",
"code": "1.2.840.10065.1.12.1.1",
"display": "Author's Signature"
}],
"when": "2026-05-16T14:30:00Z",
"who": { "reference": "Practitioner/dr-smith" },
"targetFormat": "application/fhir+json",
"sigFormat": "application/jose",
"data": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRyLXNtaXRoLWNlcnQifQ.eyJpYXQiOjE3NDc0...SIGNATURE-PAYLOAD"
} Pièges courants
- targetFormat absent : ambiguïté JSON vs XML — la signature peut être invalide selon le format reconstruit.
- who sans certificat publié : impossible de valider la signature côté vérificateur.
- Re-sérialisation cassante : en JSON FHIR, l'ordre des clés peut casser la signature. Toujours utiliser une canonicalisation (JCS, RFC 8785).
Ressources liées
- Provenance — Porte des Signature pour tracer l'authenticité.
- Bundle — Le Bundle.signature signe le bundle entier.
- Contract — Signature contractuelle.
- Verifiable Credentials — Pattern de signature compatible (W3C VC + FHIR).