openedx / openedx/openedx-authz
Manage attribute checks in addition to RBAC checks
Nobody has claimed this yet.
- #101 by @MaferMazu — closed without merging
- Dominant language
- Python
- Stars
- 0
- Forks
- 9
- Avg merge
- 13d 9h
- Merged PRs (30d)
- 9
Description
Situation
In the current library's permission system, we use Bridgekeeper to implement rules that are checked at enforcement points to make decisions. Those rules are a combination of role checks with attribute/context checks.
Our current matcher only supports explicit role assignment (with the permissions of the role and with inheritance of roles).
We need a way to perform attribute/context checks at our enforcement points, ideally using Casbin.
Examples of usage
CAN_CREATE_CONTENT_LIBRARY
Conditions: global_staff or course_creator.
CAN_VIEW_THIS_CONTENT_LIBRARY
Conditions: global staff, attribute ‘allow_public_read’, explicit read permissions (admin, author, read).
References
- Libraries Roles and Permissions Migration Plan: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5252317270/Libraries+Roles+and+Permissions+Migration+Plan#Permissions-and-validations
- AuthZ Long-Term (bridgekeeper): https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5210112002/Open+edX+AuthZ+Framework+Long-Term+Vision#What-about-Bridgekeeper%3F
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openedx/core/djangoapps/content_libraries/permissions.py and compare CAN_CREATE_CONTENT_LIBRARY with CAN_VIEW_THIS_CONTENT_LIBRARY. Review the referenced Bridgekeeper and AuthZ migration materials, plus closed pull request #101, to understand the intended direction. Done means enforcement points can evaluate both role assignments and the listed attribute/context conditions, including the global_staff, course_creator, allow_public_read, and explicit permission cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- authorization, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100