Skip to main content

Django RLS

PostgreSQL Row Level Security for Django

Created by Kuldeep Pisda

Database-Level Security

Security enforced by PostgreSQL, not application code. No more forgetting to filter querysets - RLS ensures users only see data they're authorized to access.

Django Integration

Seamlessly integrates with Django's ORM, middleware, and admin. Works with existing models and requires minimal code changes. Following Django REST Framework patterns.

Multi-Tenant Ready

Built-in support for multi-tenant applications. Tenant isolation happens at the database level, ensuring complete data separation with optimal performance.

Flexible Policies

Create simple user-based policies or complex custom rules. Combine multiple policies for fine-grained access control. Supports all SQL operations.

Developer Friendly

Clear API following Django conventions. Comprehensive testing utilities. Detailed documentation with real-world examples. Easy debugging and monitoring.

Production Ready

Battle-tested security with field validation. Performance optimized with proper indexing support. Management commands for easy deployment and maintenance.