-
Notifications
You must be signed in to change notification settings - Fork 9
docs: separate static and dynamic roles #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1ff1e6a
docs: separate static and dynamic roles
mariajgrimaldi 8aafd51
docs: address PR review
mariajgrimaldi 5d99ddb
docs: clarify authz schema terminology
mariajgrimaldi 30d8426
docs: distinguish operators from administrators
mariajgrimaldi 4e3847a
docs: clarify role management access
mariajgrimaldi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| 0016: Keep Static and Dynamic Roles Separate | ||
| ############################################ | ||
|
|
||
| Status | ||
| ****** | ||
|
|
||
| **Draft** | ||
|
|
||
| Context | ||
| ******* | ||
|
|
||
| Open edX needs two kinds of roles: static roles defined by applications and dynamic roles created through the application. Users work with both kinds through the same interface. | ||
|
|
||
| Today, the system derives available roles and permissions from Casbin policy rows loaded during deployment, which means that it supports only static roles. | ||
|
|
||
| Decision | ||
| ******** | ||
|
|
||
| Static and dynamic definitions | ||
| ============================== | ||
|
|
||
| Applications, such as Django apps or IDAs, define static roles in the Open edX Authorization schema, or authz schema for short (defined in more detail in `ADR 0017`_). Because the application owns these roles, changes to them are made in the schema and released with the application. | ||
|
|
||
| Dynamic roles are created through the application, and the authz model stores both their definitions and their user assignments. Static definitions remain in the authz schema. | ||
|
|
||
| For example, an application may define ``course_admin`` in the authz schema, while a user creates ``course_reviewer`` through the application. The authz model stores ``course_reviewer``, but ``course_admin`` remains part of the application's schema. | ||
|
|
||
| This ADR does not decide who can create or change roles. Static role changes require a deployment, so they need site operator access. Dynamic roles may be managed through Django admin or a similar interface, but we have not decided who will have that access. A site operator and an application administrator have different responsibilities, although the same person may be both. | ||
|
|
||
| Consequences | ||
| ************ | ||
|
|
||
| * Dynamic roles can be created without changing or redeploying applications. | ||
| * Static and dynamic roles can change independently. | ||
| * The authz model must store dynamic role definitions. | ||
|
|
||
| .. _ADR 0017: 0017-static-authorization-schema.rst |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.