An open API service indexing awesome lists of open source software.

https://github.com/imarsman/rbac

An implementation of role-based authentication using Casbin. Allows for pluggable definition of enforcement rules separate from very simple roles package with useful tests that demonstrate basic functionality with benchmarks.
https://github.com/imarsman/rbac

authorization rbac rbac-roles

Last synced: about 1 year ago
JSON representation

An implementation of role-based authentication using Casbin. Allows for pluggable definition of enforcement rules separate from very simple roles package with useful tests that demonstrate basic functionality with benchmarks.

Awesome Lists containing this project

README

          

# RBAC - Role Based Access Control

A simple role-based authentication framework to allow for the use of a Casbin
policy and model configuration with verifications. The setup assumes that users
are defined outside of the policy and that they have a list of known roles that
can be tested against the policy.

The roles_test package gives an example of defining a model and policy, defining
the objects, actions, and roles (instead of users), and loading the model and
policy in the roles package. The tests show how to call the role check and give
an example of how to use a struct to define an object and action to test against
a list of roles, for instance, with HTTP middleware.