← Specifications

OCI-5 Consent Receipt

Version 0.1.0 · 2026-11-28 · Draft Changes
StatusDraft.
Version0.1.0, 2026-11-28
Profile ofISO/IEC TS 27560:2023 (consent record information structure); Kantara Initiative Consent Receipt Specification 1.1.0; JWS (RFC 7515) with explicit typing (RFC 8725 §3.11)
Depends onOCI-0 Core, OCI-1 Trust Registry
Used byOCI-3 KYC (every release produces a receipt); OCI-CONSENT-1 Consented Data Access (every consent is a receipt); later OCI-4 and OCI-7
Reference implementationpackages/consent (@oci/consent)

1. Purpose

A consent receipt is a signed record of one data share. The issuer gives it to the resident and to the controller, the party the data is shared with. It says who shared what with whom, for what purpose, on what legal basis, until when, and how to withdraw.

In OCI-3 the issuer is the identity provider (IdP) and the controller is the relying party (RP). In OCI-CONSENT-1 the issuer is the authorization server where the person consented, which is a data holder or a consent manager, and the controller is the data user (CDA-8.2). Where this spec says IdP or RP it means only that OCI-3 case.

ISO/IEC TS 27560 defines what a consent record contains. It does not define a signed, portable form, and it does not define withdrawal. The TS says it defines no exchange protocol for records or receipts. OCI-5 adds the signature (a JWS), the checks a verifier must make, and a status and withdrawal model.

A receipt never contains claim values. It names the claims shared and nothing more.

2. Format

A receipt is a compact JWS (RFC 7515) over a JSON object.

  • CR-2.1 The JWS header MUST carry typ: oci-consent-receipt+jwt. This follows the naming that RFC 8725 §3.11 recommends (application/example+jwt written without the application/ prefix, RFC 7515 §4.1.9) and the pattern OCI-1 uses (entity-statement+jwt, trust-mark+jwt). Verifiers MUST check it (CORE-5.4).
  • CR-2.2 The algorithm MUST be one of CORE-5.1 (ES256, or PS256). Verifiers MUST reject none, HS* and all others (CORE-5.2).
  • CR-2.3 The header MUST carry a kid (CORE-5.3).
  • CR-2.4 The header MUST NOT carry jku, x5u, x5c, jwk or crit. The verifier takes keys from the issuer’s OCI-1 trust chain only. This blocks a receipt that brings its own key.

3. Claims

Registered JWT claims carry the identifiers and times (RFC 7519). The other members carry the ISO/IEC TS 27560 content.

ClaimTypeSource
isshttps entity ID of the issuerRFC 7519 §4.1.1; CORE-3.1
subpairwise subject (CR-3.3)RFC 7519 §4.1.2; ISO “PII principal”
sub_type"pairwise"OCI extension
jtireceipt ID, unique per receiptRFC 7519 §4.1.7; ISO receipt identifier
iattime the consent was givenNumericDate; ISO event_time
exptime the consent endsNumericDate; ISO validity_duration
schema_version"oci-cr-0.1"ISO schema version
jurisdictionISO 3166-1 alpha-2 codeISO jurisdiction; CORE-3.2
controllerhttps entity ID of the controller (the RP or data user)ISO pii_controllers
purposepurpose identifierISO purposes
purpose_descriptiontext, optionalISO purposes
claimsarray of claim namesISO pii_type
legal_basisenum (CR-3.7)ISO lawful_basis
withdrawal_endpointhttps URLISO withdrawal_method
status_endpointhttps URLOCI extension

The ISO clause numbers behind these names (6.3.4.3 purposes, 6.3.4.6 lawful basis, 6.3.4.8 controllers, 6.3.4.16 jurisdiction, 6.3.4.18 withdrawal method, 6.3.5.1 PII type, 6.3.7.1 event time, 6.3.7.2 validity duration, 6.2.2.6 unique reference) come from a published analysis, Pandit, Lindquist and Krog, “Implementing ISO/IEC TS 27560:2023 Consent Records and Receipts for GDPR and DGA” (arXiv:2405.04528, Table 2). The ISO text is paywalled and was not read. They MUST be checked against it before OCI-5 is called stable.

