For a policy-as-code authorization engine, the first results are casbin/casbin (Casbin is a model-based authorization engine that lets you define access control policies as code in configuration files, supporting RBAC, ABAC, and more, making it a perfect fit for policy-as-code enforcement with a wide ecosystem of adapters and integrations), open-policy-agent/opa and openfga/openfga. cerbos/cerbos and hsluoyz/casbin round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Open-source frameworks and engines for defining, managing, and enforcing fine-grained authorization policies across distributed systems.
Casbin is an authorization library that provides a model-based engine for enforcing access control across diverse application environments. It decouples authorization logic from application code by using a configuration-driven approach, allowing developers to define access rules and evaluation logic independently. The system supports a wide range of access control models, including role-based, attribute-based, and relationship-based patterns, which are evaluated at runtime to determine if a subject is permitted to perform an action on a resource. The project distinguishes itself through a hig
Casbin is a model-based authorization engine that lets you define access control policies as code in configuration files, supporting RBAC, ABAC, and more, making it a perfect fit for policy-as-code enforcement with a wide ecosystem of adapters and integrations.
This project is a unified, cloud-native policy engine designed to decouple authorization and security logic from application codebases. It functions as a centralized authorization service that evaluates structured input data against declarative rules, enabling consistent policy enforcement across microservices, infrastructure, and continuous integration pipelines. The engine utilizes a specialized logic programming language to express complex constraints, which are compiled into an optimized intermediate representation for high-performance evaluation. By supporting both sidecar-based deployme
Open Policy Agent (OPA) is a cloud-native policy engine that uses a dedicated policy language (Rego) to express authorization as code, provides a REST API for decision queries, supports ABAC and decision caching, includes introspection and policy testing tools, and integrates with service meshes and GitOps workflows — exactly the full-featured policy-as-code authorization engine you are looking for.
OpenFGA is a fine-grained authorization server and policy decision point that implements relationship-based access control. It serves as a centralized authorization service for evaluating access requests and managing relationship tuples across distributed microservices and multi-tenant environments. The engine combines relationship graphs with attribute-based access control, using the Common Expression Language to evaluate dynamic runtime attributes and conditional access rules. It handles complex hierarchies and nested permissions by traversing chains of associations and parent-child links t
OpenFGA is a dedicated fine-grained authorization server and policy decision point that uses its own relationship-based model language and the Common Expression Language to evaluate access rules via a REST API, fitting the policy-as-code intent with ABAC support, decision explainability, and shadow-evaluation testing capabilities.
Cerbos is an open-source authorization service that provides a centralized, language-agnostic engine for managing access control. It functions as a policy-as-code platform, allowing teams to define, test, and distribute authorization rules using declarative YAML or JSON configurations. By decoupling access logic from application code, it enables consistent permission enforcement across diverse service stacks. The project distinguishes itself through its ability to translate high-level authorization policies into native database query filters. This capability allows applications to enforce sec
Cerbos is an open-core, language-agnostic authorization engine that lets you write context-aware access control policies as code, with a REST API for decision queries, attribute-based support, a policy test framework, and GitOps-friendly YAML policy files — matching this search for a policy-as-code authorization engine with enforcement and explainability.
Casbin is an authorization library designed to manage application access control and permissions through a configurable model-based engine. It serves as a centralized system for verifying whether a user has permission to perform specific actions on a resource. The engine supports multiple access control models, including Role-Based Access Control, Attribute-Based Access Control, and Access Control Lists. It allows for the definition of role hierarchies and the evaluation of user, resource, and environment attributes to make access decisions. The library decouples authorization logic from dat
C asbin is a configurable authorization library that lets you define policies in code and evaluate access control decisions using models like RBAC and ABAC, making it a strong fit for policy-as-code — though it is a library to embed rather than a standalone REST API service.
Ory Keto is an open-source authorization server that implements Google Zanzibar’s relationship-based access control model. It stores every access relationship as a tuple in a SQL database and exposes a declarative TypeScript-like namespace language for defining object types, relations, and permissions. The service provides bidirectional permission resolution, configurable consistency levels for checks, and dual gRPC and REST APIs for broad integration. Keto extends the Zanzibar model with edge enforcement of access policies, structured compliance auditing of permission decisions, and infrastr
Ory Keto is an authorization server that implements Zanzibar-style relationship-based access control with a declarative namespace language, exposing a REST and gRPC API for permission queries—it squarely fits the policy-as-code authorization engine category, though it may not cover every requested feature such as decision caching or policy testing tools.
Conftest is a suite of tools designed for validating structured configurations, testing policy logic, and generating policy documentation. It serves as a configuration file validator that checks YAML, JSON, and Helm charts for security violations and compliance issues using declarative rules. The project functions as an Open Policy Agent testing tool, allowing structured configuration files to be validated against custom policies written in Rego. It includes a policy-as-code testing framework to ensure policy logic is correct and a utility to extract metadata from Rego code to create static m
Conftest validates configuration files against Rego policies for security and compliance, but it does not evaluate authorization decisions in real time via a REST API, which is the core capability of a policy-as-code authorization engine.
Envoy is a high-performance, cloud-native service proxy designed for service-to-service communication in distributed architectures. It functions as a service mesh data plane, providing a centralized mechanism for managing, securing, and observing network traffic between microservices. The project is distinguished by its ability to perform dynamic traffic management and configuration updates in real-time without requiring service restarts or downtime. It utilizes a non-blocking, event-driven architecture to handle high-concurrency connections and supports hot-restart process management, which
Envoy is a service proxy that can enforce access control decisions through external authorization hooks, but it is not a policy-as-code engine itself—it lacks the dedicated policy language, evaluation, and introspection tools this search targets.
The Common Expression Language specification is a formal standard for a non-Turing-complete expression language designed for safe, portable, and fast logic evaluation. It serves as a cross-language logic standard and a declarative policy language, providing a consistent semantic framework for executing boolean expressions and data transformations across different programming environments. This specification acts as an embedded expression engine that allows applications to integrate portable logic for evaluating user-defined configurations. It is specifically designed to enable safe user-defin
CEL is a specification for an expression language used in policy evaluation, but it is not a standalone authorization engine with a REST API, decision caching, or the other runtime features this search requires.
Tyk is an open-source API gateway written in Go that routes, secures, and monitors network traffic across REST, GraphQL, TCP, and gRPC protocols. It functions as a multi-protocol proxy designed to deliver requests to backend services while managing the end-to-end API lifecycle. The system distinguishes itself through a plugin-based architecture that allows for the injection of custom logic into the request and response middleware chain. It also features native Kubernetes integration, operating as an ingress controller that uses operators and custom resource definitions to deploy security poli
Tyk is an API gateway that enforces access controls and policies like rate limiting, but it lacks a dedicated policy language like Rego or Cedar and is not itself a standalone policy-as-code authorization engine—it's the adjacent category of an API gateway rather than the core tool you need for expressing and evaluating authorization policies as code.
Pundit is a Ruby authorization framework that implements policy-based access control. It maps domain models to dedicated logic classes that determine whether a user is permitted to perform specific actions on data objects. The framework utilizes plain Ruby objects to decouple authorization logic from the model. It includes mechanisms for data query scoping to filter record collections based on user permissions, as well as attribute-level permission control to restrict which specific model fields a user can modify. The system provides tools for authorization coverage verification to ensure se
Pundit is a Ruby authorization library that lets you define policies as plain Ruby objects and enforce them inside your app, but it is not a standalone engine with a REST API or service mesh integration, so it falls short of the full policy-as-code authorization engine this search is after.
Kyverno is a Kubernetes policy engine and cloud native governance tool. It functions as a policy-as-code framework that validates, mutates, and generates resources to enforce security and governance standards within a cluster. The project distinguishes itself through a declarative policy model that utilizes native Kubernetes custom resource definitions, allowing policies to be managed as standard cluster objects without custom code. It provides specific security capabilities for container image verification and signature validation to ensure only trusted images are deployed. Its broader capa
Kyverno is a Kubernetes-specific policy engine focused on validating, mutating, and generating cluster resources for compliance and security, not a general authorization engine with a policy language and REST API for access control decisions, which makes it a neighbouring tool rather than a direct fit.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| casbin/casbin | 19.8K | Go | apache-2.0 | |
| open-policy-agent/opa | 11.9K | Go | Apache-2.0 | |
| openfga/openfga |
| 4.8K |
| Go |
| apache-2.0 |
| cerbos/cerbos | 4.5K | Go | Apache-2.0 |
| hsluoyz/casbin | 20.2K | Go | Apache-2.0 |
| ory/keto | 5.3K | Go | apache-2.0 |
| open-policy-agent/conftest | 3.1K | Go | other |
| envoyproxy/envoy | 27.6K | C++ | apache-2.0 |
| google/cel-spec | 3.7K | Starlark | apache-2.0 |
| tyktechnologies/tyk | 10.7K | Go | NOASSERTION |