<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peesh Chopra</title>
    <description>The latest articles on DEV Community by Peesh Chopra (@advocate_peeshchopra).</description>
    <link>https://dev.to/advocate_peeshchopra</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3866344%2F31f60a69-f898-465a-803b-5594ad8d44f0.jpg</url>
      <title>DEV Community: Peesh Chopra</title>
      <link>https://dev.to/advocate_peeshchopra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/advocate_peeshchopra"/>
    <language>en</language>
    <item>
      <title>Your App Logs Can Become Legal Evidence: What Developers Should Preserve</title>
      <dc:creator>Peesh Chopra</dc:creator>
      <pubDate>Tue, 08 Sep 2026 15:40:40 +0000</pubDate>
      <link>https://dev.to/advocate_peeshchopra/your-app-logs-can-become-legal-evidence-what-developers-should-preserve-16fe</link>
      <guid>https://dev.to/advocate_peeshchopra/your-app-logs-can-become-legal-evidence-what-developers-should-preserve-16fe</guid>
      <description>&lt;p&gt;A production incident usually starts with a technical question.&lt;/p&gt;

&lt;p&gt;What happened?&lt;/p&gt;

&lt;p&gt;A legal dispute often starts with a different one:&lt;/p&gt;

&lt;p&gt;Can you prove what happened?&lt;/p&gt;

&lt;p&gt;For developers, those two questions are much closer than they appear.&lt;/p&gt;

&lt;p&gt;A user claims that an account was accessed without permission. A customer disputes a transaction. A company investigates whether an employee downloaded confidential information. A security team discovers suspicious activity several weeks after it occurred.&lt;/p&gt;

&lt;p&gt;The first place everyone looks is often the same: the logs.&lt;/p&gt;

&lt;p&gt;But logs are not only useful for debugging and security investigations. In the right circumstances, digital records can become important evidence in a legal proceeding.&lt;/p&gt;

&lt;p&gt;That creates a responsibility developers and engineering teams sometimes overlook.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The way your application creates, stores, and preserves logs can affect their usefulness later.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Counts as an Application Log?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An application log can record events such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User login and logout activity&lt;/li&gt;
&lt;li&gt;Password changes&lt;/li&gt;
&lt;li&gt;API requests&lt;/li&gt;
&lt;li&gt;Failed authentication attempts&lt;/li&gt;
&lt;li&gt;Account modifications&lt;/li&gt;
&lt;li&gt;File uploads and downloads&lt;/li&gt;
&lt;li&gt;Administrative actions&lt;/li&gt;
&lt;li&gt;Payment events&lt;/li&gt;
&lt;li&gt;Changes to important records&lt;/li&gt;
&lt;li&gt;Access to sensitive information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact contents depend on the application.&lt;/p&gt;

&lt;p&gt;A simple timestamp and error message may be enough for debugging. For an investigation, however, the context surrounding that event can be much more important.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;2026-09-08 10:41:12&lt;br&gt;
user_id=4821&lt;br&gt;
action=download&lt;br&gt;
resource=customer_export.csv&lt;br&gt;
ip=203.0.113.10&lt;/p&gt;

&lt;p&gt;This tells us something happened.&lt;/p&gt;

&lt;p&gt;But it may not tell us enough to establish who actually performed the action, whether the account was compromised, whether the log itself was altered, or whether the recorded time is reliable.&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Developers Should Care About Evidence&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Indian law recognises electronic records as a form of evidence, subject to the applicable legal requirements.&lt;/p&gt;

&lt;p&gt;The Bharatiya Sakshya Adhiniyam, 2023 contains provisions dealing with electronic and digital records.&lt;/p&gt;

&lt;p&gt;This does not mean that every log file automatically becomes conclusive proof in court.&lt;/p&gt;

&lt;p&gt;The circumstances in which the record was created, stored, maintained, produced, and authenticated can matter.&lt;/p&gt;

&lt;p&gt;For an engineering team, this means one thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evidence quality begins before litigation begins.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By the time lawyers become involved, it may already be too late to recover deleted logs, establish missing timestamps, or determine whether an administrator modified a record.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Difference Between Logging and Preserving&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is one of the most important distinctions.&lt;/p&gt;

&lt;p&gt;A system may generate logs continuously, but that does not necessarily mean the organisation is preserving them properly.&lt;/p&gt;

&lt;p&gt;Consider a startup that keeps authentication logs for seven days.&lt;/p&gt;

&lt;p&gt;A suspicious account takeover happens on January 1.&lt;/p&gt;

&lt;p&gt;The customer reports it on January 15.&lt;/p&gt;

