Run exploit and abuse-case testing on the Willow RBAC authorization flows in openedx-authz and openedx-platform
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- authorization, backend-api-design, security, testing
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 10
- Merge medio
- 5g 11h
- PR unite (30g)
- 25
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openedx/openedx-authz
-
Add a course permission check to ContainerChildrenViewForse già presa @BryanttV l’ha presa 7 giorni fa. Apertawillow
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openedx/openedx-authz#604 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Allow Course Editors to import YouTube transcripts and surface errorsForse già presa @efortish l’ha presa 7 giorni fa. Apertawillow
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openedx/openedx-authz#597 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
willow
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
openedx/openedx-authz#579 ·
I maintainer di solito rispondono entro 1 giorno
-
Add `hidden` property to permission categories and permissionsForse già presa @BryanttV l’ha presa 1 giorno fa. Aperta
openedx/openedx-authz#632 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Run performance tests on the Willow RBAC authorization flows in openedx-authz and openedx-platformAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
openedx/openedx-authz#630 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openedx/openedx-authz
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
mozilla-ai/cq#601 ·
I maintainer di solito rispondono entro 1 giorno
-
Bump Python to 3.14 or 3.15Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
intcomma returns exponential notation for large floatsForse già presa @Omarinho12345 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python-humanize/humanize#521 ·
I maintainer di solito rispondono entro 1 giorno
-
LUCJ pass manager raises NoEdgeBetweenNodes when an edge is bad for two two-qubit gatesForse già presa @hat-im l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itForse già presa @paulo-0308 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Diaoul/subliminal#1405 ·