Run exploit and abuse-case testing on the Willow RBAC authorization flows in openedx-authz and openedx-platform
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- authorization, backend-api-design, security, testing
Research direction
Start by reviewing the listed AuthZ endpoints and Instructor Dashboard API v2 routes, then inspect the existing authorization tests in openedx-authz and openedx-platform. Build the sandbox dataset with the authz-sandbox-seeder command and add enrolled learners, grade data, and per-course flag settings. Record each prioritized request, response, and verdict; completion means the prioritized scenarios are covered and confirmed vulnerabilities have private reports and regression tests.
Written by the indexing model from the issue text.
Description
Description
The RBAC Willow phases moved authorization decisions to openedx-authz and added enforcement in openedx-platform, most notably in the Instructor Dashboard API v2, with a legacy compatibility path controlled by the authz.enable_course_authoring flag. These changes decide who can see learner data, change grades, manage enrollments and grant roles, so any bypass or privilege escalation has a high impact. Existing unit tests verify the intended behavior, but there has been no dedicated pass that actively tries to break the authorization model.
This task runs a structured security test of the current state, as authorized testing on a local or sandbox environment, to find and document authorization bypasses before they reach production.
Current Behavior
- Tests cover intended permission behavior, but there is no adversarial test plan for the AuthZ API or for the Instructor Dashboard enforcement.
- Past findings (for example, users being able to remove their own admin roles, fixed in
fce0fb4) show that this class of issue can exist and is easy to miss. - The boundary between the legacy role system and AuthZ (flag enabled or disabled per course) has not been attacked deliberately.
Expected Behavior
A documented set of exploit attempts has been executed against the current state, with a verdict for each one (blocked or vulnerable), and every confirmed vulnerability is reported privately and tracked for remediation.
Acceptance Criteria
- A test plan lists the attack scenarios, target endpoints and expected outcomes, and is reviewed before execution.
- Testing runs only on a local or sandbox environment with synthetic data, never on production.
- The test environment is built with the dataset described in Test Dataset, with users covering each profile: platform admin, org admin, course-level roles, and a user without roles.
- Priority
openedx-authzendpoints are attacked (see below), with a verdict for each scenario. - Priority Instructor Dashboard endpoints in
openedx-platformare attacked (see below), with a verdict for each scenario. - Privilege escalation is tested: a user granting themselves a higher role, assigning roles in scopes they do not administer, and removing or demoting their own role or the last admin.
- Scope handling is tested: org-wide and platform-wide glob scopes, malformed or ambiguous scope strings, and access across orgs and courses.
- Object-level access (IDOR) is tested: reading or modifying data of users, learners, orgs or courses that the caller should not reach.
- Unauthenticated and low-privilege access is tested on every priority endpoint.
- Flag and legacy fallback is tested: a user with a legacy role but no AuthZ permission (and the reverse), with the flag enabled and disabled for the course.
- Bypass of the frontend is tested: direct API calls with alternate HTTP methods, and with parameters the frontends never send.
- Input handling is tested: invalid, oversized and malformed identifiers and parameters.
- Each attempt is recorded with the request, the observed response and the verdict (blocked or vulnerable).
- Confirmed vulnerabilities are reported through the project's security process (not in public comments), with severity and a remediation issue.
- Regression tests are added for every confirmed vulnerability and for each high-risk scenario that was blocked.
- Optional endpoints are tested only after all priority ones are complete, and are clearly marked as optional in the results.
Priority endpoints: openedx-authz
These endpoints change or expose role assignments and permissions, so a bypass here has the highest impact.
-
PUT /api/authz/v1/roles/users/andDELETE /api/authz/v1/roles/users/(assign and remove roles) -
GET /api/authz/v1/roles/users/(users by role) -
POST /api/authz/v1/permissions/validate/me(permission validation, which the frontends trust) -
GET /api/authz/v1/assignments/(visible assignments, including filtering by scope and org) -
GET /api/authz/v1/users/andGET /api/authz/v1/users/<username>/assignments/(team members and their assignments)
Priority endpoints: openedx-platform (Instructor Dashboard API v2)
Base path /api/instructor/v2/courses/<course_id>/. These endpoints manage the course team, change grades and learner state, or expose learner data.
-
team,team/rolesandteam/<email_or_username>(read, add and remove course team members and roles) -
enrollments/modifyandbeta_testers/modify(change learner enrollment) -
<problem>/grading/scores(score override),<problem>/grading/scores/rescore,<problem>/grading/attempts/resetand<problem>/grading/state(destructive grading actions) -
learners/<email_or_username>(learner details) -
grading-configandproblems/<location> -
GET /(course metadata, which exposes the permissions the user holds in the dashboard) -
enrollments(learner list)
Optional endpoints
Lower expected risk or a smaller exposed surface. Test them only if the priority scenarios are complete.
openedx-authz
-
GET /api/authz/v1/roles/ -
GET /api/authz/v1/scopes/ -
GET /api/authz/v1/orgs/ -
POST /api/authz/v1/users/validate/ - The course authoring waffle flag states endpoint
- Loading a malicious or conflicting authorization schema or role extension (including priority conflicts)
openedx-platform (Instructor Dashboard API v2)
-
instructor_tasks,tasks/<task_id>and report downloads and generation -
change_due_date,unit extensionsandgraded subsectionsendpoints
Test Dataset
The seed_sandbox_data management command from authz-sandbox-seeder can be used to build the environment, with some limitations to cover.
What it provides:
- It creates organizations, courses, users and AuthZ role assignments from a JSON fixture, and is idempotent (
--resetand--reset-onlyallow clean re-runs). - Its bundled
sandbox_seed_data_bulk.jsonfixture (now the default) includes users with no roles, one role and several roles, and a mix of course-level and org or platform glob scopes. This is enough to test cross-org and cross-course access and glob scope matching. - It accepts a custom fixture through
--data-file, so specific attack profiles can be added (for example, a user with a role in only one course, or users with a role in one org and none in another).
What it does not cover and must be added:
-
Learners: it does not enroll users in courses, and several Instructor Dashboard scenarios (learner details, grading actions, enrollment changes) need enrolled learners, course content and grade data.
-
Feature flag: it does not enable
authz.enable_course_authoring, which must be set explicitly per course for each scenario, including a course with the flag disabled to test the legacy fallback. -
Decide whether to extend the seeder (learner enrollment and grades) or to add a separate script for the data it does not create.
Out of Scope
- Denial of service and load testing (covered by the performance testing issue).
- Policy cache loading and reload behavior.
- Content libraries and Studio course authoring endpoints, unless a specific test is justified and added explicitly.
- Infrastructure, network and dependency vulnerability scanning.
- Frontend (MFE) vulnerabilities, other than bypassing the frontend to reach the APIs directly.
- Testing against production or shared environments.
Dependencies
- Related to the Willow RBAC phases tracked for
openedx-authzandopenedx-platform.
- Dominant language
- Python
- Stars
- 0
- Forks
- 10
- Avg merge
- 5d 11h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from openedx/openedx-authz
-
Add a course permission check to ContainerChildrenViewPossibly taken @BryanttV claimed this 7 days ago. Openwillow
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openedx/openedx-authz#604 · 1 assignee ·
Maintainers usually reply within 1 day
-
Allow Course Editors to import YouTube transcripts and surface errorsPossibly taken @efortish claimed this 7 days ago. Openwillow
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openedx/openedx-authz#597 · 1 assignee ·
Maintainers usually reply within 1 day
-
willow
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openedx/openedx-authz#579 ·
Maintainers usually reply within 1 day
-
Add `hidden` property to permission categories and permissionsPossibly taken @BryanttV claimed this 1 day ago. Open
openedx/openedx-authz#632 · 1 assignee ·
Maintainers usually reply within 1 day
-
Run performance tests on the Willow RBAC authorization flows in openedx-authz and openedx-platformOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
openedx/openedx-authz#630 ·
Maintainers usually reply within 1 day
All issues in openedx/openedx-authz
Similar issues
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Internal ErrorOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
frappe/frappe_docker#2071 ·
Maintainers usually reply within 1 day
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·
-
comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#157702 ·
Maintainers usually reply within 1 day