&lt;p&gt;The relevant logs have already been deleted.&lt;/p&gt;

&lt;p&gt;The application technically had logging enabled. Yet the organisation may no longer have the information needed to investigate what happened.&lt;/p&gt;

&lt;p&gt;Logging answers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What did the system record?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Preservation asks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did we retain the relevant record long enough, and in a sufficiently reliable form, to use it later?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are different engineering decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Should Developers Consider?&lt;/strong&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Accurate Timestamps
&lt;/h2&gt;

&lt;p&gt;Timestamps should be consistent and properly managed.&lt;/p&gt;

&lt;p&gt;If one server records an event in UTC while another records local time, investigators can struggle to reconstruct the sequence of events.&lt;/p&gt;

&lt;p&gt;A consistent time standard makes incident reconstruction considerably easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. Identity and Context&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A log saying:&lt;/p&gt;

&lt;p&gt;DELETE /customer/4821&lt;/p&gt;

&lt;p&gt;may be technically useful but legally weak without additional context.&lt;/p&gt;

&lt;p&gt;Where appropriate, organisations should consider recording information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User or service identity&lt;/li&gt;
&lt;li&gt;Relevant request or transaction identifier&lt;/li&gt;
&lt;li&gt;Timestamp&lt;/li&gt;
&lt;li&gt;Source information&lt;/li&gt;
&lt;li&gt;Action performed&lt;/li&gt;
&lt;li&gt;Resource affected&lt;/li&gt;
&lt;li&gt;Authentication context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact information should depend on the application's security, privacy, and operational requirements.&lt;/p&gt;

&lt;p&gt;More logging is not automatically better.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Protection Against Tampering&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If an administrator can freely modify or delete the same logs used to investigate that administrator's actions, the reliability of those records can become questionable.&lt;/p&gt;

&lt;p&gt;Sensitive logs should therefore be protected through appropriate access controls and retention mechanisms.&lt;/p&gt;

&lt;p&gt;For critical systems, organisations may also consider append-only or otherwise tamper-evident storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Retention Policies&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Keeping everything forever is not necessarily the answer.&lt;/p&gt;

&lt;p&gt;Logs may contain personal information, identifiers, IP addresses, device information, or other sensitive data.&lt;/p&gt;

&lt;p&gt;A sensible retention policy should balance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security requirements&lt;/li&gt;
&lt;li&gt;Legal requirements&lt;/li&gt;
&lt;li&gt;Business needs&lt;/li&gt;
&lt;li&gt;Investigation requirements&lt;/li&gt;
&lt;li&gt;Privacy obligations&lt;/li&gt;
&lt;li&gt;Storage costs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important point is to have a deliberate policy rather than allowing logs to disappear through an undocumented automated cleanup job.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What About IP Addresses?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;IP addresses often appear in security logs.&lt;/p&gt;

&lt;p&gt;They can be useful when investigating suspicious activity, but developers should avoid assuming that an IP address automatically identifies a particular person.&lt;/p&gt;

&lt;p&gt;An IP address may correspond to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A shared network&lt;/li&gt;
&lt;li&gt;A corporate gateway&lt;/li&gt;
&lt;li&gt;A mobile network&lt;/li&gt;
&lt;li&gt;A VPN&lt;/li&gt;
&lt;li&gt;A proxy&lt;/li&gt;
&lt;li&gt;A public Wi-Fi connection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, an IP address can be an important investigative clue without necessarily proving who was physically using a device.&lt;/p&gt;

&lt;p&gt;Context matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Happens When an Incident Occurs?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine a customer claims that ₹50,000 was transferred from an account without authorisation.&lt;/p&gt;

&lt;p&gt;The engineering team investigates and finds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A successful login&lt;/li&gt;
&lt;li&gt;A password reset&lt;/li&gt;
&lt;li&gt;A change to the registered device&lt;/li&gt;
&lt;li&gt;A transaction request&lt;/li&gt;
&lt;li&gt;An API response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these events are recorded consistently, investigators can reconstruct a timeline.&lt;/p&gt;

&lt;p&gt;But suppose the password reset event exists only in one application log, the transaction appears in another system, timestamps use different time zones, and the authentication logs were deleted after seven days.&lt;/p&gt;

&lt;p&gt;The technical investigation becomes much harder.&lt;/p&gt;

