Back to all speakers
Vjeran Grozdanic

Vjeran Grozdanic

I am a software engineer with 7+ years of experience specializing in scalable systems, cybersecurity, and software architecture. Currently working as a software engineer at Sentry, contributing to platform improvements, database optimizations, and our AI Agent observability products. Previously I have co-founded a cybersecurity SaaS company focused on real-time infrastructure monitoring. I hold a Master’s degree in Computer Science and actively contribute to open-source projects, including maintaining a Simple JWT (django-rest-framework-jwt) library.

Zero-Migration Encryption: Building Drop-in Encrypted Field in Django

Talk
Django doesn't come with a solution to encrypt database data out-of-the-box. While community projects exist, they often require complex migration processes or double-writing to new columns. At Sentry, for our high-traffic distributed system, we needed a solution that would abstract encryption logic without worrying about encryption keys on a case-by-case basis or performing risky migrations on millions of existing entries. We built EncryptedFields, a custom Field base class that provides drop-in, no database migration, replacements for CharField, JSONField, and TextField. Our approach allows for a "hybrid" state: the field handles both old plain-text formats and the new encrypted format on-the-fly. This eliminated the need for complex data migrations or secondary columns, making the transition safe and seamless for our engineers.