Query plan adapters

This documentation is for an as-yet unreleased version of Cerbos. Choose 0.50.0 from the version picker at the top right or navigate to https://docs.cerbos.dev for the latest version.

The Cerbos PlanResources API returns a query plan describing which resources a principal can access for a given action. Cerbos provides reference implementations of query plan adapters that convert that response into native query filters for your data layer, so authorization conditions are evaluated at the database level rather than in application code. Use these adapters as-is or as a starting point to build your own.

Available adapters

Adapter Language Target

Prisma

TypeScript

Prisma ORM (PostgreSQL, MySQL, SQLite, SQL Server, MongoDB)

Drizzle

TypeScript

Drizzle ORM (PostgreSQL, MySQL, SQLite)

Mongoose

TypeScript

MongoDB via Mongoose

Convex

TypeScript

Convex reactive database

LangChain / ChromaDB

TypeScript

ChromaDB vector store via LangChain.js

SQLAlchemy

Python

SQLAlchemy (PostgreSQL, MySQL, SQLite, Oracle, SQL Server)