Skip to content

docs: add ADR 0029 Tutor Implementation for authz schema discovery - #519

Open
carlos-marquez-wgu wants to merge 1 commit into
openedx:mainfrom
WGU-Open-edX:carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery
Open

carlos-marquez-wgu wants to merge 1 commit into
openedx:mainfrom
WGU-Open-edX:carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery

Conversation

@carlos-marquez-wgu

@carlos-marquez-wgu carlos-marquez-wgu commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds ADR-0029 which defines how the Tutor implementation for authorization schema discovery works.

Authorization schema discovery already proposed a Tutor patch route in ADR 0019 and ADR 0023. This ADR fills the gap of how we feed the resulting authz schema YAML file to be discoverable.

The proposal includes adding a new Django setting for discovery to find the file, which needs to be an absolute filesystem path, and then using a Tutor plugin to place the rendered patch (openedx-authz-schema) where it can be found by this setting.

I also include two rejected alternatives: riding an existing installed package that Tutor already mounts files to, and scanning /openedx/config/ which already contains unrelated YAML configurations shipped by Tutor.

Key decisions

  • Create a Tutor plugin in https://github.com/openedx/openedx-tutor-plugins
  • Add new Django setting OPENEDX_AUTHZ_SCHEMA_FILES
  • Treat schema resources as multi-document YAML streams so multiple plugin contributions survive concatenation
  • Updates to discovery.py (filesystem paths) and loading.py (multi-document parsing)

Merge checklist:
Check off if complete or not applicable:

  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 7, 2026
@openedx-webhooks

openedx-webhooks commented Oct 7, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @carlos-marquez-wgu!

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.

@carlos-marquez-wgu
carlos-marquez-wgu marked this pull request as ready for review October 7, 2026 22:00
@carlos-marquez-wgu
carlos-marquez-wgu force-pushed the carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery branch from 9011dc1 to 0b554ba Compare October 7, 2026 22:01
Comment thread docs/decisions/0028-tutor-implementation-authz-schema-discovery.rst Outdated
@carlos-marquez-wgu
carlos-marquez-wgu force-pushed the carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery branch 2 times, most recently from 48964de to 3cc4788 Compare October 7, 2026 23:16

@rodmgwgu rodmgwgu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this approach, thanks!

@BryanttV BryanttV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @carlos-marquez-wgu! I just have a couple of comments.

we should update the ADR number, since 0028 is already taken.

Comment on lines +53 to +55
We will add an ``OPENEDX_AUTHZ_SCHEMA_FILES`` Django setting: a list of absolute filesystem paths, each naming one schema file. Discovery will read each listed file directly.

This will require ``src/openedx_authz/engine/schema/discovery.py`` to read from absolute filesystem paths.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An absolute-path schema file has no package or module. How would we obtain the (distribution, module, resource_path) source record that ADRs 0019 and 0025 require?

@carlos-marquez-wgu carlos-marquez-wgu Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question

I propose we use a sentinel value for distribution and the absolute filesystem path for module and resource_path:

  • distribution = <tutor-patch>
  • module = the absolute path of the file
  • resource_path = same absolute path (redundant for filesystem sources, but consistent with the model)
  • distribution_version = 0.0.0 (Sentinel value - filesystem sources have no package version, and 0.0.0 signals that unambiguously.)

For our tutor plugin, the absolute path will be /openedx/config/authz-schema.yml, it works for identity because it's stable within a deployment, and it naturally extends if OPENEDX_AUTHZ_SCHEMA_FILES ever lists multiple files contributed by third party plugins / patches.

How does this sound?

pd: ADR number updated 😄

@carlos-marquez-wgu
carlos-marquez-wgu force-pushed the carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery branch from 3cc4788 to 9a3218b Compare October 8, 2026 23:30
@carlos-marquez-wgu carlos-marquez-wgu changed the title docs: add ADR 0028 Tutor Implementation for authz schema discovery docs: add ADR 0029 Tutor Implementation for authz schema discovery Oct 8, 2026
@carlos-marquez-wgu
carlos-marquez-wgu force-pushed the carlos-marquez-wgu/adr-0028-tutor-implementation-schema-discovery branch from 9a3218b to db3711b Compare October 8, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

tutor: Implement the patch support to add custom schemas via tutor.

4 participants