openedx-authz 4.0.0__tar.gz → 4.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/CHANGELOG.rst +5 -0
- {openedx_authz-4.0.0/src/openedx_authz.egg-info → openedx_authz-4.2.0}/PKG-INFO +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0012-auditability.rst +9 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0018-authorization-schema-lifecycle.rst +16 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0023-extend-static-roles.rst +11 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0025-authorization-schema-source-tracking.rst +17 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0028-api-contract-for-role-catalog.rst +23 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0034-permission-dependencies-in-authorization-schema.rst +7 -0
- openedx_authz-4.2.0/docs/decisions/0035-custom-role-persistence.rst +205 -0
- openedx_authz-4.2.0/docs/decisions/0036-api-contract-for-custom-roles.rst +312 -0
- openedx_authz-4.2.0/docs/decisions/0037-custom-role-audit-trail.rst +147 -0
- openedx_authz-4.2.0/docs/decisions/0038-hidden-permission-categories-and-permissions.rst +119 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/authorization-schema-json.rst +6 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/authorization-schema.rst +6 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/compiled-schema.yaml +116 -48
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/catalog.py +12 -7
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_authoring/schema/permissions.yaml +29 -32
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_team_roles/schema/legacy_permissions.yaml +1 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/enrollments/schema/permissions.yaml +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_administration/schema/permissions.yaml +8 -12
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_grading/schema/permissions.yaml +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/renderer.py +4 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/authz-schema-v1.json +14 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/loading.py +2 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/types/definitions.py +11 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/utils.py +1 -1
- openedx_authz-4.2.0/src/openedx_authz/migrations/0013_add_hidden_to_categories_and_permissions.py +22 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/schema.py +17 -2
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/admin_console/views.py +14 -11
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/permissions.py +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/views.py +12 -6
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/api/test_catalog.py +51 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/api/test_data.py +17 -12
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/api/test_roles.py +180 -165
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/api/test_users.py +89 -70
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/applets/test_builtin_definitions.py +26 -13
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/applets/test_instructor_dashboard_permissions.py +15 -9
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/admin_console/test_views.py +69 -58
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/mixins.py +15 -11
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/test_views.py +116 -103
- openedx_authz-4.2.0/src/openedx_authz/tests/role_permissions.py +180 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/factories.py +2 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_apply.py +27 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_loading.py +13 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_snapshot.py +2 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_source_storage.py +22 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_syntax.py +10 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_commands.py +2 -2
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_enforcement.py +22 -23
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_engine_utils.py +46 -38
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_migrations.py +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0/src/openedx_authz.egg-info}/PKG-INFO +1 -1
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/SOURCES.txt +5 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/scm_file_list.json +5 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/uv.lock +246 -246
- openedx_authz-4.0.0/src/openedx_authz/tests/role_permissions.py +0 -121
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.annotation_safe_list.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.editorconfig +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/dependabot.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/add-depr-ticket-to-depr-board.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/add-remove-label-on-comment.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/ci.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/commitlint.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/release.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/self-assign-issue.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.github/workflows/upgrade-python-requirements.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.gitignore +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.pii_annotations.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/.readthedocs.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/LICENSE +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/MANIFEST.in +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/Makefile +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/catalog-info.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/codecov.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/Makefile +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/_images/architecture-overview.png +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/_static/theme_overrides.css +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/changelog.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/concepts/core_roles_and_permissions/content_library_roles.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/concepts/core_roles_and_permissions/course_roles.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/concepts/core_roles_and_permissions/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/concepts/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/conf.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0001-purpose-of-this-repo.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0002-authorization-model-foundation.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0003-jwt-usage.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0004-technology-selection.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0005-architecture-and-data-modeling.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0007-enforcement-mechanisms-mfe.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0008-compatibility-scheme.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0009-authz-for-course-authoring.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0010-course-authoring-flag.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0011-course-authoring-migration-process.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0012-glob-support-for-role-assignments.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0013-course-authoring-automatic-migration.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0014-bulk-assignment-queries-without-casbin-enforce.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0015-expose-course-authoring-waffle-flag-state-via-rest-api.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0016-static-and-dynamic-roles.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0017-static-authorization-schema.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0019-authorization-schema-discovery.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0020-authorization-schema-internationalization.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0021-authorization-definition-api.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0022-defer-authorization-implications.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0024-api-contract-for-user-grouped-role-assignments.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0026-rest-api-domain-ownership-boundary.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0027-cross-domain-filtering-via-openedx-filters.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0029-paragon-icon-list-maintenance.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0030-tutor-implementation-authz-schema-discovery.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0031-priority-applies-to-role-extensions-only.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0032-applets-for-built-in-authorization-capabilities.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0033-shared-applet-for-course-team-roles.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/getting_started.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/how-tos/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/how-tos/use-built-in-constants.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/internationalization.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/make.bat +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/quickstarts/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/readme.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/built-in-constants.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/compiled-schema.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/references/index.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/testing.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/manage.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/pylintrc +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/pylintrc_tweaks +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/pyproject.toml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/ruff.toml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/scripts/generate_compiled_schema.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/scripts/generate_paragon_icons.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/setup.cfg +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/admin.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/data.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/permissions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/roles.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/users.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/api/utils.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/content_libraries/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/content_libraries/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/content_libraries/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/content_libraries/schema/permissions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/content_libraries/schema/roles.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_authoring/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_authoring/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_authoring/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_authoring/schema/role_extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_team_roles/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_team_roles/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_team_roles/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/course_team_roles/schema/roles.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/enrollments/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/enrollments/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/enrollments/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/enrollments/schema/role_extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_administration/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_administration/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_administration/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_administration/schema/role_extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_grading/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_grading/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_grading/constants.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/applets/learner_grading/schema/role_extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/apps.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/authz/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/conf/locale/config.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/constants/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/constants/permissions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/constants/roles.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/constants/schema.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/data.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/adapter.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/apps.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/config/model.conf +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/enforcer.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/filter.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/matcher.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/policy.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/compilation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/discovery.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/exceptions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/issues.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/paragon_icons.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/parsing.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/pipeline.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/snapshot.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/syntax.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/translation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/types/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/types/compilation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/types/loading.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/engine/schema/validation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/filters.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/handlers.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/authz_migrate_course_authoring.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/authz_rollback_course_authoring.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/enforcement.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/extract_schema_translations.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/load_authz_schema.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/management/commands/load_policies.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0001_add_casbin_dependency.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0002_initial.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0003_usersubject.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0004_contentlibraryscope.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0005_policycachecontrol.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0006_migrate_legacy_permissions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0007_coursescope.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0008_authzcourseauthoringmigrationrun.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0009_roleassignmentaudit.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0010_scope_external_key.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0011_authz_schema_definitions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/0012_move_builtin_schema_sources_to_applets.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/migrations/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/authz_migration.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/base.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/core.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/engine.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/scopes.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/models/subjects.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/data.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/decorators.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/urls.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/utils.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/admin_console/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/admin_console/filters.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/admin_console/serializers.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/course_authoring/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/course_authoring/pipeline.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/course_authoring/views.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/fields.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/paginators.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/serializers.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/rest_api/v1/urls.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/settings/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/settings/common.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/settings/production.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/settings/test.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/templates/openedx_authz/base.html +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/api/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/applets/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/authz/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/authz/test_resources.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/conftest.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_compiled/categories.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_compiled/extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_compiled/permissions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_compiled/roles.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_parse/malformed.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_semantics/unknown_category.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_structure/items.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/invalid_structure/priority.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/valid/categories.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/valid/extensions.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/valid/permissions.yml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/fixtures/schema_pipeline/valid/roles.yaml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/test_handlers.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/test_models.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/test_schema_apply.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/test_schema_pipeline.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/integration/test_views.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/admin_console/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/course_authoring/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/course_authoring/test_pipeline.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/course_authoring/test_views.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/test_permissions.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/rest_api/test_utils.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_compilation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_discovery.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_json_schema.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_load_authz_schema_command.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_parsing.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_pipeline.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_renderer.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_schema_models.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_translation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_types.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/schema/test_validation.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/apps.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/migrations/0001_initial.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/migrations/0002_learningpackage_contentlibrary_learning_package.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/migrations/0002_userprofile.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/stubs/models.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_enforcer.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_filter.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_handlers.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_imports.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_models.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_policy.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/tests/test_utils.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/urls.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz/utils.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/dependency_links.txt +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/entry_points.txt +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/requires.txt +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/src/openedx_authz.egg-info/top_level.txt +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tox.ini +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/.gitignore +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/LICENSE.txt +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/MANIFEST.in +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/Makefile +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/README.rst +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/pyproject.toml +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/tutor_authz/__about__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/tutor_authz/__init__.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/tutor_authz/patches/openedx-common-settings +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/tutor_authz/plugin.py +0 -0
- {openedx_authz-4.0.0 → openedx_authz-4.2.0}/tutor/tutor-contrib-authz/tutor_authz/templates/apps/openedx/config/authz-schema.yml +0 -0
|
@@ -17,6 +17,10 @@ Unreleased
|
|
|
17
17
|
Added
|
|
18
18
|
=====
|
|
19
19
|
|
|
20
|
+
* Added an optional ``hidden`` flag to permission categories and permissions in the authorization
|
|
21
|
+
schema. Hidden permissions, and the permissions of hidden categories, are left out of the
|
|
22
|
+
role and permission catalog, including each role's permission list, but keep their role grants
|
|
23
|
+
and permission checks.
|
|
20
24
|
* Added the static authorization schema, a versioned YAML format for declaring permissions,
|
|
21
25
|
permission categories, roles, and role extensions (ADR 0017). The permissions and roles
|
|
22
26
|
previously defined in ``authz.policy`` are expressed as schema files under
|
|
@@ -56,6 +60,7 @@ Added
|
|
|
56
60
|
Changed
|
|
57
61
|
========
|
|
58
62
|
|
|
63
|
+
* Updated the course permission categories and permissions to match the Roles and Permissions console proposal. ``View course info`` and ``View checklists`` move to ``Course access & content``, ``Export tags`` moves to ``Tags``, and the group configuration permissions move to ``Cohorts & content groups``. The ``course_information`` and ``course_other`` categories are removed. ``Course team & groups``, ``Grading``, ``Advanced & certificates``, and ``Import / export`` are renamed, the category IDs ``course_cohorts``, ``course_team_group``, ``course_grading``, and ``course_advanced_certificates`` become ``course_cohorts_content_groups``, ``course_team``, ``course_grading_settings``, and ``course_advanced_settings_certificates``, and several category and permission descriptions now name Studio and the Instructor Dashboard. ``courses.manage_taxonomies`` is now hidden. Role grants are unchanged.
|
|
59
64
|
* Static roles may declare an empty permission list when ``role_extensions`` contribute their permissions. Permission lists used by extension edits remain non-empty.
|
|
60
65
|
* Built-in Content Library and course authorization definitions now live in capability applets. The compiled authorization schema, the permission constants, and the role keys remain unchanged.
|
|
61
66
|
* **Breaking**: ``GET /api/authz/v1/scopes/`` no longer accepts ``course`` and ``library`` as
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openedx-authz
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0
|
|
4
4
|
Summary: Open edX AuthZ provides the architecture and foundations of the authorization framework.
|
|
5
5
|
Author-email: Open edX Project <oscm@openedx.org>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -188,6 +188,13 @@ Rejected for three reasons:
|
|
|
188
188
|
``django-simple-history`` remains the right tool for Option B (point-in-time state
|
|
189
189
|
reconstruction), where it is a snapshot mechanism, not an operation log.
|
|
190
190
|
|
|
191
|
+
Addendum (2026-11-09)
|
|
192
|
+
*********************
|
|
193
|
+
|
|
194
|
+
`ADR 0037`_ records custom role changes in a separate ``RoleDefinitionAudit`` table and adds a
|
|
195
|
+
nullable ``role_change_id`` to ``RoleAssignmentAudit`` and the assignment event data. It links
|
|
196
|
+
assignments deleted by removing a role to that role change.
|
|
197
|
+
|
|
191
198
|
References
|
|
192
199
|
**********
|
|
193
200
|
|
|
@@ -199,10 +206,12 @@ References
|
|
|
199
206
|
- `django-simple-history documentation`_
|
|
200
207
|
- `django-crum documentation`_
|
|
201
208
|
- `OEPM-Spike: RBAC AuthZ Auditability`_
|
|
209
|
+
- `ADR 0037`_
|
|
202
210
|
|
|
203
211
|
.. _ADR 0002: https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0002-authorization-model-foundation.rst
|
|
204
212
|
.. _ADR 0004: https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0004-technology-selection.rst
|
|
205
213
|
.. _ADR 0005: https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0005-architecture-and-data-modeling.rst
|
|
214
|
+
.. _ADR 0037: 0037-custom-role-audit-trail.rst
|
|
206
215
|
.. _Auth0 FGA Logging API: https://auth0.com/blog/auth0-fga-logging-api-a-complete-audit-trail-for-authorization/
|
|
207
216
|
.. _SpiceDB: https://github.com/authzed/spicedb
|
|
208
217
|
.. _OpenFGA: https://openfga.dev/
|
{openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0018-authorization-schema-lifecycle.rst
RENAMED
|
@@ -126,13 +126,27 @@ Compile, render, apply, and consume keep the responsibilities defined above. Typ
|
|
|
126
126
|
|
|
127
127
|
The separation adds an intermediate parsed-document representation and another explicit pipeline boundary. Callers that previously treated loading as both YAML parsing and typed construction must use the corresponding phase for the representation they need.
|
|
128
128
|
|
|
129
|
+
Addendum: Reserved prefix replaces runtime role name conflicts
|
|
130
|
+
==============================================================
|
|
131
|
+
|
|
132
|
+
**2026-11-12**
|
|
133
|
+
|
|
134
|
+
`ADR 0035`_ sets the naming rule for dynamic roles that section 4 left out of scope. Custom (dynamic) role IDs use the reserved ``custom_`` prefix, and schema validation rejects static role IDs that start with it.
|
|
135
|
+
|
|
136
|
+
As a result, a static role and a custom role can no longer share a name. The following parts of section 4 no longer apply:
|
|
137
|
+
|
|
138
|
+
* The dynamic role API does not need to reject names used by static roles.
|
|
139
|
+
* Deployment does not stop because a new static role conflicts with an existing dynamic role. A static role ID that starts with ``custom_`` fails schema validation instead, before any database change.
|
|
140
|
+
|
|
141
|
+
Static and dynamic roles still share one set of role IDs, and uniqueness among dynamic roles is still enforced when they are created.
|
|
142
|
+
|
|
129
143
|
Consequences
|
|
130
144
|
************
|
|
131
145
|
|
|
132
146
|
* Deployment compiles the schema before the application begins serving requests for reliability and performance.
|
|
133
147
|
* Repeating a deployment creates no duplicate rows and preserves data owned by runtime services.
|
|
134
148
|
* The schema loader, dynamic role API, and assignment API can update only the rows they own.
|
|
135
|
-
* Role identifier conflicts are reported before either definition is changed.
|
|
149
|
+
* Role identifier conflicts are reported before either definition is changed. Conflicts between static and dynamic roles are prevented by the reserved ``custom_`` prefix (see the addendum on `ADR 0035`_).
|
|
136
150
|
* Applying a schema requires a database transaction or another mechanism that updates all generated rows together.
|
|
137
151
|
* Operators receive the change report before the database is updated.
|
|
138
152
|
* An assignment to a role being removed blocks deployment unless an operator explicitly removes the role and its assignments together.
|
|
@@ -146,3 +160,4 @@ References
|
|
|
146
160
|
|
|
147
161
|
.. _ADR 0016: 0016-static-and-dynamic-roles.rst
|
|
148
162
|
.. _ADR 0017: 0017-static-authorization-schema.rst
|
|
163
|
+
.. _ADR 0035: 0035-custom-role-persistence.rst
|
|
@@ -135,6 +135,17 @@ References
|
|
|
135
135
|
* :ref:`Authorization Schema Reference`
|
|
136
136
|
* `Tutor plugin development`_
|
|
137
137
|
|
|
138
|
+
Addendum: 2026-11-16
|
|
139
|
+
********************
|
|
140
|
+
|
|
141
|
+
Permission categories and permissions also accept an optional ``hidden`` flag in their base definitions, with the same effect as for roles. A hidden permission is omitted from normal discovery APIs and from role details, and a hidden category omits all of its permissions. Hiding does not delete the definition, remove the permission from roles, or change permission checks.
|
|
142
|
+
|
|
143
|
+
Role extensions cannot change this flag. They only change roles, so ``hidden`` on categories and permissions is set only where they are defined (`ADR 0028`_).
|
|
144
|
+
|
|
145
|
+
This addendum extends "Hiding a role" and does not change the role extension fields described earlier in this decision. See `ADR 0038`_.
|
|
146
|
+
|
|
147
|
+
.. _ADR 0028: 0028-api-contract-for-role-catalog.rst
|
|
148
|
+
.. _ADR 0038: 0038-hidden-permission-categories-and-permissions.rst
|
|
138
149
|
.. _ADR 0017: 0017-static-authorization-schema.rst
|
|
139
150
|
.. _ADR 0018: 0018-authorization-schema-lifecycle.rst
|
|
140
151
|
.. _ADR 0019: 0019-authorization-schema-discovery.rst
|
|
@@ -215,6 +215,19 @@ Consequences
|
|
|
215
215
|
* Compilation must track provenance at the role-permission grain, and the apply step writes the
|
|
216
216
|
definition, relationship, and source tables in the same transaction as the policy rows.
|
|
217
217
|
|
|
218
|
+
Addendum (2026-11-05)
|
|
219
|
+
*********************
|
|
220
|
+
|
|
221
|
+
`ADR 0035`_ stores custom (dynamic) roles in the role-definition and role-permission tables
|
|
222
|
+
defined here. Custom roles have no source links, and the schema loader does not prune them. See
|
|
223
|
+
that ADR for how deployments treat custom roles.
|
|
224
|
+
|
|
225
|
+
Addendum (2026-11-09)
|
|
226
|
+
*********************
|
|
227
|
+
|
|
228
|
+
`ADR 0037`_ records who created each custom (dynamic) role, and when, in its ``created`` audit
|
|
229
|
+
record.
|
|
230
|
+
|
|
218
231
|
References
|
|
219
232
|
**********
|
|
220
233
|
|
|
@@ -223,9 +236,13 @@ References
|
|
|
223
236
|
* `ADR 0019`_
|
|
224
237
|
* `ADR 0021`_
|
|
225
238
|
* `ADR 0023`_
|
|
239
|
+
* `ADR 0035`_
|
|
240
|
+
* `ADR 0037`_
|
|
226
241
|
|
|
227
242
|
.. _ADR 0017: 0017-static-authorization-schema.rst
|
|
228
243
|
.. _ADR 0018: 0018-authorization-schema-lifecycle.rst
|
|
229
244
|
.. _ADR 0019: 0019-authorization-schema-discovery.rst
|
|
230
245
|
.. _ADR 0021: 0021-authorization-definition-api.rst
|
|
231
246
|
.. _ADR 0023: 0023-extend-static-roles.rst
|
|
247
|
+
.. _ADR 0035: 0035-custom-role-persistence.rst
|
|
248
|
+
.. _ADR 0037: 0037-custom-role-audit-trail.rst
|
{openedx_authz-4.0.0 → openedx_authz-4.2.0}/docs/decisions/0028-api-contract-for-role-catalog.rst
RENAMED
|
@@ -399,6 +399,20 @@ Separate permission and category endpoints
|
|
|
399
399
|
|
|
400
400
|
The Admin Console would need several requests and would have to join the data itself.
|
|
401
401
|
|
|
402
|
+
Addendum: 2026-11-05
|
|
403
|
+
********************
|
|
404
|
+
|
|
405
|
+
`ADR 0036`_ changes this endpoint for the Custom Roles table:
|
|
406
|
+
|
|
407
|
+
* Each role adds ``user_count`` (brought back, now that the table shows it) and ``updated_at``.
|
|
408
|
+
* The query adds ``definition_kind`` (``static`` or ``user_defined``), ``search``, ``sort_by``
|
|
409
|
+
and ``order``.
|
|
410
|
+
* Custom roles with no permissions are still listed, with ``scope_types`` taken from the role's
|
|
411
|
+
stored resource type instead of its grants. Removed custom roles are not listed.
|
|
412
|
+
* Filtering, search, sorting and pagination run in Python over the roles of the requested scope types,
|
|
413
|
+
instead of in a single database query, so translated static role names are searched and
|
|
414
|
+
sorted as the user sees them.
|
|
415
|
+
|
|
402
416
|
References
|
|
403
417
|
**********
|
|
404
418
|
|
|
@@ -416,11 +430,20 @@ The deprecated ``course`` and ``library`` aliases of ``GET /api/authz/v1/scopes/
|
|
|
416
430
|
|
|
417
431
|
This addendum replaces the alias bullets in "Scope type naming" and the mention of the aliases in the consequences.
|
|
418
432
|
|
|
433
|
+
Addendum: 2026-11-16
|
|
434
|
+
********************
|
|
435
|
+
|
|
436
|
+
Permission categories and permissions have an optional ``hidden`` flag (`ADR 0023`_). The catalog leaves out hidden permissions and permissions in hidden categories, and each role's ``permissions`` omits them too. ``categories`` contains only non-hidden categories used by the remaining permissions. Roles are still listed by their grants in the requested scope types, so a role whose permissions are all hidden is returned with an empty ``permissions`` list. The grants themselves are kept and permission checks do not change.
|
|
437
|
+
|
|
438
|
+
This addendum amends the ``permissions``, ``roles`` and ``categories`` bullets of the response rules above. See `ADR 0038`_.
|
|
439
|
+
|
|
419
440
|
.. _frontend-app-admin-console: https://github.com/openedx/frontend-app-admin-console
|
|
420
441
|
.. _Issue #536: https://github.com/openedx/openedx-authz/issues/536
|
|
442
|
+
.. _ADR 0038: 0038-hidden-permission-categories-and-permissions.rst
|
|
421
443
|
.. _ADR 0020: 0020-authorization-schema-internationalization.rst
|
|
422
444
|
.. _ADR 0021: 0021-authorization-definition-api.rst
|
|
423
445
|
.. _ADR 0023: 0023-extend-static-roles.rst
|
|
424
446
|
.. _ADR 0024: 0024-api-contract-for-user-grouped-role-assignments.rst
|
|
425
447
|
.. _ADR 0025: 0025-authorization-schema-source-tracking.rst
|
|
426
448
|
.. _ADR 0029: 0029-paragon-icon-list-maintenance.rst
|
|
449
|
+
.. _ADR 0036: 0036-api-contract-for-custom-roles.rst
|
|
@@ -118,6 +118,11 @@ Consequences
|
|
|
118
118
|
* Tests check the validation rules and confirm that enforcement results match the explicit role permissions.
|
|
119
119
|
* The Custom Roles API should apply the same role rule to roles that users create.
|
|
120
120
|
|
|
121
|
+
Addendum: Indirect Dependencies in the Catalog (2026-11-17)
|
|
122
|
+
===========================================================
|
|
123
|
+
|
|
124
|
+
`ADR 0036`_ adds ``all_depends_on`` to each permission in the role catalog, next to ``depends_on``. It lists every direct and indirect dependency, so clients no longer compute indirect dependencies themselves. This replaces the last part of section 6.
|
|
125
|
+
|
|
121
126
|
Rejected Alternatives
|
|
122
127
|
*********************
|
|
123
128
|
|
|
@@ -145,6 +150,7 @@ References
|
|
|
145
150
|
* `ADR 0025`_
|
|
146
151
|
* `ADR 0028`_
|
|
147
152
|
* `ADR 0031`_
|
|
153
|
+
* `ADR 0036`_
|
|
148
154
|
* `Issue #91`_
|
|
149
155
|
* `Issue #523`_
|
|
150
156
|
* `PR #538`_
|
|
@@ -156,6 +162,7 @@ References
|
|
|
156
162
|
.. _ADR 0025: 0025-authorization-schema-source-tracking.rst
|
|
157
163
|
.. _ADR 0028: 0028-api-contract-for-role-catalog.rst
|
|
158
164
|
.. _ADR 0031: 0031-priority-applies-to-role-extensions-only.rst
|
|
165
|
+
.. _ADR 0036: 0036-api-contract-for-custom-roles.rst
|
|
159
166
|
.. _Issue #91: https://github.com/openedx/openedx-authz/issues/91
|
|
160
167
|
.. _Issue #523: https://github.com/openedx/openedx-authz/issues/523
|
|
161
168
|
.. _PR #538: https://github.com/openedx/openedx-authz/pull/538
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
0035: Persist Custom Roles in the Authorization Definition Tables
|
|
2
|
+
#################################################################
|
|
3
|
+
|
|
4
|
+
Status
|
|
5
|
+
******
|
|
6
|
+
|
|
7
|
+
**Draft**
|
|
8
|
+
|
|
9
|
+
Context
|
|
10
|
+
*******
|
|
11
|
+
|
|
12
|
+
Administrators need roles that match their organization, beyond the roles that ship with the
|
|
13
|
+
platform. Administrators create, copy, edit, and remove these custom roles from the
|
|
14
|
+
Administrative Console. A custom role has a name, a description, one resource type (courses or
|
|
15
|
+
libraries), and a set of existing permissions. Roles that ship with the platform stay read-only and
|
|
16
|
+
are customized by copying them.
|
|
17
|
+
|
|
18
|
+
Custom roles are the dynamic roles of `ADR 0016`_, which requires the authz model to store their
|
|
19
|
+
definitions. `ADR 0018`_ requires static and custom roles to share one set of role IDs and the
|
|
20
|
+
schema loader to preserve custom roles, but does not say where custom roles are stored.
|
|
21
|
+
|
|
22
|
+
`ADR 0025`_ added tables for compiled static definitions: categories, permissions, roles, and
|
|
23
|
+
role-permission grants, each linked to the module that contributed it. The role catalog
|
|
24
|
+
(`ADR 0028`_) reads roles from these tables and already reserves a ``definition_kind`` field with the
|
|
25
|
+
values ``static`` and ``user_defined``. Today, a schema deployment deletes every role and grant in
|
|
26
|
+
these tables that the compiled schema does not declare, so it would delete custom roles.
|
|
27
|
+
|
|
28
|
+
Decision
|
|
29
|
+
********
|
|
30
|
+
|
|
31
|
+
1. Store custom roles in the definition tables
|
|
32
|
+
==============================================
|
|
33
|
+
|
|
34
|
+
A custom role is a row in the role-definition table, and each permission it grants is a row in the
|
|
35
|
+
role-permission table, the same as for a static role. The role row records its definition kind,
|
|
36
|
+
``static`` or ``user_defined``, matching `ADR 0028`_. The kind never changes after creation.
|
|
37
|
+
|
|
38
|
+
A custom role has no source links, because no module contributed it, unlike the static definitions
|
|
39
|
+
that `ADR 0025`_ attributes to a source. Its grants need no separate kind flag: static roles cannot
|
|
40
|
+
be edited through the API, so a grant is user-defined exactly when the role that owns it is.
|
|
41
|
+
|
|
42
|
+
Custom roles only reference existing permissions. They do not create permissions or categories,
|
|
43
|
+
which stay static.
|
|
44
|
+
|
|
45
|
+
Custom roles are never hidden: their ``hidden`` flag is always false. Hiding a role (`ADR 0023`_) is
|
|
46
|
+
a schema extension that applies to static roles when the schema loads. A custom role that is no
|
|
47
|
+
longer needed is removed instead (section 4).
|
|
48
|
+
|
|
49
|
+
2. Identity and display fields
|
|
50
|
+
==============================
|
|
51
|
+
|
|
52
|
+
Custom roles are global to the instance. Their IDs use the reserved prefix ``custom_`` followed by
|
|
53
|
+
the display name converted to the role ID format (``[a-z][a-z0-9_]*``). The ID is set at creation and
|
|
54
|
+
never changes, so renaming a role does not affect its assignments or policy rows.
|
|
55
|
+
|
|
56
|
+
The name is converted with the Python standard library, so no transliteration dependency is needed:
|
|
57
|
+
|
|
58
|
+
#. Normalize the name to Unicode NFKD, which separates accents from their letters, and drop the
|
|
59
|
+
characters that are still not ASCII.
|
|
60
|
+
#. Lowercase it, and replace each run of characters other than letters and digits with one
|
|
61
|
+
underscore.
|
|
62
|
+
#. Trim underscores from both ends.
|
|
63
|
+
|
|
64
|
+
For example:
|
|
65
|
+
|
|
66
|
+
* "Course Designer" becomes ``custom_course_designer``.
|
|
67
|
+
* "Diseñador de cursos" becomes ``custom_disenador_de_cursos``.
|
|
68
|
+
* If that ID is taken, including by a removed role (section 4), the next one is
|
|
69
|
+
``custom_course_designer_2``.
|
|
70
|
+
* A name with nothing left after conversion, such as one written only in a non-Latin script,
|
|
71
|
+
becomes ``custom_role``.
|
|
72
|
+
|
|
73
|
+
A custom role ID is at most 64 characters. The converted name is cut before the numeric suffix is
|
|
74
|
+
added, and underscores left at the end of the cut are trimmed. The role ID column allows 255
|
|
75
|
+
characters, but each assignment is also stored under a 255-character key that joins the subject,
|
|
76
|
+
role, and scope keys, so a short role ID leaves room for long scope keys. The display name keeps the
|
|
77
|
+
255-character limit of its column.
|
|
78
|
+
|
|
79
|
+
Schema validation rejects static role IDs that start with ``custom_``, so the two kinds of role
|
|
80
|
+
cannot collide. The prefix also identifies custom roles in Casbin rows and logs.
|
|
81
|
+
|
|
82
|
+
The display name and description are stored as entered and are not translated (`ADR 0020`_). The
|
|
83
|
+
role's ``scopes`` stays a list, but the API accepts one resource type for now, so supporting several
|
|
84
|
+
later needs no data migration.
|
|
85
|
+
|
|
86
|
+
Role identifier conflicts (amends ADR 0018 section 4)
|
|
87
|
+
-----------------------------------------------------
|
|
88
|
+
|
|
89
|
+
`ADR 0018`_ section 4 handles static and custom role name collisions at runtime and leaves custom
|
|
90
|
+
role naming out of scope. The dynamic role API rejects a name used by a static role, and a
|
|
91
|
+
deployment stops when a new static role conflicts with an existing custom role. This ADR sets the
|
|
92
|
+
naming rule that section 4 left open, so it replaces that runtime handling:
|
|
93
|
+
|
|
94
|
+
* A static role can never collide with a custom role, because static IDs cannot start with
|
|
95
|
+
``custom_`` and custom IDs always do. A deployment no longer stops because of a static and
|
|
96
|
+
custom role name conflict, and the custom role API no longer needs to check names against static
|
|
97
|
+
roles.
|
|
98
|
+
* A static role ID that starts with ``custom_`` is now a schema validation error, reported before
|
|
99
|
+
any database change, with the contributing package. This is where a package that already ships
|
|
100
|
+
such an ID is caught.
|
|
101
|
+
* Uniqueness among custom roles remains a runtime concern, handled by the numeric suffix
|
|
102
|
+
(``custom_course_designer_2``).
|
|
103
|
+
|
|
104
|
+
The rest of `ADR 0018`_ section 4 still applies: static and custom roles share one set of role IDs.
|
|
105
|
+
`ADR 0018`_ carries a matching addendum.
|
|
106
|
+
|
|
107
|
+
3. Changes apply to the definition and the policy together
|
|
108
|
+
==========================================================
|
|
109
|
+
|
|
110
|
+
Creating, editing, or removing a custom role updates its definition rows and its Casbin ``p`` rows
|
|
111
|
+
in one transaction, then invalidates the policy cache, as `ADR 0018`_ requires for deployments.
|
|
112
|
+
These writes use the same lock as schema apply. Changes apply right away to every user who holds the
|
|
113
|
+
role.
|
|
114
|
+
|
|
115
|
+
Copying a role is not a separate operation. The Administrative Console reads an existing role from
|
|
116
|
+
the catalog and sends its resource type and permissions, which the administrator can change, in a
|
|
117
|
+
normal create request. The catalog lists only roles that are not hidden, so only those
|
|
118
|
+
can be copied. The new role gets no assignments and keeps no link to the original.
|
|
119
|
+
|
|
120
|
+
4. Removing a custom role
|
|
121
|
+
=========================
|
|
122
|
+
|
|
123
|
+
Removing a custom role keeps its role-definition row and marks it as removed, with the time of
|
|
124
|
+
removal. Its grants, its Casbin ``p`` rows, and its assignments are deleted in the same transaction.
|
|
125
|
+
A removed role is left out of the catalog, cannot be assigned or edited, and grants no access.
|
|
126
|
+
|
|
127
|
+
The role ID stays reserved, so creating "Course Designer" again gives ``custom_course_designer_2``.
|
|
128
|
+
Audit records (`ADR 0012`_) store role keys as plain strings. If a new role could take a removed
|
|
129
|
+
role's ID, its history would mix with the old role's records. Keeping the row also lets those
|
|
130
|
+
records show the removed role's display name.
|
|
131
|
+
|
|
132
|
+
When a custom role has assignments, the request to remove it must state explicitly that the
|
|
133
|
+
assignments are deleted with the role, or it is rejected. A role with no assignments needs no such
|
|
134
|
+
statement. Each deleted assignment is recorded the same way assignment removals are recorded today.
|
|
135
|
+
|
|
136
|
+
5. Schema deployments
|
|
137
|
+
=====================
|
|
138
|
+
|
|
139
|
+
The schema loader does not create, update, or remove custom roles. When a deployment removes a
|
|
140
|
+
permission that a custom role grants, it stops before any write and
|
|
141
|
+
reports each affected grant, so Casbin keeps the last applied policy (`ADR 0018`_).
|
|
142
|
+
|
|
143
|
+
An explicit option, separate from the force option for removing roles, lets the operator drop
|
|
144
|
+
those grants and their ``p`` rows in the same deployment. A release that removes a permission must
|
|
145
|
+
say so in its operator release notes and name this option. A custom role left with no permissions
|
|
146
|
+
remains, so its assignments are kept.
|
|
147
|
+
|
|
148
|
+
Consequences
|
|
149
|
+
************
|
|
150
|
+
|
|
151
|
+
* The catalog, the assignment flow, and enforcement read static and custom roles from the same
|
|
152
|
+
tables.
|
|
153
|
+
* The schema loader's prune step must skip custom roles and their grants. It drops a custom role's
|
|
154
|
+
grant only when the schema removed the permission and the operator passed the option from
|
|
155
|
+
section 5.
|
|
156
|
+
* A deployment cannot narrow a custom role unless the operator opts in, and releases that remove
|
|
157
|
+
permissions must document the option in their operator release notes.
|
|
158
|
+
* Removing a custom role cannot leave orphaned assignments.
|
|
159
|
+
* Removed custom roles stay in the role-definition table, so their IDs are never reused and audit
|
|
160
|
+
records can still name them. Queries for active roles must exclude them.
|
|
161
|
+
* Schema validation and the :ref:`Authorization Schema Reference` must reserve the ``custom_``
|
|
162
|
+
prefix.
|
|
163
|
+
* Custom roles have no source attribution.
|
|
164
|
+
* Static and custom role name conflicts are prevented by the ``custom_`` prefix rule instead of
|
|
165
|
+
detected at deployment, which supersedes the runtime conflict handling in `ADR 0018`_ section 4.
|
|
166
|
+
|
|
167
|
+
This ADR does not decide who can manage custom roles, the REST API contract, or how dependent
|
|
168
|
+
permissions are added. Future ADRs decide these. It also does not cover a change history for role
|
|
169
|
+
definitions or roles with several resource types.
|
|
170
|
+
|
|
171
|
+
Rejected Alternatives
|
|
172
|
+
*********************
|
|
173
|
+
|
|
174
|
+
Separate tables for custom roles
|
|
175
|
+
================================
|
|
176
|
+
|
|
177
|
+
Every catalog query would have to merge two tables, the code that writes ``p`` rows would exist
|
|
178
|
+
twice, and the shared role ID rule from `ADR 0018`_ would have to be checked across both tables.
|
|
179
|
+
|
|
180
|
+
Infer custom roles from missing source links
|
|
181
|
+
============================================
|
|
182
|
+
|
|
183
|
+
A role with no source links could also be a leftover or the result of an incomplete write. An
|
|
184
|
+
explicit definition kind avoids the guesswork and is the value the catalog already returns.
|
|
185
|
+
|
|
186
|
+
References
|
|
187
|
+
**********
|
|
188
|
+
|
|
189
|
+
* `ADR 0012`_
|
|
190
|
+
* `ADR 0016`_
|
|
191
|
+
* `ADR 0018`_
|
|
192
|
+
* `ADR 0020`_
|
|
193
|
+
* `ADR 0023`_
|
|
194
|
+
* `ADR 0025`_
|
|
195
|
+
* `ADR 0028`_
|
|
196
|
+
* `Issue #467`_
|
|
197
|
+
|
|
198
|
+
.. _ADR 0012: 0012-auditability.rst
|
|
199
|
+
.. _ADR 0016: 0016-static-and-dynamic-roles.rst
|
|
200
|
+
.. _ADR 0018: 0018-authorization-schema-lifecycle.rst
|
|
201
|
+
.. _ADR 0020: 0020-authorization-schema-internationalization.rst
|
|
202
|
+
.. _ADR 0023: 0023-extend-static-roles.rst
|
|
203
|
+
.. _ADR 0025: 0025-authorization-schema-source-tracking.rst
|
|
204
|
+
.. _ADR 0028: 0028-api-contract-for-role-catalog.rst
|
|
205
|
+
.. _Issue #467: https://github.com/openedx/openedx-authz/issues/467
|