ISO/IEC TS 27560 requires only a receipt identifier and a schema version in a receipt, and says the mandatory record fields SHOULD also be mandatory in the receipt. OCI-5 requires every claim in the table except purpose_description.

  • CR-3.1 A receipt MUST carry every claim in the table above except purpose_description. A missing one MUST be rejected.
  • CR-3.2 schema_version MUST equal oci-cr-0.1. A verifier MUST reject any other value.
  • CR-3.3 sub MUST be a pairwise identifier (OIDC Core §8.1), never a national ID number or an internal account number. It MUST be at least 22 characters of A-Z a-z 0-9 - _ (128 bits as base64url), MUST NOT equal any raw identifier the verifier knows of, and sub_type MUST be pairwise. An IdP MUST use the same sub in its OIDC responses (KYC-6.7). Reference method: HMAC-SHA-256 over the sector identifier and the account ID with a secret that never leaves the issuer, giving 43 base64url characters.
  • CR-3.4 claims MUST be a non-empty array of at most 64 unique claim names matching ^[a-z][a-z0-9_]{0,63}$. Names only: this pattern rejects values such as dates and names with spaces.
  • CR-3.5 iat and exp MUST be integer NumericDates (CORE-6.1) and exp MUST be later than iat.
  • CR-3.6 withdrawal_endpoint and status_endpoint MUST be https URLs without credentials or a fragment.
  • CR-3.7 legal_basis MUST be one of consent, contract, legal_obligation, vital_interests, public_task, legitimate_interests. The list is modelled on GDPR Article 6(1) points a to f. A country that is not under GDPR maps its own law onto it through jurisdiction. OCI-3 only issues consent in 0.1.
  • CR-3.8 iss and controller MUST be https entity IDs as in CORE-3.1. jurisdiction MUST be two upper-case letters. purpose MUST be 1 to 300 characters, purpose_description at most 300, and neither MAY contain control characters. Receipts MAY carry further members. Verifiers MUST ignore members they do not know.
  • CR-3.9 A receipt issued under OCI-CONSENT-1 carries the member oci_cda, defined in CDA-8.3. It is one of the further members CR-3.8 allows: an OCI-5 verifier ignores it, and a CDA verifier checks it (CDA-8.4).

3.1 Worked example

Header:

{ "alg": "ES256", "kid": "k3Q8vYJc0dT1m0nJ7xwq1u4bYwP0b2m2V3m0H8Zx9Zs", "typ": "oci-consent-receipt+jwt" }

Payload:

{
  "iss": "https://id.home.example",
  "sub": "Zq3vN8mK1xT5bYwR2cHdE7aLpUo9FgJs4iVtXnMkQ0A",
  "sub_type": "pairwise",
  "jti": "5b0e6f0c-3b1c-4c0e-9a55-7d6b2f8f8a10",
  "iat": 1794996000,
  "exp": 1795082400,
  "schema_version": "oci-cr-0.1",
  "jurisdiction": "XT",
  "controller": "https://bank.home.example",
  "purpose": "https://bank.home.example/purposes/open_account",
  "purpose_description": "Open a savings account",
  "claims": ["given_name", "age_over_18"],
  "legal_basis": "consent",
  "withdrawal_endpoint": "https://id.home.example/consent/withdraw",
  "status_endpoint": "https://id.home.example/consent/status"
}

4. Verification

