-
Notifications
You must be signed in to change notification settings - Fork 99
[BD-24][TNL-7919] LTI Advantage Names and Roles provisioning service implementation direction #142
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
12 commits
Select commit
Hold shift + click to select a range
99eed32
Add wip ADR about NRPS
giovannicimolin 5a26454
Nit
giovannicimolin 76db295
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin 781a99e
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin bd69b9d
Address nits
giovannicimolin 6ed0f7a
Write a bit more
giovannicimolin 8e85995
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin 1ee8fd9
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin 83f5cbb
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin 47f5464
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin e6fcead
Update docs/decisions/0004-lti-advantage-nrps.rst
giovannicimolin 168faa4
Nits
giovannicimolin 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,115 @@ | ||
| LTI Advantage NRPS (Names and Roles provisioning services) | ||
| ---------------------------------------------------------- | ||
|
|
||
| Status | ||
| ====== | ||
|
|
||
| Accepted | ||
|
|
||
| Context | ||
| ======= | ||
|
|
||
| One of the LTI Advantage services is the `Names and Roles Provisioning Services (NRPS)`_, which allows LTI tools | ||
| to retrieve a user list associated with the learning context and internally provision resources for them. | ||
|
|
||
| From the LTI-NRPS Specification: | ||
|
|
||
| The Names and Role Provisioning Services is based on IMS Learning Information Services (LIS) [LIS-20] | ||
| and W3C Organization Ontology [W3C-ORG]. It is concerned with providing access to data about users’ roles | ||
| within organizations, a course being an example of an organization. So a very common purpose for this service | ||
| is to provide a roster (list of enrolments) for a course. | ||
|
|
||
| An LTI-NRPS services implementation consists of two services which provide user data in the following format: | ||
|
|
||
| .. code-block:: json | ||
| { | ||
| "id" : "https://lms.example.com/sections/2923/memberships", | ||
| "context": { | ||
| "id": "2923-abc", | ||
| "label": "CPS 435", | ||
| "title": "CPS 435 Learning Analytics", | ||
| }, | ||
| "members" : [ | ||
| { | ||
| "status" : "Active", | ||
| "name": "Jane Q. Public", | ||
| "picture" : "https://platform.example.edu/jane.jpg", | ||
| "given_name" : "Jane", | ||
| "family_name" : "Doe", | ||
| "middle_name" : "Marie", | ||
| "email": "jane@platform.example.edu", | ||
| "user_id" : "0ae836b9-7fc9-4060-006f-27b2066ac545", | ||
| "lis_person_sourcedid": "59254-6782-12ab", | ||
| "roles": [ | ||
| "http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| Where the only required fields for each member are :code:`user_id` and :code:`roles`, to avoid unintended PII transmission to a third party. | ||
| But since one of the purposes of this API is to enable tools access to user PII, the implementation should provide a flag to enable the consumer | ||
| to pass additional PII parameters such as name, email, and a profile picture url. | ||
|
|
||
| The main issue with enabling this API (`even with pagination as defined in the spec`_) is that it would allow external third-party tools to scrape enrollments for all | ||
| students in a given course. Given the scale of some courses in edX.org, even if the API is made more performant with cursor pagination, | ||
| we're still left with an API pattern that would be actively encouraging clients out there to make hundreds of thousands of successive requests in order | ||
| to crawl enrollment data. | ||
|
|
||
| .. _Names and Roles Provisioning Services (NRPS): http://www.imsglobal.org/spec/lti-nrps/v2p0 | ||
| .. _even with pagination as defined in the spec: http://www.imsglobal.org/spec/lti-nrps/v2p0#limit-query-parameter | ||
|
|
||
| Decision | ||
| ======== | ||
|
|
||
| Implement the LTI NRPS for courses up to a predefined (and configurable) number of active enrollments. | ||
| Above that number, the service endpoint will return HTTP status 403 (Forbidden). | ||
|
|
||
| This is the simplest implementation that allows us to provide the LTI NRPS service and mitigate the concerns mentioned above. | ||
| The NRPS services availability and behavior will be controlled by the following toggles: | ||
|
|
||
| .. list-table:: | ||
| :widths: auto | ||
| :header-rows: 1 | ||
|
|
||
| * - Toggle name | ||
| - Type | ||
| - Behavior | ||
| * - LTI_NRPS_ENABLED | ||
| - Feature flag | ||
| - Enables and disables LTI NRPS globally in the Open edX instance. Is disabled by default. | ||
| * - LTI_NRPS_ACTIVE_ENROLLMENT_LIMIT | ||
| - Django setting | ||
| - Controls the allowed number of active enrollments when the API is enabled. | ||
| Defaults to 1000 active enrollments at first. | ||
| * - LTI_NRPS_TRANSMIT_PII | ||
| - CourseWaffleFlag | ||
| - Allows the tool to access student and instructor PII (username, email, full name, profile picture). | ||
| Defaults to False. | ||
|
|
||
|
|
||
| Consequences | ||
| ============ | ||
|
|
||
| * Small courses will be able to use LTI NRPS endpoints on their tools, up to a limited amount of users. | ||
| * Big MOOCs (with millions of users) won't allow scraping of enrollment data on edX and potentially cause stability issues. | ||
|
|
||
|
|
||
| Discarded solutions | ||
| =================== | ||
|
|
||
| Don't implement NRPS | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
| This would not enable course creators to use LTI advantage tools that make use of this functionality. | ||
|
|
||
| Implement NRPS gated by course | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| While this would work, it adds a maintenance burden of keeping and updating a whitelist. | ||
| Also, long running MOOCs can grow to sizes that could potentially affect instance stability when | ||
| using the API. | ||
|
|
||
| Implement NRPS limiting the context of the data retrieved | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure what context limiting means and how that helps. Is it reducing the number of fields per record? |
||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| Complex to implement given the benefit. To get consistency on the LTI tool side, the implementation | ||
| would need to create user groups and effectively isolate them in the tool (potentially using a different resourceLink), | ||
| which doesn't work for a few LTI integrations (forums, course wide leaderboard, instructor grading inside the tool and others). | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be applicable for any implementation if we create xblock level flag if NRPS is enabled or not.