Skip to content

docs: define REST API ownership and visibility extension - #390

Open
mariajgrimaldi wants to merge 6 commits into
mainfrom
MJG/authz-domain-adrs
Open

docs: define REST API ownership and visibility extension#390
mariajgrimaldi wants to merge 6 commits into
mainfrom
MJG/authz-domain-adrs

Conversation

@mariajgrimaldi

@mariajgrimaldi mariajgrimaldi commented Aug 17, 2026

Copy link
Copy Markdown
Member

Description

Before reading these ADRs please review the development plan proposal and leave comments!

https://openedx.atlassian.net/wiki/spaces/OEPM/pages/6670319622/Proposal+Role+scope+assignment+visibility+management

This PR documents the path from the temporary Verawood visibility solution to a maintainable backend extension for Willow:

  • ADR 0015 records the Verawood bridge, where the Admin Console reads the course-authoring Waffle flag state and applies visibility rules in the client.
  • ADR 0016 applies domain-driven design to the REST API ownership and package layout. Reusable authorization endpoints remain independent of application-specific rules, while temporary integrations and Admin Console-specific APIs have explicit locations.
  • ADR 0017 defines a domain-neutral visibility contract based on input, domain-owned processing, and output. Reusable endpoints use the returned result without importing domain code or interpreting its decisions.

The ADRs also record two pending Willow decisions. We still need to define how the Admin Console obtains organizations associated with visible course scopes and how unscoped permission requests provide enough information for course visibility. Both must be resolved where the Admin Console depends on them before the temporary flag-state endpoint is removed.

This PR changes documentation only. The backend filter, its course-authoring implementation, API integration, and frontend cleanup will follow after the ADRs are accepted.

Supporting information

mariajgrimaldi and others added 5 commits August 17, 2026 15:00
…line

ADR 0016 records the domain-ownership audit of openedx_authz.rest_api:
which endpoints are Authorization's own data, which is the one
exception (WaffleFlagStatesAPIView), and why generic endpoints must not
depend on another domain's concepts (the rationale PR #361 ran into).

ADR 0017 names the package-layout convention the admin_console/ and
course_authoring/ subpackages apply, so a future endpoint has a
placement rule instead of a fresh discussion.

ADR 0015 gains an addendum reflecting ADR 0016's conclusion, the actual
toggle_target_removal_date (2027-06-09) and upstream tracking issue for
the flag, and the confirmed details of openedx-platform's own
ToggleStateView as prior art for the rejected /api/toggles/v0/state/
alternative.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds two consequences: callers must resolve their own scope against the
raw override lists (course -> org -> global precedence), with
frontend-app-admin-console's useCourseAuthoringFlag hook (PR #176) as the
reference implementation, and the endpoint takes no client-supplied
parameters, so CSRF doesn't apply since it's GET-only and IsAuthenticated
is what actually gates access.
The concern isn't request forgery, this is a GET endpoint with no
client-supplied parameters to forge. It's that the response isn't scoped
per caller: any authenticated user gets every org/course override on the
instance, with no additional permission check beyond IsAuthenticated.

Also trims the Consequences and Addendum prose, which had grown longer
than this repo's established ADR style (see docs/decisions/0012 and 0014
for reference).
Drop the "Decision item 4 said/left" framing: an ADR should state its
current position directly, not cite an earlier numbered item by name as
if quoting it. Also fixes a comma splice and cuts an unnecessary
"not by caller" contrastive clause.
ADR 0018 records the Open edX Filter mechanism: the shared
AuthorizationDataRequested contract, the per-endpoint integration points,
and the course-authoring pipeline step's location and opt-in nature. ADR
0016's decisions 3 and 4 are corrected to reflect that the pipeline step
implementation lives in this repo, not in the calling application.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Aug 17, 2026
@openedx-webhooks

openedx-webhooks commented Aug 17, 2026

Copy link
Copy Markdown

Thanks for the pull request, @mariajgrimaldi!

This repository is currently maintained by @openedx/committers-openedx-authz.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Aug 17, 2026
@mariajgrimaldi
mariajgrimaldi force-pushed the MJG/authz-domain-adrs branch 2 times, most recently from cb3e8a6 to 26bc34a Compare August 18, 2026 10:01
@mariajgrimaldi mariajgrimaldi linked an issue Aug 18, 2026 that may be closed by this pull request
@mariajgrimaldi mariajgrimaldi changed the title Mjg/authz domain adrs docs: define REST API ownership and visibility extension Aug 18, 2026
@mariajgrimaldi
mariajgrimaldi marked this pull request as ready for review August 18, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

Spike: Backend Endpoint Strategy for Course Authoring Flag

2 participants