flâneur — a map of the web's best reading

How It Works | Casbin

casbin.org · 489 words · saved by 1 readers

In Casbin, an access control model is abstracted into a CONF file based on the PERM metamodel (Policy, Effect, Request, Matchers). Switching or upgrading the authorization mechanism for a project is as simple as modifying a configuration. You can customize your own access control model by combining the available models. For example, you can combine RBAC roles and ABAC attributes together inside one model and share one set of policy rules. The PERM model is composed of four foundations: Policy, Effect, Request, and Matchers. These foundations describe the relationship between resources and users. Defines the request parameters. A basic request is a tuple object, requiring at least a subject (accessed entity), object (accessed resource), and action (access method). For instance, a request definition may look like this: r={sub,obj,act} This definition specifies the parameter names and ordering required by the access control matching function. Defines the model for the access strategy. It

On this page In Casbin, access control is expressed as CONF files based on the PERM metamodel (Policy, Effect, Request, Matchers) . Changing how authorization works in your project is a matter of editing a configuration file. You can build custom models by combining components—for example, RBAC roles with ABAC attributes in a single model and policy set. The PERM model has four parts: Request , Policy , Effect , and Matchers . Together they define how users and resources interact. Request ​ The request definition specifies the parameters of an access request. A basic request is a tuple of thre

Explore this link on the map →

related reading