&lt;p&gt;The legal investigation may become harder too.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;A Practical Logging Checklist&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Engineering teams can ask a few basic questions before an incident happens:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do we know what events need to be logged?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are timestamps consistent across our systems?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can we identify the relevant user, service, or administrator?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can logs be modified without appropriate authorization?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long are important logs retained?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who can access them?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are logs backed up appropriately?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can we reconstruct a significant security event from the available records?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do our retention practices align with our privacy and legal obligations?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are not purely legal questions.&lt;/p&gt;

&lt;p&gt;They are architecture questions with legal consequences.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Developers Should Not Become Lawyers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There is an important balance here.&lt;/p&gt;

&lt;p&gt;Developers should not be expected to determine whether a particular log will ultimately be admissible in court. That is a legal question requiring analysis of the facts and applicable law.&lt;/p&gt;

&lt;p&gt;But engineering teams should understand that technical design decisions can affect the quality of information available to investigators and legal professionals later.&lt;/p&gt;

&lt;p&gt;A lawyer cannot recover a log that was permanently deleted six months earlier.&lt;/p&gt;

&lt;p&gt;A security team cannot reconstruct an event that was never recorded.&lt;/p&gt;

&lt;p&gt;And a company cannot easily demonstrate the integrity of a record if its preservation process was undocumented.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Broader Lesson&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Modern software systems create enormous quantities of digital information.&lt;/p&gt;

&lt;p&gt;Some of it is temporary.&lt;/p&gt;

&lt;p&gt;Some of it is operational.&lt;/p&gt;

&lt;p&gt;Some of it may eventually become important evidence.&lt;/p&gt;

&lt;p&gt;The challenge is not to turn every application into a surveillance system. It is to identify the records that genuinely matter, protect them appropriately, and establish sensible retention and access practices.&lt;/p&gt;

&lt;p&gt;Good engineering therefore has a legal dimension that is easy to overlook.&lt;/p&gt;

&lt;p&gt;The strongest evidence is often not created when a lawsuit begins.&lt;/p&gt;

&lt;p&gt;It is created quietly, through ordinary system design, months or years before anyone expects a dispute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: This article is intended for general legal and technical awareness and does not constitute legal advice. The treatment and evidentiary value of electronic records depend on the facts of each matter and the applicable law.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>security</category>
      <category>webdev</category>
      <category>legal</category>
    </item>
    <item>
      <title>The DPDP Act Is "In Force." Here's What That Actually Means for Your Codebase</title>
      <dc:creator>Peesh Chopra</dc:creator>
      <pubDate>Mon, 10 Aug 2026 16:53:54 +0000</pubDate>
      <link>https://dev.to/advocate_peeshchopra/the-dpdp-act-is-in-force-heres-what-that-actually-means-for-your-codebase-47ed</link>
      <guid>https://dev.to/advocate_peeshchopra/the-dpdp-act-is-in-force-heres-what-that-actually-means-for-your-codebase-47ed</guid>
      <description>&lt;p&gt;A three-person startup ships an MVP. It stores user phone numbers, email addresses and rough location data in a shared Postgres instance. There is no consent banner, no data retention job, no documented breach process. When a co-founder raises the Digital Personal Data Protection Act, the answer from the team is: "relax, it's not even fully in force yet."&lt;/p&gt;

&lt;p&gt;That answer is half right and half dangerous. Understanding which half applies to your product is the difference between a weekend of groundwork now and a scramble later.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Core Question&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;India's Digital Personal Data Protection Act, 2023 received presidential assent in August 2023 but sat without operative rules for two years. On November 13, 2025, the Ministry of Electronics and Information Technology notified the Digital Personal Data Protection Rules, 2025, along with the establishment of the Data Protection Board of India. That single notification changed the Act from a law on paper to a law with a working timetable.&lt;/p&gt;

&lt;p&gt;The question developers actually need answered is not "is the DPDP Act in force." It is: which obligations are live today, which are switched off until a later date, and what should get built into the product architecture in the meantime.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Applicable Legal Framework&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Three documents matter here.&lt;/p&gt;

