Repository navigation
docs: add ADR 0029 Tutor Implementation for authz schema discovery - #519
Conversation
|
Thanks for the pull request, @carlos-marquez-wgu! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
9011dc1 to
0b554ba
Compare
48964de to
3cc4788
Compare
rodmgwgu
left a comment
There was a problem hiding this comment.
I agree with this approach, thanks!
BryanttV
left a comment
There was a problem hiding this comment.
Thanks, @carlos-marquez-wgu! I just have a couple of comments.
we should update the ADR number, since 0028 is already taken.
| 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 fileresource_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 😄
3cc4788 to
9a3218b
Compare
9a3218b to
db3711b
Compare
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
OPENEDX_AUTHZ_SCHEMA_FILESdiscovery.py(filesystem paths) andloading.py(multi-document parsing)Merge checklist:
Check off if complete or not applicable: