← All terms

Identity and security

Row Level Security

Row Level Security, or RLS, lets a database enforce rules about which rows a caller may read or change. Policies depend on the caller's identity and role. Privileged roles can bypass these rules, so RLS does not replace every server permission check.

You might see: RLS, row-level security, row policy

In a real project

A books table stores an owner ID on each row. A policy can allow a signed-in account to read its own rows while preventing it from changing a row's owner to another account.

A common mistake

Enabling RLS without checking the actual policies, or testing only with a privileged role. Test ordinary callers and the operations they must be allowed or forbidden to perform.

Put it into practice

These lessons open through your account. Your kit determines which are available.

Go to the source

Sources checked .