The DPDP Act for builders: what actually changes in your codebase
The DPDP Rules hit full force on 13 May 2027. A builder's view of what changes: a consent ledger instead of a boolean, erasure as graph traversal with crypto-shredding, twelve months of tamper-evident access logs, and a breach runbook whose clock starts at detection.
India's Digital Personal Data Protection Rules were notified on 13 November 2025 and are being switched on in three stages. Two are already live. The third is the one that matters if you own a schema: Rules 3 and 5 to 16 commence on 13 May 2027, and with them notice and consent, security safeguards, breach reporting, retention and erasure, data-principal rights, and processor contracts all become enforceable.
Most writing on this has been aimed at general counsel. This is aimed at whoever owns the migration.
What is actually new for engineers
The Information Technology Act's Section 43A and the SPDI Rules were the previous regime: reasonable security practices, a category called sensitive personal data, almost no operational detail. DPDP drops both — Section 44(2) omits 43A from the commencement date — and replaces them with obligations that must be implemented, not attested.
Four things change the shape of the codebase:
- Consent becomes auditable per event. You have to be able to show what notice a person saw, in which language, for which purpose, and when they said yes or no.
- Erasure becomes a scheduled job with a deadline, not a support ticket.
- Access logging becomes a retained artefact with a one-year floor.
- Breach reporting becomes a pipeline with a 72-hour clock attached to it.
The penalty schedule is why this is not a documentation exercise: up to ₹250 crore for failing to take reasonable security safeguards, up to ₹200 crore for failing to notify a breach. Those numbers dwarf most Indian SaaS companies' entire revenue run-rate.
Consent is a table, not a checkbox
The most common pre-2025 design is users.marketing_opt_in boolean. It cannot answer the only question an inquiry will ask: what exactly did this person agree to, and when?
Consent under the Act must be free, specific, informed, unconditional and unambiguous, with a clear affirmative action, and the notice must be available in English or any of the 22 languages in the Eighth Schedule. The unit of truth is therefore an event, not a flag.
CREATE TABLE consent_event (
id bigserial PRIMARY KEY,
principal_id uuid NOT NULL,
purpose_code text NOT NULL,
notice_version text NOT NULL,
notice_lang text NOT NULL,
action text NOT NULL CHECK (action IN ('grant','withdraw')),
channel text NOT NULL,
evidence jsonb NOT NULL, -- form id, UA hash, request id, clock source
occurred_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX consent_latest
ON consent_event (principal_id, purpose_code, occurred_at DESC);
Current state is a view over the latest event per principal and purpose. The table is append-only: no updates, no deletes, and no service account with UPDATE grants on it. Withdrawal is another row, not the absence of one.
The failure mode here is purpose drift, and it is always the same story: a table built for order fulfilment gets quietly reused for a recommendation model, and the consent record still says "to process your order". Fix it at the read path — attach purpose_code to every query that touches personal data and fail closed when there is no active consent — not in a policy document.
Erasure is a graph traversal
Deleting the row in users deletes almost nothing. The orders, the payment events, the support tickets, the S3 objects, the warehouse copy, the search index, the queue payloads, the LLM prompt logs and the nightly backup all still contain the person.
Rule 8 requires erasure once the purpose is served, and the Third Schedule sets inactivity triggers for large e-commerce, gaming and social media platforms — three years, broadly. Rule 8(3) then requires keeping personal data, traffic data and logs for at least a year for Seventh Schedule purposes. Both obligations are real, so "delete everything" and "keep everything" are equally wrong.
The workable pattern is a data map plus a generated erasure plan. Keep a table of (table, column, subject_key_path, retention_rule, erasure_strategy), walk it to build the plan for one principal, then execute it in two modes:
- Tombstone — keep the row (invoices, audit events, anything with a legal retention basis) and overwrite the identifying columns with a salted hash or nulls.
- Destroy — for immutable stores, encrypt each subject's payload under a per-subject data key wrapped by KMS. Erasure becomes key destruction. This is the only technique that works on object storage with versioning, on append-only logs, and on backups you cannot rewrite.
Numbers from a recent build: 61 tables reachable from the principal key and four stores outside Postgres. A naive DELETE with cascades took 40 minutes and held locks that broke checkout; the tombstones-plus-jobs version ran in under two seconds interactively, with the storage sweep queued behind it.
Two traps. KMS key deletion carries a pending window of 7 to 30 days, so a "deleted" subject stays recoverable unless you plan for it. And crypto-shredding without a key registry leaves you unable to prove which subjects were erased — keep the registry outside the store you are shredding.
Your logs are evidence, and they expire too early
Rule 6(1)(c) requires visibility over access to personal data through logs, monitoring and review, and Rule 6(1)(e) requires retaining those logs — and the data — for a year. Most stacks are nowhere near this: application logs at 7 to 14 days, a log aggregator at 30, audit trails at 90 because that is what the compliance template said in 2021.
Three changes matter more than the retention number itself.
Log reads, not just writes. Unauthorised viewing is the breach pattern the clause is aimed at. An audit table that only fires on INSERT/UPDATE will miss a support agent paging through 4,000 customer records.
Keep the log store out of reach of the application. A compromised app credential that can delete its own audit trail is not an audit trail. Ship to a separate account or bucket with object lock, write-only credentials for the producer, and a retention policy the app cannot shorten.
Review is part of the obligation. Collection without review is the most common gap. Alert on bulk exports, on access outside working hours, and on any single actor crossing a threshold of distinct principals per hour. Hash-chain each day's log file and anchor the digest in a second system, so tampering is at least detectable.
Cost is not the obstacle. At 200 requests per second, one access event per request is about 17 million events a day — under 7 GB raw, roughly 1 GB compressed, a few hundred gigabytes a year in object storage. That is a rounding error next to the penalty.
The 72-hour clock starts at detection, not at disclosure
Rule 7 requires intimation to affected data principals without delay, and to the Data Protection Board without delay plus a detailed report within 72 hours of becoming aware. Everything about that sentence is an engineering constraint, because the binding term is becoming aware. If your mean time to detect is measured in weeks, the 72-hour report is fiction and the regulator will treat the gap as the violation.
What has to exist before May 2027 is unglamorous: a breach intake endpoint, an incident record whose clock starts at detection rather than escalation, a template producing the items Rule 7(1) requires per affected principal, and a query that can enumerate those principals from the data map in hours.
Run the drill twice. Time how long it takes from "we think this bucket was public" to a defensible list of affected people. If that is more than a working day, the gap is the finding.
Processors are inside the perimeter
Paper alone will not survive scrutiny: Rule 6(1)(f) expects the contract to carry the security obligations, and Section 8 keeps you accountable for what the processor does.
Practically, that means a subprocessor register with purpose, data categories, region and retention per vendor, plus separate credentials and scoped buckets per processor so one vendor's compromise cannot read the whole estate. If your support tool queries production with the same role your application uses, the contract is describing a system nobody is running.
The 90-day plan
- Inventory purposes and notices (weeks 1–2). Every processing activity, its purpose code, and the notice version in force.
- Build the consent ledger (weeks 2–6). Append-only, fail-closed at the read path, withdrawal as a first-class event.
- Data map and erasure jobs (weeks 4–10). Tombstones for retained records, crypto-shredding for immutable stores, key registry included.
- Log retention to twelve months (weeks 6–10). Read access included, WORM storage, review alerts wired to someone's phone.
- Breach runbook and two drills (weeks 8–12). Measure time-to-affected-list, not time-to-press-release.
- Processor register and contract riders (weeks 8–12). Technical scoping, not just signatures.
- DPIA template (week 12). One page per high-risk processing activity, versioned with the code.
None of this needs new infrastructure — just treating a legal obligation as a set of data flows with owners, the same discipline as any reliability work, and the same reason we argue for boring, reversible architecture over clever shortcuts. The teams that will find May 2027 easy already have a working deletion path and logs that outlive their incidents.
If your data already sits on Indian infrastructure — as GitHub Enterprise Cloud customers here now do — residency is the easy half; the hard half is code that can prove what happened. We build and audit exactly that at Netpy, with NetPyCloud for teams that need data to stay in the country and the FDE programme for the engineers who will inherit these systems.
Thirteen May 2027 is eighteen months away. Enough time to do this once.
Sources: Digital Personal Data Protection Rules, 2025 (G.S.R. 846(E), 13 November 2025) — Rules 3, 6, 7, 8 and the commencement notification; DPDP Act, 2023, Sections 5, 6, 8, 44 and the Schedule; MeitY enforcement timeline and Data Protection Board of India notifications.
Header image: "Sansad Bhavan, New Delhi" by Nikhilb239, Wikimedia Commons, CC BY-SA 4.0.