Skip to content
/ rbac-abac Public

An example implementation of RBAC and ABAC with Casbin

License

Notifications You must be signed in to change notification settings

nav/rbac-abac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBAC-ABAC

An example implementation of Role Based Access Control and Attribute Based Access Control using Python implementation of Casbin.

Components

There are three main files in the project:

  • model.conf
  • policy.csv
  • entities.py
  • conftest.py
  • tests.py

model.conf

This file contains the model defintion and rules to be used to enforce policies defined in the policy.csv file.

policy.csv

This file contains all the policies that can be applied when enforcing set of rules defined in the file above.

entities.py

This file contains Entites to be used in the authorization domain.

conftest.py

This file contains test fixtures used by pytest.

tests.py

This file contains tests to verify and validate rules evaluated by Casbin engine.

Run tests

pipenv install --dev
pipenv shell
pytest tests.py

About

An example implementation of RBAC and ABAC with Casbin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages