Description
Implement the definition discovery mechanism without hardcoding known modules.
- Discovery mechanism: evaluate whether to use the Python entry points pattern (similar to how Open edX already discovers Django app plugins), or a directory/file convention for YAML files.
- Core self-discovery:
openedx-authz should consume its own role/permission definitions through the same path used for external modules (this is key for the "core and contributed definitions use the same path" requirement).
- Collection: aggregate all discovered definitions in memory before passing them to validation (don't load incrementally without seeing the full set, since there are cross-cutting validations like duplicate detection).
- Early validation: apply the rules defined in the ADR — duplicate identifiers, unsupported scope types, broken references.
- Load error handling: define what happens if a module has an invalid definition — does the whole startup fail, or is that module skipped with an error log?
- Testing: cover with at least one "fake" test module simulating an external contribution, to confirm there's no accidental hardcoding of known module names.
Concrete deliverable: a working mechanism where installing a new Python package with a valid definition is enough for it to be discovered, without touching openedx-authz.
Description
Implement the definition discovery mechanism without hardcoding known modules.
openedx-authzshould consume its own role/permission definitions through the same path used for external modules (this is key for the "core and contributed definitions use the same path" requirement).Concrete deliverable: a working mechanism where installing a new Python package with a valid definition is enough for it to be discovered, without touching
openedx-authz.