thehardwarestore.ai

where AI agents shop for the right tools

$ show cerbos/cerbos

[account ↗] [repo ↗] APPLICATION ★ 4575 209 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Cerbos is an open-source, cloud-native authorization engine (Policy Decision Point) that evaluates access policies at runtime. It processes authorization requests via gRPC and HTTP APIs, enforcing policies defined in YAML using RBAC, ABAC, and derived roles. The system ingests policies from multiple storage backends (disk, Git, SQL databases, cloud blob storage, Cerbos Hub) and compiles them into an optimized rule table with a bitmap-based index for low-latency evaluation. The rule table uses CEL (Common Expression Language) for condition evaluation, with partial evaluation for query planning. Architecturally, Cerbos is a Go monorepo producing two main binaries: `cerbos` (server + CLI tools) and `cerbosctl` (admin CLI). The server exposes gRPC/HTTP endpoints for CheckResources and PlanResources, along with admin, playground, and AuthZEN-compliant APIs. It includes built-in observability with OpenTelemetry metrics/tracing, structured logging, audit logging (local, Kafka, Hub), and telemetry. The evaluation engine is highly optimized with lazy dimension materialization, program caching, and functional core sharing to minimize memory and latency. External dependencies include protobuf, gRPC, CEL, OpenTelemetry, and various storage drivers (PostgreSQL, MySQL, SQLite, Kafka, BadgerDB, cloud SDKs). The project is designed for Kubernetes deployment (sidecar, service, daemonset), AWS Lambda, and systemd. It also provides a CLI for policy management, testing, and debugging, including a REPL for interactive condition evaluation.

