An example implementation of Role Based Access Control and Attribute Based Access Control using Python implementation of Casbin.
There are three main files in the project:
- model.conf
- policy.csv
- entities.py
- conftest.py
- tests.py
This file contains the model defintion and rules to be used to enforce
policies defined in the policy.csv
file.
This file contains all the policies that can be applied when enforcing set of rules defined in the file above.
This file contains Entites to be used in the authorization domain.
This file contains test fixtures used by pytest
.
This file contains tests to verify and validate rules evaluated by Casbin engine.
pipenv install --dev
pipenv shell
pytest tests.py