List Filtering with Oso

Efficient access control over large datasets, without scanning every row.
Meet with Eng

Why Filtering Lists Is Hard

When you’re building your app, you don’t just need to answer questions like “Can Alice view this document?”— you also need to answer “Which documents can Alice view?”

Seemingly simple questions like these often require hand-written recursive SQL or post-query access checks.

This approach results in:

Slow performance: Per-row checks don’t scale

Duplicated logic: Authorization scattered across services

High latency: Repeated calls to the authorization engine

What you really want is a query that returns only what the user is allowed to access.

Centralized Policy, Local Data Filtering

Answer "What can I see?" with a single query: Oso generates filters from your authorization policy so your database returns only authorized results.

Oso supports two list filtering methods:

  • list API: Ask Oso Cloud for all resource IDs a user can access
  • list_local API: Oso generates a SQL WHERE clause that filters your own database

With list_local, you enforce centralized policies using local data, no need to sync every record to Oso.

Example:

SELECT * FROM documents
WHERE <oso-generated WHERE clause>
Book a Demo
Oso-use-case-list-filtering-diagram

The permissions layer for dashboards, feeds, and search

checkmark icon

Bulk Checks

Convert thousands of is_allowed() calls into a single query.

checkmark icon

Hybrid Data Model

Keep large or sensitive datasets local to avoid syncing and query them directly.

checkmark icon

Explainability

Debug access decisions with decision logs and explain.

checkmark icon

Optimized SQL

Integrates with sorting, pagination, and indexes.

Try Oso

Get hands-on with Oso. We’ll show you how to implement list filtering the right way.