Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 927 Bytes

README.md

File metadata and controls

49 lines (30 loc) · 927 Bytes

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