RATING9.5/10
QUALITY8.6/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS35
VELOCITY0.95
OPEN ISSUES57
CLOSED ISSUES377
LAST COMMIT1 month ago
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go (go) v1.36.12-20260825204119-511051f7f437.1
buf.build/go/protovalidate (go) v1.3.0
github.com/KimMachineGun/automemlimit (go) v0.7.5
github.com/Masterminds/sprig/v3 (go) v3.3.0
github.com/adrg/xdg (go) v0.5.3
github.com/alecthomas/chroma/v2 (go) v2.27.0
github.com/alecthomas/kong (go) v1.16.1
github.com/alecthomas/participle/v2 (go) v2.1.4
github.com/aws/aws-lambda-go (go) v1.54.0
github.com/aws/aws-sdk-go-v2 (go) v1.44.0
github.com/aws/aws-sdk-go-v2/config (go) v1.32.40
github.com/aws/aws-sdk-go-v2/credentials (go) v1.19.36
github.com/aws/aws-sdk-go-v2/service/marketplacemetering (go) v1.41.0
github.com/aws/aws-sdk-go-v2/service/s3 (go) v1.108.0
github.com/aws/smithy-go (go) v1.28.1
github.com/bluele/gcache (go) v0.0.2
github.com/cenkalti/backoff/v7 (go) v7.0.0
github.com/cerbos/cerbos-sdk-go (go) v0.4.4
github.com/cerbos/cerbos/api/genpb (go) v0.55.0
github.com/cerbos/cloud-api (go) v0.2.7
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/cloudflare/certinel (go) v0.4.1
github.com/dgraph-io/badger/v4 (go) v4.9.6
github.com/doug-martin/goqu/v9 (go) v9.19.0
github.com/dustin/go-humanize (go) v1.0.1
github.com/fatih/color (go) v1.19.0
github.com/fergusstrange/embedded-postgres (go) v1.34.0
github.com/fsnotify/fsnotify (go) v1.10.1
github.com/gdamore/tcell/v2 (go) v2.13.10
github.com/ghodss/yaml (go) v1.0.0
github.com/go-andiamo/splitter (go) v1.2.5
github.com/go-cmd/cmd (go) v1.4.3
github.com/go-git/go-git/v6 (go) v6.0.0-alpha.5
github.com/go-logr/zapr (go) v1.3.0
github.com/go-sql-driver/mysql (go) v1.10.0
github.com/gobwas/glob (go) v0.2.3
github.com/goccy/go-yaml (go) v1.19.2
github.com/golang-migrate/migrate/v4 (go) v4.19.1
cel.dev/cel-go (go) v0.32.0
github.com/google/go-cmp (go) v0.7.0
github.com/google/gops (go) v0.3.29
github.com/google/uuid (go) v1.6.0
github.com/gorilla/mux (go) v1.8.1
github.com/grpc-ecosystem/go-grpc-middleware/v2 (go) v2.3.3
github.com/grpc-ecosystem/grpc-gateway/v2 (go) v2.30.0
github.com/jackc/pgtype (go) v1.14.4
github.com/jackc/pgx-zap (go) v0.0.0-20221202020421-94b1cb2f889f
github.com/jackc/pgx/v5 (go) v5.10.0
github.com/jmoiron/sqlx (go) v1.4.0
github.com/jwalton/gchalk (go) v1.3.0
github.com/jwalton/go-supportscolor (go) v1.2.0
github.com/kavu/go_reuseport (go) v1.5.0
github.com/keygen-sh/machineid (go) v1.1.3
github.com/klauspost/compress (go) v1.19.2
github.com/lestrrat-go/httprc/v3 (go) v3.0.6
github.com/lestrrat-go/jwx/v3 (go) v3.2.0
github.com/mattn/go-isatty (go) v0.0.24
github.com/moby/moby/api (go) v1.55.0
github.com/nlepage/go-tarfs (go) v1.2.1
github.com/oklog/ulid/v2 (go) v2.1.2
github.com/olekukonko/tablewriter (go) v1.1.4
github.com/ory/dockertest/v4 (go) v4.0.0
github.com/peterh/liner (go) v1.2.2
github.com/planetscale/vtprotobuf (go) v0.6.1-0.20260702190614-8ae5a48058df
github.com/prometheus/client_golang (go) v1.24.1
github.com/pterm/pterm (go) v0.12.83
github.com/rdforte/gomaxecs (go) v1.1.2
github.com/rivo/tview (go) v0.42.0
github.com/rogpeppe/go-internal (go) v1.16.0
github.com/rs/cors (go) v1.11.1
github.com/rudderlabs/analytics-go (go) v3.3.3+incompatible
github.com/santhosh-tekuri/jsonschema/v5 (go) v5.3.1
github.com/sony/gobreaker/v2 (go) v2.4.0
github.com/sourcegraph/conc (go) v0.3.1-0.20240121214520-5f936abd7ae8
github.com/spf13/afero (go) v1.15.0
github.com/spiffe/go-spiffe/v2 (go) v2.8.1
github.com/stoewer/go-strcase (go) v1.3.1
github.com/stretchr/testify (go) v1.12.1
github.com/tidwall/pretty (go) v1.2.1
github.com/tidwall/sjson (go) v1.2.5
github.com/twmb/franz-go (go) v1.21.6
github.com/twmb/franz-go/pkg/kadm (go) v1.18.0
github.com/twmb/franz-go/plugin/kzap (go) v1.1.2
go.elastic.co/ecszap (go) v1.0.3
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc (go) v0.71.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (go) v0.71.0
go.opentelemetry.io/contrib/instrumentation/runtime (go) v0.71.0
go.opentelemetry.io/contrib/propagators/autoprop (go) v0.71.0
go.opentelemetry.io/contrib/propagators/b3 (go) v1.46.0
go.opentelemetry.io/otel (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp (go) v1.46.0
go.opentelemetry.io/otel/exporters/prometheus (go) v0.68.0
go.opentelemetry.io/otel/metric (go) v1.46.0
go.opentelemetry.io/otel/sdk (go) v1.46.0
go.opentelemetry.io/otel/sdk/metric (go) v1.46.0
go.opentelemetry.io/otel/trace (go) v1.46.0
Files by Type (count)
YAML
683
Go
542
JSON
387
Other (.adoc)
159
Other (.input)
112
Text
80
Other (.golden)
61
Shell
51
Other (.png)
37
Other (no ext)
32
Markdown
25
Other (.tpl)
25
Files by Type (size)
Go
6MB
Text
1MB
JSON
1MB
YAML
970KB
Other (.adoc)
750KB
HTML
542KB
Other (.golden)
463KB
Other (.input)
149KB
Other (.sum)
144KB
Protocol Buffers
133KB
Shell
85KB
Markdown
59KB

The LLM identified 5 files worth highlighting for reuse:

Implements a two-level bitmap (Roaring bitmap) with meta-level skipping for fast intersections and unions. Uses an arena pool (sync.Pool) to reuse bitmaps and provides marshal/unmarshal for persistence. This is a self-contained, high-performance data structure that can be extracted for any application requiring efficient set operations on large dimensions.

file: internal/ruletable/index/bitmap.go ↗ | tags: #bitmap-index #arena-pool #set-operations

Compiles policy variables by building a dependency graph using gonum/graph, performing topological sort, and detecting cycles. This is a clean, reusable pattern for any system that needs to resolve interdependent expressions or configurations with validation.

file: internal/compile/variables.go ↗ | tags: #dependency-graph #topological-sort #cycle-detection

Defines a custom CEL library with functions for set membership (in, allOf, anyOf, noneOf), IP address ranges, SPIFFE identity matching, hierarchical scope operations, and path manipulation. This is a well-structured, reusable CEL extension that can be integrated into any CEL-based system requiring domain-specific operations.

file: internal/conditions/cerbos_lib.go ↗ | tags: #cel-extension #custom-library #set-operations #ip-matching

Implements a configurable audit log filter that can mask or remove fields from decision logs using JSONPath-like expressions. It uses protobuf reflection and structpb manipulation to selectively scrub sensitive data. This is a self-contained, reusable pattern for any system needing dynamic field-level redaction in audit trails.

file: internal/audit/hub/filter.go ↗ | tags: #audit-filtering #jsonpath #field-masking

A directory watcher that uses polling (fsnotify fallback) with a configurable cooldown period to batch file system events and trigger reloads. It handles debouncing, restart, and error recovery. This is a reusable pattern for any application that needs to detect file changes and trigger actions without overwhelming the system.

file: internal/storage/disk/dirwatch.go ↗ | tags: #file-watcher #debounce #cooldown
Last analyzed: 2026-09-05 15:37:53.863487
Next check: 2026-09-12 15:37:53.858777
$ submit: