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.
- Host: GitHub
- URL: https://github.com/imarsman/rbac
- Owner: imarsman
- License: apache-2.0
- Created: 2021-04-30T15:34:38.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-01T16:22:14.000Z (about 5 years ago)
- Last Synced: 2025-02-17T05:11:18.540Z (over 1 year ago)
- Topics: authorization, rbac, rbac-roles
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.