# Authorization patterns

> AI-ranked search results for `authorization guides` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 119 total matches; showing the top 16.

Explore on the web: https://awesome-repositories.com/q/authorization-guides

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/authorization-guides).**

## Results

- [open-policy-agent/opa](https://awesome-repositories.com/repository/open-policy-agent-opa.md) (11,860 ⭐) — 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
- [nestjsx/nest-access-control](https://awesome-repositories.com/repository/nestjsx-nest-access-control.md) (1,156 ⭐) — NestJS Access Control is a role-based and attribute-based authorization framework designed for the NestJS ecosystem. It provides a declarative system for securing application routes and resources, allowing developers to enforce granular access policies through metadata-driven decorators.

The framework distinguishes itself by supporting hierarchical role inheritance, which enables the resolution of complex permission sets by traversing parent and child role relationships. It also facilitates dynamic authorization management, allowing security rules to be loaded asynchronously from external dat
- [hsluoyz/casbin](https://awesome-repositories.com/repository/hsluoyz-casbin.md) (20,189 ⭐) — 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
- [casbin/casbin](https://awesome-repositories.com/repository/casbin-casbin.md) (19,848 ⭐) — 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
- [ory/keto](https://awesome-repositories.com/repository/ory-keto.md) (5,270 ⭐) — 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
- [spatie/laravel-permission](https://awesome-repositories.com/repository/spatie-laravel-permission.md) (12,911 ⭐) — This is a role-based access control system for Laravel applications that manages user permissions and roles within a database. It provides a database permissions manager to assign specific abilities to users and roles, utilizing authorization gates to restrict access to routes and interface elements.

The project features a wildcard permission system that uses pattern matching to grant broad access across multiple related permissions. It also supports team-scoped access control, allowing users to maintain different roles and permission levels across separate organizational contexts or teams.
- [cerbos/cerbos](https://awesome-repositories.com/repository/cerbos-cerbos.md) (4,460 ⭐) — 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
- [logto-io/logto](https://awesome-repositories.com/repository/logto-io-logto.md) (12,161 ⭐) — Logto is an open-source identity provider that serves as a centralized authentication and authorization server for web, mobile, and command-line applications. It implements the OpenID Connect and OAuth 2.1 standards to handle secure user sign-in and the issuance of identity tokens.

The platform is specifically designed as a multi-tenant authentication framework for software-as-a-service environments, featuring built-in organization management and tenant isolation. It includes an enterprise single sign-on gateway to integrate external identity providers and supports role-based access control t
- [authzed/spicedb](https://awesome-repositories.com/repository/authzed-spicedb.md) (6,781 ⭐) — SpiceDB is a distributed permission store and relationship-based access control system. It provides a scalable database for storing and querying fine-grained authorization relationships, implementing a consistency model inspired by Google Zanzibar to manage access rights across large-scale applications.

The system uses a dedicated schema language to define the rules and logic governing how relationships translate into permissions independently of application code. It functions as a pluggable authorization engine that persists relationship tuples in external relational databases such as Postgr
- [aserto-dev/topaz](https://awesome-repositories.com/repository/aserto-dev-topaz.md) (1,343 ⭐) — Cloud-native authorization for modern applications and APIs
- [jeremykenedy/laravel-roles](https://awesome-repositories.com/repository/jeremykenedy-laravel-roles.md) (1,043 ⭐) — This package provides a comprehensive authorization framework for Laravel applications, enabling the management of user roles and granular permissions through a database-driven system. It allows developers to define access levels and assign them to users, ensuring that security policies are enforced consistently across the entire application.

The system distinguishes itself through a hierarchical inheritance model, where permissions automatically propagate from lower-tier roles to higher-tier roles based on a numerical level system. It includes a dedicated administrative web interface that al
- [nathanl/authority](https://awesome-repositories.com/repository/nathanl-authority.md) (1,197 ⭐) — Authority is an authorization framework for Ruby on Rails applications that manages user permissions and access control policies. It provides a system for encapsulating complex security logic into dedicated classes, separating these concerns from core business models.

The library enforces security rules by intercepting web requests at the controller level and validating actions against defined policies. It utilizes convention-based mapping to automatically associate models with their corresponding authorization classes, supporting both global checks and instance-aware validation for specific
- [apache/shiro](https://awesome-repositories.com/repository/apache-shiro.md) (4,432 ⭐) — Shiro is a Java security framework that provides an identity and access manager for implementing authentication, authorization, cryptography, and session management. It serves as a security layer to verify user identities and enforce role-based access control for protected system resources.

The project features a pluggable realm architecture that decouples security logic from identity data and a standalone session management system that tracks user state independently of the underlying servlet container. It includes an integrator for external identity providers using federation protocols such
- [keycloak/keycloak](https://awesome-repositories.com/repository/keycloak-keycloak.md) (34,934 ⭐) — Keycloak is an open-source identity and access management server that provides a centralized platform for user authentication, authorization, and identity federation. It functions as a standards-compliant identity provider, utilizing a centralized engine to validate credentials and issue cryptographically signed tokens based on industry-standard protocols like OpenID Connect and SAML. This enables organizations to secure diverse applications and services through a unified authentication layer.

The platform distinguishes itself through its cloud-native orchestration and high-availability capab
- [palkan/action_policy](https://awesome-repositories.com/repository/palkan-action-policy.md) (1,557 ⭐) — Action Policy is a Ruby authorization framework designed to manage user access and permissions by encapsulating security logic into dedicated policy classes. It provides a structured system for defining access rules that evaluate user actions against specific application resources, ensuring that security logic remains decoupled from the primary application code.

The framework distinguishes itself through its ability to handle complex authorization requirements across diverse interfaces, including web controllers and various API formats. It supports dynamic permission evaluation by utilizing a
- [elabs/pundit](https://awesome-repositories.com/repository/elabs-pundit.md) (8,509 ⭐) — 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
