Skip to main content
Security & trust

Row Level Security (RLS)

Row Level Security restricts which database rows a user can read or change, enforced by the database itself. It is a core defence against tenant data leaks.

Quick answer

Row Level Security (RLS) is a database feature that restricts which rows a user can read or change, enforced by the database itself rather than by application code. Each query is automatically filtered by a policy — for example, "a user can only see rows where the owner ID matches their own." It is a core defence against one tenant's data leaking to another in multi-tenant software.

In software that serves many customers from one database, the critical risk is one customer accidentally seeing another's data. RLS addresses this at the deepest level: instead of trusting every piece of application code to add the right filter, the database refuses to return rows a user is not allowed to see.

A policy defines the rule — commonly that a row is only visible when its owner or tenant identifier matches the current user. Every query is then transparently constrained by that policy, so even a forgotten filter in the application cannot expose the wrong data.

RLS is a defence-in-depth measure: it does not replace careful application code, but it provides a backstop enforced by the database. KAZI relies on explicit tenant scoping and database-level protections to keep each account's data isolated.

Run the money side of your business in one place

Start free. Priced per business, not per seat.

Start Free Trial
FAQ

Common questions

Why is Row Level Security important for multi-tenant apps?

It enforces data isolation at the database, so one customer cannot see another's rows even if application code forgets a filter. That backstop is what makes shared-database, multi-tenant software safe to trust.

Does RLS replace application-level checks?

No. RLS is a defence-in-depth layer that backs up careful application code, not a substitute for it. Strong systems use both: correct query scoping in the app and enforced policies in the database.

One connected place to run the work

Clients, projects, invoicing, payments and AI in one place. Start free, priced per business.

No spam · unsubscribe anytime