A verifier takes a receipt, the issuer it expects, the issuer’s keys from its OCI-1 trust chain, and the current time.

  • CR-4.1 The verifier MUST check the signature against those keys. A receipt signed by any other key MUST be rejected.
  • CR-4.2 The verifier MUST reject a token whose typ is not oci-consent-receipt+jwt.
  • CR-4.3 The verifier MUST check CR-3.1 to CR-3.8 on the signed payload.
  • CR-4.4 iss MUST equal the issuer the verifier expects. The keys come from that issuer’s trust chain, so a receipt from another issuer fails here.
  • CR-4.5 The verifier MUST reject a receipt whose exp is more than the clock skew in the past. Clock skew MUST NOT exceed 60 seconds (CORE-6.2). An audit tool MAY skip this check alone to read old receipts.
  • CR-4.6 The verifier MUST reject a receipt whose iat is later than now plus the clock skew (CORE-6.3).
  • CR-4.7 The verifier MUST reject a receipt whose current status is withdrawn when it has fetched the status (CR-6.5). A status for another jti MUST be treated as an error.
  • CR-4.8 The verifier MUST reject a receipt whose sub equals a raw identifier it knows (CR-3.3).

5. Issuing

  • CR-5.1 The issuer MUST create one receipt for each grant of consent, with a new random jti. (In OCI-3 a grant may be used for many UserInfo calls until exp.)
  • CR-5.2 The issuer MUST give the receipt to the resident and MUST send it to the controller. In OCI-3 the RP gets it in the token response as consent_receipt (KYC-8.3).
  • CR-5.3 The issuer MUST validate a receipt against CR-3 before signing it, and MUST NOT release data if issuing fails (KYC-8.2).
  • CR-5.4 The issuer MUST keep a copy and a status record for each receipt until at least exp, and for as long after as the country’s records law needs. The stored copy holds claim names, not values.

6. Withdrawal and status

A signed receipt cannot change, so withdrawal (and, where it is allowed, a pause) is a separate status record held by the issuer.

  • CR-6.1 withdrawal_endpoint accepts an HTTPS POST whose JSON body is { "receipt_id": "<jti>" }. The issuer MUST authenticate the resident (OCI-2) before it acts.
  • CR-6.2 The issuer MUST refuse the withdrawal unless the authenticated resident’s pairwise sub for that controller equals the receipt’s sub. The error code is not_subject.
  • CR-6.3 Withdrawing twice is allowed and MUST keep the first withdrawal time.
  • CR-6.4 Withdrawing a receipt that has already expired MUST be refused with already_expired. The consent has ended on its own.
  • CR-6.5 status_endpoint accepts an HTTPS GET with the query parameter receipt_id, and returns { "receipt_id": "<jti>", "status": "active" | "paused" | "withdrawn" | "expired", "withdrawn_at": <NumericDate, only when withdrawn>, "paused_at": <NumericDate, only when paused> }. Status is withdrawn if a withdrawal is recorded, else expired if now is at or after exp, else paused if a pause is in force (CR-6.7), else active. The endpoint MUST require authentication as the controller named in the receipt, as the resident, or, for a receipt that carries oci_cda (CR-3.9), as the data holder named in oci_cda.holder, authenticated as that OCI-1 entity. A resident who is not the subject, and any other party, MUST get no answer beyond a generic error (CORE-9.1).
  • CR-6.6 When a receipt is withdrawn the issuer MUST refuse further releases of data that rely on it (for an IdP, UserInfo requests, KYC-8.4) and SHOULD notify the controller. The controller MUST stop processing for that purpose and SHOULD delete data held for it, unless another legal basis applies. The issuer SHOULD notify by the OCI-7 consent-withdrawn event, whose receipt_id is this receipt’s jti (CR-6.1).
  • CR-6.7 A receipt MAY be paused only when the spec it is issued under defines who may pause and resume it and how. OCI-CONSENT-1 does (CDA-12.2). OCI-3 does not, so an OCI-3 receipt is never paused.
  • CR-6.8 Status moves only along these transitions: active to paused (pause), paused to active (resume), active or paused to withdrawn (CR-6.1), and active or paused to expired when exp passes. withdrawn and expired are final. Pausing a paused receipt changes nothing and keeps the first pause time, and resuming an active one changes nothing (as CR-6.3). A pause or resume of a withdrawn receipt MUST be refused with already_withdrawn, and of an expired one with already_expired.
  • CR-6.9 Paused is not withdrawn. While a receipt is paused, the issuer and every party that serves data under it MUST refuse to release data that relies on it, as for a withdrawn receipt (CR-6.6). But the consent still stands: CR-4.7 does not reject a paused receipt, a pause does not require the controller to delete data, and a pause MUST NOT be told by the consent-withdrawn event. An issuer SHOULD tell the controller of a pause and a resume by the OCI-7 consent-paused and consent-resumed events (SIG-6.11).