&lt;p&gt;The Digital Personal Data Protection Act, 2023 is the parent statute. It defines core roles: the Data Fiduciary (the entity that decides how and why personal data is processed, meaning most product companies), the Data Processor (anyone processing data on the fiduciary's behalf, which can include your cloud vendor or analytics tool), and the Data Principal (the individual whose data it is).&lt;/p&gt;

&lt;p&gt;The Digital Personal Data Protection Rules, 2025 operationalise the Act's provisions, filling in procedural detail the Act itself left to delegated legislation, things like exact breach notification timelines, consent notice content, and children's data verification.&lt;/p&gt;

&lt;p&gt;The enforcement notification issued alongside the Rules sets a staggered timeline. Provisions establishing the Data Protection Board came into force immediately on notification. Rules relating to Consent Managers become operative from November 13, 2026. The bulk of the substantive obligations, including detailed consent requirements, data principal rights, and the full breach notification and penalty regime, become enforceable from May 13, 2027.&lt;/p&gt;

&lt;p&gt;So as of today, the regulator exists, the rulebook is published, but most compliance obligations carry an eighteen-month runway rather than an immediate deadline.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Regulatory and Constitutional Position&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It helps to know why this framework exists in the first place. In Justice K.S. Puttaswamy (Retd.) v. Union of India, (2017) 10 SCC 1, a nine-judge bench of the Supreme Court held that privacy is a fundamental right under Article 21 of the Constitution. That judgment is the constitutional foundation the DPDP Act was eventually built on, and it is why courts are likely to read the Act's provisions in favour of individual control over personal data where the statutory language leaves room for interpretation.&lt;/p&gt;

&lt;p&gt;On the regulatory side, the Data Protection Board of India is now a functioning body, though independent commentary has noted a lag between its formal establishment in November 2025 and its Chairperson and Members being fully appointed, which happened only around mid-2026. Enforcement capacity is still being built even as the legal obligation exists. That gap between "law is in force" and "regulator is fully staffed and enforcing" is common for new regulatory regimes and is worth factoring into your risk assessment, not your compliance timeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Practical Examples for Developers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Consider four situations that come up in ordinary product work.&lt;/p&gt;

&lt;p&gt;A signup form collects a phone number and email for OTP-based login. Once the relevant consent provisions are live, that form needs a notice, in clear language and not just legalese buried in a privacy policy link, describing what data is collected and why, at or before the point of collection.&lt;/p&gt;

&lt;p&gt;A mobile app uses a third-party analytics SDK. Under the Act, that SDK vendor is likely a Data Processor. The Data Fiduciary, meaning the app's own company, remains accountable for how that processor handles the data, so vendor contracts need data protection clauses even if the vendor is a well-known name.&lt;/p&gt;

&lt;p&gt;A gaming or edtech app has users who are, or might be, under 18. Rule provisions on children's data require verifiable parental consent before processing a minor's data, and the Rules set out specific mechanisms considered acceptable for that verification.&lt;/p&gt;

&lt;p&gt;A production database is exposed by a misconfigured access control setting. Under Rule 7 of the DPDP Rules, once the organisation becomes aware of a personal data breach, it must intimate the Board without delay with an initial description, followed by a detailed report within 72 hours of becoming aware, and must notify affected individuals as well. This is one of the provisions scheduled to become fully enforceable in the later phase of rollout, but building the internal detection and escalation workflow now is far cheaper than building it under pressure after an incident.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Common Mistakes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Founders and engineering leads tend to make the same handful of errors. Treating "not yet fully enforced" as "does not apply to us" is the biggest one; the obligations exist in the statute now and will become enforceable on a fixed date, not on a date of the company's choosing. Assuming GDPR compliance automatically covers DPDP compliance is another; the two frameworks overlap conceptually but differ on specifics like the definition of significant data fiduciary, breach notification content, and children's data thresholds. Treating the privacy policy as a substitute for an actual data inventory is a third; without knowing what personal data lives where, in which database, in which log file, in which third-party tool, a company cannot honestly assess its own exposure.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Practical Steps to Take Now&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Start with a data inventory: list every place personal data is collected, stored, or sent to a third party, including logs and backups. Map every third-party processor, from your email service to your customer support tool, and check whether their terms include data protection commitments. Draft a breach response runbook that assumes a 72-hour clock starting from the moment the team becomes aware of an incident, not from when the investigation concludes. Build consent capture into the product now, even ahead of the enforceable date, since retrofitting consent UI into an existing user base is far more disruptive than designing it in from the start. Finally, keep a compliance log, dated notes of what was built and when, because demonstrating good-faith preparation matters if the Board ever asks.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The DPDP Act's phased rollout is not a grace period to ignore the law. It is a runway to build the right architecture before the obligations become enforceable and the penalty schedule, which runs up to several hundred crore rupees for serious violations, becomes a live risk rather than a future one. Treat the current phase as free engineering time, not free legal exposure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: This article is intended for general legal awareness and does not constitute legal advice. Readers should consult a qualified advocate for guidance specific to their organisation's data processing activities and compliance obligations under the Digital Personal Data Protection Act, 2023 and the Digital Personal Data Protection Rules, 2025.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>privacy</category>
      <category>legal</category>
    </item>
  </channel>
</rss>
