Skip to content

Commit 7cf19e6

Browse files
committed
docs: add ADR for overall strategy for implementing AuthZ for Course Authoring
docs: add ADR for overall strategy for implementing AuthZ for Course Authoring
1 parent 6ca9b90 commit 7cf19e6

2 files changed

Lines changed: 108 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Change Log
1414
Unreleased
1515
**********
1616

17-
*
17+
Added
18+
=====
19+
20+
* ADR on the AuthZ for Course Authoring implementation plan.
1821

1922
0.20.0 - 2025-11-27
2023
********************
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
0009: AuthZ for Course Authoring Implementation Plan
2+
####################################################
3+
4+
Status
5+
******
6+
7+
**Draft**
8+
9+
Context
10+
*******
11+
12+
Phase 2 of the RBAC AuthZ Project implements the openedx-authz system for the Course Authoring
13+
experience in Studio, enabling new permissions and roles for course management.
14+
15+
For more information on this project, see: `PRD Authz for Course Authoring`_
16+
17+
18+
Tech Debt
19+
---------
20+
21+
Long-term, the openedx-authz architecture aims to be easily extensible, allowing third-party
22+
modules to define their own permissions and roles without modifying the openedx-authz repository.
23+
24+
However, the architecture for externalized permissions is still under development. Therefore, for
25+
this phase, permissions and roles will be temporarily implemented directly in openedx-authz,
26+
following the same approach used for Libraries in Phase 1.
27+
28+
Once the architecture for externalized permissions is ready, follow-up tasks will address this
29+
technical debt.
30+
31+
A feature flag will be implemented in openedx-platform to enable or disable the new authorization
32+
system for Course Authoring. This flag will be deprecated after 2 Open edX releases, with a DEPR
33+
ticket tracking the deprecation.
34+
35+
A migration process will move existing roles from the legacy implementation to openedx-authz.
36+
37+
A rollback migration process will also be provided to revert from openedx-authz roles back to
38+
legacy roles if the feature flag is disabled. The rollback will only support roles with exact
39+
equivalences between systems; non-equivalent roles will be ignored with warnings logged to the
40+
command output.
41+
42+
Decision
43+
********
44+
45+
* Permissions and roles for course authoring will be initially defined in openedx-authz, following
46+
the same approach used for Libraries.
47+
* Course authoring permission enforcement using the new system will be optionally enabled via a
48+
feature flag.
49+
* The feature flag can be enabled instance-wide or for specific courses.
50+
* The feature flag will be deprecated after 2 Open edX releases.
51+
* The deprecation process will remove all legacy code, leaving only the new system.
52+
* During the transition, both systems will coexist, controlled by the feature flag.
53+
* A migration script will migrate legacy permissions to the new system.
54+
* A rollback migration script will revert new permissions to the legacy system.
55+
* The rollback script will only support roles with exact equivalences between systems.
56+
* During rollback, roles that don't exist in the legacy system will be ignored with warnings logged
57+
to system logs.
58+
* Externalizing roles and permissions definitions will be addressed later after resolving the
59+
relevant technical debt. This is out of scope for this phase.
60+
* A compatibility layer will be implemented in openedx-platform to support legacy code paths.
61+
62+
Consequences
63+
************
64+
65+
* **Increased System Complexity**: The platform will temporarily operate with two active
66+
authorization models.
67+
* **Data Duplication**: Permission data will exist in both systems until final cutover, requiring
68+
synchronization mechanisms or specific query logic.
69+
70+
Migration Strategy for Course Authoring
71+
----------------------------------------
72+
73+
This phase focuses on migrating course authoring permissions while maintaining current
74+
functionality.
75+
76+
* **Migration Script**: Transform existing role assignments into the new authorization model
77+
without modifying the legacy database.
78+
* **Enforcement Updates**: Modify and verify enforcement points to use the new system with updated
79+
roles and permissions for courses.
80+
* **Documentation and Communication**:
81+
82+
* Create a deprecation ticket to inform the community about changes to course roles and
83+
permissions.
84+
* Update `OEP-66`_ documentation regarding the new authorization system for course authoring.
85+
86+
Rejected Alternatives
87+
*********************
88+
89+
* **Solving technical debt and implementing externalized roles and permissions**: Out of scope due
90+
to time constraints.
91+
* **Removing the legacy system immediately**: Increases risk to existing instances if unexpected
92+
issues arise.
93+
* **Not providing a rollback migration script**: Would prevent testing on instances and increase
94+
the probability of failed upgrades.
95+
96+
References
97+
**********
98+
99+
* `PRD Authz for Course Authoring`_
100+
* `OEP-66`_
101+
102+
.. _OEP-66: https://docs.openedx.org/projects/openedx-proposals/en/latest/best-practices/oep-0066-bp-authorization.html
103+
104+
.. _PRD Authz for Course Authoring: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5364121605/PRD+AuthZ+for+Course+Authoring

0 commit comments

Comments
 (0)