Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[Tropical on Rails 2026] Privacy on Rails

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

[Tropical on Rails 2026] Privacy on Rails

User data privacy is no longer a competitive advantage - it’s a legal requirement. Regulations like GDPR and LGPD set rules that many teams still see privacy as a barrier to speed or innovation. This talk shows how to implement pragmatic, "on Rails" data privacy, aligning with regulations while maintaining product quality, agility, and innovation.

More Decks by Talysson de Oliveira Cassiano

Other Decks in Programming

Transcript

  1. Or would you freak out thinking… - What tables store

    user private information? - Are we able to remove them from the logs too? - Oh no, what about ActiveJob payloads? - How much time do we have to respond to that email?! - Are we breaking any law? Are we going to be fined?
  2. Data protection laws - Exist to enforce data protection and

    user privacy - Present in more than 140 countries - Most don't apply only if you are based in the country, but also if you have users there - They are about consent, data minimization, access rights, breach notification, and purpose limitation
  3. Name Email Phone Government ID Date of birth Race Religion

    Prescriptions Tax records IP address Browsing history Chat messages Salary Behavior profile AI generated predictions Gender identity Location history
  4. Name Email Phone Government ID Date of birth Race Religion

    Prescriptions Tax records IP address Browsing history Chat messages Salary Behavior profile AI generated predictions Gender identity Location history AND MORE!
  5. Privacy by design - Don't implement privacy as an afterthought

    - Implement it as any other normal engineering constraint - Like we do for security, for performance, for responsiveness - Think about your user's privacy first - Don't gamble with user data to pay for innovation - Start with a set of principles
  6. Privacy by design principles 1. Data minimization - Don't collect

    what you can't protect (or don't need) - Less data = less to concern about 2. Private by default - Every data exposure requires an explicit reason - Data must be protected with appropriate technical measures 3. Transparency - Users should know and control what you store from them
  7. Use strong parameters - Create an explicitly permitted list of

    parameters - Be intentional about what you permit - Filtering at the entry point covers the whole application
  8. Anonymize user's IPs - Doing it at the entry point

    covers the whole application - If geocoding is important for your app, it'll still work - Use the ip_anonymizer gem
  9. Safeguard error tracking strategies - Error tracking services capture full

    request context (PII, params, …) - Filter request params and use the logstop gem
  10. Anonymize analytics data - Innovation should not be at the

    expense of your user's privacy - Use a privacy-first analytics service + consent-gated scripts - Anonymize any personal information sent do analytics - We'll see consent modeling and anonymization techniques soon
  11. No personal data in emails - Data can leak in

    email logs and bounced email handling - Enforce minimal PII in emails and filter email logs - Use signed URLs with auto-expiry and authenticated downloads
  12. Implement data retention and TTL policies - Don't keep older

    unused data - Delete (or anonymize) inactive users - Delete inactive sessions - Clear SolidQueue completed job records - Make it automatic
  13. Log with care - Logs are the #1 silent leak

    - Always check everything that is explicitly logged - Filter request params and use the logstop gem
  14. Encryption at rest for models Decrypt Search Use ✅ ✅

    ✅ ❌ ❌ ❌ (just verify) - Rails supports three levels of data protection - Choose based on the field's usage pattern
  15. Make your backups secure - Always encrypt the database backups

    - Adopt a retention policy for backups as well
  16. Protect direct console access in production - Track who, why

    and how console was accessed in production - Use console1984 and audits1984 gems for that
  17. Creating a consent model - It's not just about using

    a cookie banner - Marketing, analytics tracking, 3rd party sharing, features, … - Each consent should be per-purpose, versioned and with proof - Consents should be explicit - No user consent = no action
  18. Data subject access rights - Users have access, rectification and

    erasure rights over their data - LGPD requires a response in 15 days to respond - GDPR requires a response in 30 days (extendable until 90 days) - Make it as automatic as possible
  19. Privacy by design Rails agent skills, by Codeminer42 - Bring

    privacy-by-design into your Rails workflow - Two modes: - Complete codebase assessment - Review your recent changes - Generates a thorough report + offer fixes - Fully open source and ship with Ruby scripts for easy auditing
  20. Data privacy laws don't kill innovation Not complying is a

    skill issue Respect your users privacy Rails is privacy friendly