Beta. consent-kit is at 0.x: expect breaking changes between releases, and treat everything it generates as a draft. Report a problem or share feedback.
Data subject requests
A visitor may ask a controller for a copy of the personal data it holds about them (access, Art. 15 GDPR) or for its erasure (Art. 17). consent-kit gives a site the building blocks to receive such requests: a form, an endpoint, a record of each request, an email to the controller’s mailbox, a reminder before the deadline and the deletion of old records. It does not answer anything. A person gathers or deletes the data and replies.
What happens to a request
Section titled “What happens to a request”sequenceDiagram participant V as Visitor's browser participant S as Site (endpoint on its own domain) participant DB as Request store (D1) participant M as Controller's mailbox V->>S: POST /privacy/requests (form, with cc_cookie) S->>S: check Origin, fields, honeypot S->>S: hash the cookie's consentId with the receipts' key S->>DB: store the request S-->>V: 303 to /privacy/requests?request=<id> S->>M: notification: type, address, id, due date, receipts matched, checklist Note over S,M: daily: reminder of requests due within 7 days or overdue
- The registry’s
subjectRequestssection names the endpoint, the controller’s mailbox (notify), the request types (access,erasure) and how long a closed request is kept. consent-kit buildwrites the form as an HTML fragment per locale. It is a plain<form method="post">, with no script and no inline style, so the strict Content-Security-Policy admits it unchanged:form-action 'self'already allows a form that posts to the site itself.- The endpoint is always on the site’s own domain. That is what makes the browser send CookieConsent’s cookie,
cc_cookie, with the request. The handler hashes the cookie’sconsentIdwith the same key as the consent receipts, so the stored request carries the samesubject_hashas that browser’s receipts. The person answering can find them without anyone asking the visitor for an id they have never seen. - The request is stored before anything else happens. If storing fails, the visitor is told (503) and nothing is emailed. If an email fails, the request stays stored and the daily reminder lists it until someone closes it.
- The controller’s mailbox gets one email per request. Its Reply-To is the requester, and it carries the fulfilment checklist for the request type. It says how many receipts the cookie matches, but never what they contain.
- A person answers. They use
findReceiptsoreraseReceiptswhere the checklist says so, and close the request with its outcome. The record is kept for the declared retention after closing, then deleted bysweepClosedRequests.
The built-in purpose
Section titled “The built-in purpose”Receiving requests is itself processing of personal data: the requester’s address and what they asked for. Enabling the section therefore adds a purpose, subject-requests (“Handling your data protection requests”). Its basis is legal_obligation, its data categories are the requester’s email and the request details, and its retention is the section’s, counted from the closing of the request. The requesterEmail provider, if there is one, is its recipient.
The purpose is derived from the section; it is never written into purposes. This keeps the section’s own change rules in force. Adding the section, adding a type or shortening the retention is not material. Removing the section or a type, keeping records longer, changing the mailbox or the email provider needs a confirmation. No user purpose may use the id while the section exists. The documents list the purpose like any other. The banner does not, since nothing in the browser serves it.
Confirmation emails
Section titled “Confirmation emails”Without requesterEmail, nobody emails the requester. The controller replies from its mailbox, and the notification tells the person to check the requester’s identity.
With requesterEmail: { processor: … }, the requester also gets a link to confirm that the request is theirs. The link is signed with HMAC, valid for 7 days and usable once. Opening it changes nothing: it shows a page with a button that POSTs the token back. Mail scanners and link prefetchers open links. They do not press buttons.
Sending email to an address someone typed is open to abuse, so it is bounded twice:
- Per address. At most one confirmation email an hour. The slot is reserved atomically before sending, so concurrent submissions send one email. Addresses are compared lowercased and without a
+tag. - In all.
maxConfirmationsPerHour, 100 by default.
Neither limit stores an address. The rate key is a keyed hash, and the rate rows are deleted once their hour has passed. Limit clients with a Cloudflare rate-limiting rule in front of the route; consent-kit stores no IP addresses.
No enumeration
Section titled “No enumeration”The answer to a POST is the same 303, with only a fresh request id, whatever the store holds. That holds when the address asked before, when the cookie matches receipts, and when the honeypot was filled in (then nothing is stored or sent). The received page is the same for every id. With a Workers ExecutionContext, the emails go out after the answer (waitUntil), so the timing does not tell either. Refusals carry an error code and never repeat the input.
What this does not do
Section titled “What this does not do”- It does not verify identity. The confirmation link shows that someone controls the address, nothing more.
- It does not find or delete data. The checklist lists what the registry declares. Data the registry does not know about is not on it.
- It does not handle rectification, objection, restriction or portability. Those requests still reach the controller’s contact, which the privacy policy names.
- It does not decide retention or deadlines for you. The due date is one calendar month after receipt. An extension (up to two further months, Art. 12(3)) is recorded with its reason by
store.extend, which the person calls. - Phrases are drafts until reviewed. That covers the form, the pages, the emails and the checklist, like every other generated text. See documents and phrase review.
Next: receive data subject requests, and the server reference.