pg_cel
pg_cel · A pure PostgreSQL implementation of the Google Zanzibar / OpenFGA authorization model.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101522 | pg_cel | pg_cel | 0.2.0 | SEC | Apache-2.0 | Rust |
PostgreSQL · 13, 14, 15, 16, 17, 18
Usage
Sources:
pg_cel 0.2.0 evaluates Common Expression Language conditions for pgauthz. It is a Rust/pgrx shared library; PostgreSQL 18 is the default build, with Cargo features for 13–18. Core use does not require preload or restart.
Evaluate a Condition
Integration and Failure Boundaries
cel_compile_check rejects malformed expressions; cel_eval_bool evaluates against JSON input and returns a boolean or NULL for a non-boolean result. Compile or evaluation errors raise SQL errors. Policy callers must treat errors, NULL and non-true results as denial. The pgauthz engine does this and expects the functions in authz; the extension itself is relocatable.
The expression evaluator has no external side effects. Input variable names and types must match the JSON context. This is the optional CEL evaluator in pgauthz release 0.19.0, not a replacement for the engine’s authorization model or its migrations.