Run exploit and abuse-case testing on the Willow RBAC authorization flows in openedx-authz and openedx-platform
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 10
- Merge medio
- 5 d 11 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openedx/openedx-authz
-
Add a course permission check to ContainerChildrenViewPosiblemente ocupada @BryanttV la tomó hace 7 días. Abiertowillow
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openedx/openedx-authz#604 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Allow Course Editors to import YouTube transcripts and surface errorsPosiblemente ocupada @efortish la tomó hace 7 días. Abiertowillow
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openedx/openedx-authz#597 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
willow
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
openedx/openedx-authz#579 ·
Los mantenedores suelen responder en 1 día
-
Add `hidden` property to permission categories and permissionsPosiblemente ocupada @BryanttV la tomó hace 2 días. Abierto
openedx/openedx-authz#632 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Run performance tests on the Willow RBAC authorization flows in openedx-authz and openedx-platformAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
openedx/openedx-authz#630 ·
Los mantenedores suelen responder en 1 día
Todos los issues de openedx/openedx-authz
Issues similares
-
CI flake: test-windows times out spawning Node in tests/test_antigravity_node_hooks.py (develop red)Abiertoarea/ci P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
benchmark
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mozilla-ai/cq#601 ·
Los mantenedores suelen responder en 1 día
-
Bump Python to 3.14 or 3.15Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día