openedx / openedx/openedx-authz

Manage attribute checks in addition to RBAC checks

Open
#87 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #101 by @MaferMazu — closed without merging
code health enhancement
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.