DEV Community

Backend engineers, settle this debate.

Should a SaaS application EVER be trusted to enforce tenant isolation by itself?

Or should PostgreSQL reject cross-tenant access even when application code makes a mistake?

What's your production setup?

Top comments (1)

Collapse
 
anthony_emmanuella_3426cf profile image
Anthony Emmanuella Mmasinachi •

That missing "WHERE tenant_id = ?" has probably caused more panic than a production server going down at 3 AM. 😂

But seriously, what's your last line of defense when application code gets it wrong?