| Status | Draft. |
| Version | 0.1.0, 2026-11-28 |
| Profile of | ISO/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 on | OCI-0 Core, OCI-1 Trust Registry |
| Used by | OCI-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 implementation | packages/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+jwtwritten without theapplication/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, orPS256). Verifiers MUST rejectnone,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,jwkorcrit. 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.
| Claim | Type | Source |
|---|---|---|
iss | https entity ID of the issuer | RFC 7519 §4.1.1; CORE-3.1 |
sub | pairwise subject (CR-3.3) | RFC 7519 §4.1.2; ISO “PII principal” |
sub_type | "pairwise" | OCI extension |
jti | receipt ID, unique per receipt | RFC 7519 §4.1.7; ISO receipt identifier |
iat | time the consent was given | NumericDate; ISO event_time |
exp | time the consent ends | NumericDate; ISO validity_duration |
schema_version | "oci-cr-0.1" | ISO schema version |
jurisdiction | ISO 3166-1 alpha-2 code | ISO jurisdiction; CORE-3.2 |
controller | https entity ID of the controller (the RP or data user) | ISO pii_controllers |
purpose | purpose identifier | ISO purposes |
purpose_description | text, optional | ISO purposes |
claims | array of claim names | ISO pii_type |
legal_basis | enum (CR-3.7) | ISO lawful_basis |
withdrawal_endpoint | https URL | ISO withdrawal_method |
status_endpoint | https URL | OCI 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_versionMUST equaloci-cr-0.1. A verifier MUST reject any other value. - CR-3.3
subMUST 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 ofA-Z a-z 0-9 - _(128 bits as base64url), MUST NOT equal any raw identifier the verifier knows of, andsub_typeMUST bepairwise. An IdP MUST use the samesubin 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
claimsMUST 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
iatandexpMUST be integer NumericDates (CORE-6.1) andexpMUST be later thaniat. - CR-3.6
withdrawal_endpointandstatus_endpointMUST behttpsURLs without credentials or a fragment. - CR-3.7
legal_basisMUST be one ofconsent,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 throughjurisdiction. OCI-3 only issuesconsentin 0.1. - CR-3.8
issandcontrollerMUST be https entity IDs as in CORE-3.1.jurisdictionMUST be two upper-case letters.purposeMUST be 1 to 300 characters,purpose_descriptionat 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
typis notoci-consent-receipt+jwt. - CR-4.3 The verifier MUST check CR-3.1 to CR-3.8 on the signed payload.
- CR-4.4
issMUST 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
expis 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
iatis later than now plus the clock skew (CORE-6.3). - CR-4.7 The verifier MUST reject a receipt whose current status is
withdrawnwhen it has fetched the status (CR-6.5). A status for anotherjtiMUST be treated as an error. - CR-4.8 The verifier MUST reject a receipt whose
subequals 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 untilexp.) - 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_endpointaccepts an HTTPSPOSTwhose 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
subfor that controller equals the receipt’ssub. The error code isnot_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_endpointaccepts an HTTPSGETwith the query parameterreceipt_id, and returns{ "receipt_id": "<jti>", "status": "active" | "paused" | "withdrawn" | "expired", "withdrawn_at": <NumericDate, only when withdrawn>, "paused_at": <NumericDate, only when paused> }. Status iswithdrawnif a withdrawal is recorded, elseexpiredif now is at or afterexp, elsepausedif a pause is in force (CR-6.7), elseactive. The endpoint MUST require authentication as the controller named in the receipt, as the resident, or, for a receipt that carriesoci_cda(CR-3.9), as the data holder named inoci_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-withdrawnevent, whosereceipt_idis this receipt’sjti(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:
activetopaused(pause),pausedtoactive(resume),activeorpausedtowithdrawn(CR-6.1), andactiveorpausedtoexpiredwhenexppasses.withdrawnandexpiredare 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 withalready_withdrawn, and of an expired one withalready_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-withdrawnevent. An issuer SHOULD tell the controller of a pause and a resume by the OCI-7consent-pausedandconsent-resumedevents (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
subis 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
statusclaim 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
| Version | Date | What changed |
|---|---|---|
| 0.1.0 | 2026-11-28 | First 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). |