Prod Squad

Security and privacy basics: auth, encryption, PII, GDPR and DPDP

The security and privacy concepts every PM needs to design responsibly, from login and permissions to personal data and regulation.

6 min readAll levels#security#privacy#authentication#authorization
Ask about this lesson
On this page

Security and privacy failures are among the most damaging things that can happen to a product: lost trust, fines, and headlines. PMs don't implement encryption, but they decide what data to collect, who can see what, and how consent works. Those are product decisions with security consequences.

Why interviewers ask this

Questions like "What would you consider when launching a feature that uses location data?" or "How would you design permissions for a team workspace?" test whether you build privacy and security in from the start. Interviewers look for correct vocabulary (authentication vs authorization), data minimisation instincts, and awareness of regulation.

The framework

1. Authentication vs authorization

flowchart LR
    U["User"] --> AN{"Authentication<br/>Who are you?"}
    AN -->|password, OTP, passkey, SSO| ID["Verified identity"]
    ID --> AZ{"Authorization<br/>What may you do?"}
    AZ -->|allowed| OK["Edit the document"]
    AZ -->|not allowed| NO["403 Forbidden"]
  • Authentication proves identity: passwords, one-time codes, passkeys, single sign-on, and multi-factor authentication for sensitive actions.
  • Authorization decides permissions: roles (admin, editor, viewer), ownership, and sharing rules. Most real breaches in products are authorization bugs: user A can see user B's data by changing an ID in a URL.

2. Encryption

  • In transit: HTTPS everywhere, so data can't be read on the network.
  • At rest: encrypted databases and backups.
  • Secrets (API keys, passwords) are stored in secure vaults, and passwords are hashed, never stored in plain text.

3. Personal data (PII)

PII is anything that identifies a person: name, email, phone, address, government ID, precise location, and more. Sensitive categories include health, financial and biometric data, and children's data. Principles:

  • Data minimisation: collect only what the feature needs.
  • Purpose limitation: use it only for what you told users.
  • Retention: delete it when no longer needed.
  • Access control and audit logs: who in the company can see it, and a record of who did.

4. Regulation, at a PM level

  • GDPR (EU): lawful basis and consent, rights to access, correct and delete data, breach notification, and privacy by design.
  • DPDP Act (India, 2023): consent-based processing with clear notice, rights for individuals (access, correction, erasure, grievance redressal), duties for organisations to protect data and report breaches, and extra protections for children's data.
  • Others: CCPA (California), HIPAA (US health), and sector rules for payments. You aren't the lawyer, but you should involve legal and privacy teams early and know the right questions.

5. Threats to design against

Account takeover, broken access control, injection attacks, leaked secrets, and, for AI features, prompt injection and data leaking through model outputs.

Worked example

Question: "We want to add a 'share live location with friends' feature to our app. What security and privacy considerations would you think about?"

Sample answer:

"Live location is highly sensitive: it can put people in physical danger. So I'd start from 'what's the minimum we need' and build safeguards in.

Consent and control:

  • Off by default, with an explicit opt-in that explains who sees what.
  • Share with specific people, not 'all friends' by default, and with a time limit (1 hour, until I arrive).
  • A clear indicator while sharing is active, and one-tap stop.

Authorization: only the chosen people can see it. I'd ask engineering to test explicitly that changing a user ID in an API request can't reveal someone else's location. That's the classic bug here.

Data handling:

  • Encrypted in transit and at rest.
  • Keep only the latest location while sharing, and delete history after the session unless the user chooses otherwise.
  • Internal access restricted and logged.

Abuse cases: stalking and coercion. I'd add periodic reminders ('You're still sharing with Rahul'), an easy way to report, and rate limits on requests.

Regulation: work with legal to make sure the consent and notice meet DPDP and GDPR standards, and that users can delete their data.

Metrics: opt-in rate, average sharing duration, and reports of misuse, the last as a guardrail I'd review weekly at launch."

Common mistakes

  • Mixing up authentication and authorization.
  • Collecting data "because it might be useful later".
  • Permissions only enforced in the UI, not in the backend.
  • Treating compliance as a final checkbox instead of a design input.
  • Ignoring abuse cases for social and location features.

Interviewer tips

What "great" sounds like:

  • "Authentication is who you are; authorization is what you can do. Most leaks are authorization bugs."
  • "What's the minimum data this feature needs, and for how long?"
  • "Permissions must be enforced on the backend, not just hidden in the UI."
  • "I'd involve privacy and legal at the design stage, not the week before launch."
  • "Let's think about how a bad actor would misuse this."

Practice questions

Answer one in a mock interview and get graded instantly.

  1. 1.We want to add "share live location with friends". What security and privacy considerations would you think about?

    Practice this →
  2. 2.Explain the difference between authentication and authorization with a product example.

    Practice this →
  3. 3.How would you handle a request from a user to delete all their data?

    Practice this →

Finished reading?