7. Security and privacy considerations

  • No values. A receipt is kept by the resident and the controller, and may be shown to others. It lists claim names only (CR-3.4), so a leaked receipt reveals that a share happened, not the data.
  • Status check. The status record (CR-4.7) is a required verifier option; a verifier that deliberately skips the withdrawal check must pass status: 'unchecked' explicitly.
  • Pairwise subject. The receipt sub is different for each controller. A receipt shared with a third party does not link the resident across controllers (CR-3.3). The reverse holds too: the receipt cannot be used to look up a national ID.
  • Key confusion. The typ check (CR-4.2) stops other OCI tokens from passing as receipts, and the issuer match (CR-4.4) stops a receipt from one issuer passing as another’s. Header-supplied keys are refused (CR-2.4).
  • Status endpoint leaks. A status call tells the caller whether a consent was paused or withdrawn. CR-6.5 limits who can ask.
  • Receipts are personal data. They record that a resident dealt with a controller. Stores follow CORE-7.3 and the country’s retention rules (CR-5.4).
  • Clock. Verifiers allow at most 60 seconds of skew (CORE-6.2).

8. Conformance

The reference tests in packages/consent/test cite these clauses: CR-2.1 to 2.4, 3.1 to 3.8, 4.1 to 4.8, 5.1, 6.2 to 6.5, 6.8 and 6.9 (the record logic only, not HTTP). CR-5.2 to 5.4 and the HTTP behaviour of CR-6.1, 6.5 and 6.6 are endpoint behaviour, checked by a conformance harness against a running issuer (planned).

An implementation conforms to OCI-5 0.1 when every receipt it issues passes CR-4, it enforces CR-6, and the passing tests above hold for its verifier.

9. Open questions

  • ISO clause numbers and mandatory fields. The ISO text was not read (CR-3 intro). Check the clause numbers and which record fields are mandatory against the standard.
  • Kantara field mapping. The Kantara Consent Receipt Specification 1.1.0 is available from Kantara as a download, but its field list could not be read in this round. A mapping table (for example to jurisdiction, consentTimestamp, collectionMethod) is not written because the names are unverified.
  • Status format. Should status use the IETF Token Status List (an status claim with a list index) as OCI-4 does, in place of a status endpoint? That scales better and hides who asks, but is still an IETF draft.
  • Signed status and withdrawal proof. Status is plain JSON over TLS. A signed withdrawal confirmation (a second typ) would give the resident proof that they withdrew.
  • Purpose text. The receipt holds an identifier and an optional description. A portable, multilingual description (ISO language) is not defined.
  • Several controllers. One receipt names one controller. Joint controllers and processors (ISO parties) are out of scope for 0.1.
  • Retention and storage. ISO fields such as retention period and storage location are not in the receipt. Add them when OCI-6 manifests declare them.
  • Withdrawal consequences. What a controller must do about data it already holds is a legal question that OCI-5 only states as SHOULD (CR-6.6).

Changes

VersionDateWhat changed
0.1.02026-11-28First versioned release: the text of Draft 0.1 (2026-11-18). For OCI-CONSENT-1: “issuer” and “controller” in place of IdP and RP where a data holder or consent manager issues the receipt; the oci_cda member (CR-3.9); the paused status and its transitions (CR-6.5, CR-6.7 to CR-6.9); and status readable by the holder in oci_cda.holder (CR-6.5).