Skip to content

Commit 8b92586

Browse files
docs: add more real references to examples and organize glossary
1 parent f20bc41 commit 8b92586

1 file changed

Lines changed: 25 additions & 20 deletions

File tree

docs/decisions/0002-authorization-model-foundation.rst

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Normalize all checks to Subject-Action-Object-Context (S-A-O-C)
3535
* This normalization is used in policies, code, queries, and audits.
3636
* Examples:
3737

38-
- Can Alice (subject) edit (action) Course 123 (object) as part of Org A (context)?
39-
- Can Bob (subject) read (action) Library X (object)?
38+
- Can Alice (subject) edit (action) the course ``course-v1:OpenedX+DemoX+DemoCourse`` (object) as part of Org A (context)?
39+
- Can Bob (subject) read (action) the library ``lib:DemoX:CSPROB`` (object)?
4040

4141
II. Resources and Scopes
4242
========================
@@ -45,7 +45,7 @@ Scopes as first-class citizens in permission-granting
4545
-----------------------------------------------------
4646
* A **scope** defines the boundary within which a role or policy applies (for example: platform-wide, organization-wide, a single course, or a specific library).
4747
* Treating scopes as **first-class citizens** means they are explicitly modeled in the system, not hidden inside ad-hoc resource definitions. They must be available to policies, queries, and audits in a consistent way.
48-
* Scopes can be **parameterized** (e.g., ``organization:ORG-A``, ``course:CS101``, ``site:sandbox.openedx.org``, ``instance``) to support granular checks.
48+
* Scopes can be **parameterized** (e.g., ``organization:ORG-A``, ``course:course-v1:OpenedX+DemoX+DemoCourse``, ``site:sandbox.openedx.org``, ``instance``) to support granular checks.
4949
* **Inheritance across scopes** must be supported (e.g., permissions granted at the organization level can cascade to courses in that organization when intended).
5050
* By making scopes explicit and consistent, we avoid the fragmentation seen in legacy systems (different services using different implicit notions of "site", "org", "course").
5151

@@ -102,8 +102,8 @@ VI. Engines and Integration
102102

103103
Use proven frameworks with ABAC support and an adapter
104104
------------------------------------------------------
105-
* Use existing open source frameworks (Casbin, Cerbos, OpenFGA, SpiceDB).
106-
* Do not build a custom engine.
105+
* Use existing open source frameworks (`Casbin <https://casbin.org>`_, `Cerbos <https://www.cerbos.dev>`_, `OpenFGA <https://authzed.com/spicedb>`_, `SpiceDB <https://spicedb.dev>`_, `Ory Keto <https://www.ory.sh/keto>`_, etc.).
106+
* Recommend against building a custom engine since authorization is a well-established domain with many existing solutions, reinventing the wheel introduces unnecessary complexity and maintenance burden.
107107
* The chosen technology must:
108108

109109
- Support **ABAC** to allow growth beyond role-only systems.
@@ -119,13 +119,13 @@ Use proven frameworks with ABAC support and an adapter
119119
VII. Extensibility
120120
===================
121121

122-
Make roles, permissions, and models pluggable
123-
---------------------------------------------
122+
Make roles, permissions, and resources pluggable
123+
------------------------------------------------
124124
* Extensibility should include:
125125

126126
- Adding **custom roles** that can be composed from or unioned with existing permissions.
127127
- Adding **new permissions (verbs)** that build on top of existing ones.
128-
- Defining **new models/resources** (e.g., "workspace", "assignment") and expressing their relations to existing ones (e.g., platform → organization → course).
128+
- Defining **new resources** (e.g., "assignment") and expressing their relations to existing ones (e.g., platform → organization → course).
129129

130130
* Applications must keep calling the same consistent check (e.g., *can(subject, action, object)*), while the schema or policy evolves underneath.
131131

@@ -174,22 +174,27 @@ Rejected Alternatives
174174

175175
References
176176
**********
177-
WIP
177+
- `AuthZ Key Concepts <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5177999395>`_
178+
- `AuthZ Architecture Approach <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5176229910>`_
179+
- `PRD Roles and Permissions <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4724490259>`_
178180

179181
Glossary
180182
********
181-
* **Policy**: A declarative rule that defines which subjects can perform which actions on which objects under which context. Policies are stored outside of code, versioned, and auditable.
182-
183-
* **RBAC (Role-Based Access Control)**: Authorization model where access is granted based on roles assigned to users.
184183

185-
* **Scoped RBAC**: A variant of RBAC where roles apply within a specific scope (e.g., organization, course, library).
186-
187-
* **ABAC (Attribute-Based Access Control)**: Authorization model where access is granted based on attributes of the subject, object, and context (e.g., user's organization, resource type, time of day).
184+
* **Action**: The operation attempted on a resource (e.g., view, edit, delete).
185+
* **Attribute**: Property of a user or resource used in ABAC (e.g., user.profile.department == course.org).
186+
* **Authorization check**: The explicit way a service asks whether an operation is allowed, always expressed in S-A-O-C form.
187+
* **Authorization models**: Frameworks or approaches that define how to express who can do what, on which resource, and under which conditions. Common models include RBAC, ABAC, and ReBAC.
188188

189-
* **ReBAC (Relationship-Based Access Control)**: Authorization model where access decisions are based on explicit relationships between subjects and objects, often modeled as a graph.
189+
* **RBAC (Role-Based Access Control)**: Authorization model where access is granted based on roles assigned to users.
190+
* **Scoped RBAC**: A variant of RBAC where roles apply within a specific scope (e.g., organization, course, library).
191+
* **ABAC (Attribute-Based Access Control)**: Authorization model where access is granted based on attributes of the subject, object, and context (e.g., user's organization, resource type, time of day).
192+
* **ReBAC (Relationship-Based Access Control)**: Authorization model where access decisions are based on explicit relationships between subjects and objects, often modeled as a graph.
190193

194+
* **Permission**: Atomic unit of access (e.g., ``CREATE_COURSE``, ``EDIT_ROLE``).
195+
* **Policy**: A declarative rule that defines which subjects can perform which actions on which objects under which context. Policies are stored outside of code, versioned, and auditable.
196+
* **Relationship**: Link between entities granting access in ReBAC (e.g., user:alice#editor@course:math101).
197+
* **Resource**: The object being accessed (e.g., Course).
198+
* **Role**: A collection of permissions assigned to a user (e.g., Instructor).
191199
* **S-A-O-C (Subject-Action-Object-Context)**: The canonical shape of any authorization check: *is Subject allowed to perform Action on Object under Context?*
192-
193-
* **Authorization check**: The explicit way a service asks whether an operation is allowed, always expressed in S-A-O-C form.
194-
195-
* **Query check**: A pattern where the system returns all objects of type X on which a subject can perform a given action, under a given context.
200+
* **Scope**: The boundary where a role applies (e.g., Instructor in Course A, Admin in Org B).

0 commit comments

Comments
 (0)