-
Notifications
You must be signed in to change notification settings - Fork 85
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
Remove XBlock location
dependencies from LTI 1.3 launches
#273
Comments
Thanks for centralizing this. We have an internal 2U ticket to work out a solution and propose an ADR. We plan to get started on that right away since it blocks launching exams (they don't have a specific xblock). Scheduling wise I hope we can have something proposed or functional by September. |
Wanted the throw out a solution that came up when looking at the proctoring PR. Can we solve this by building a context object that includes location and storing that is part of the It isn't totally clear to me if that's the intention of this parameter based on the IMS spec but I'm leaning that way. |
I like that idea, actually. We're using the The specification seems pretty generic: the I'm going to see whether this would work for our existing LTI 1.3 launches and report back. |
Yes, that's the idea behind those two parameters ( Currently, we're passing the
Part of making LTI configurations re-usable is separating those two usages into different identifiers.
ExampleLogin hint:
A different block using the same configuration would have a similar message, but with a different context identifier:
We can also imagine the same configuration being used as a discussion provider: in that case, the
I'm not sure I'm covering all bases with this suggestion, but I think it's a good starting point. What do you say? Final notesNote that the We should definitely modify the current usages to improve consistency in the usage of EDIT:
|
Thanks for the additional context, @giovannicimolin. That's very helpful. I have a number of questions. I'd like to propose answers to some of these problems, but I'm not sure whether they are problems that we're seeking to solve here. Contextual Information in How are you anticipating using the
This does decouple this launch view from the
Contextual Information in If we go with this approach, we can encode all contextual information in the My only concern is that the consuming context has to concern itself with the various LTI claims in order to determine what context to send. For example, the Proctoring flow has a lot of optional claims. I'm also not sure how this would apply to Advantage services. I'm not as familiar with them. Are we sticking just to the LTI 1.3 launch here? Skimming some of the Advantage service views, the following questions come to mind.
Decoupling In the issue, you say, "we need to remove any dependencies on location from the LTI configuration model and from the launch flow". Are you saying that you would like to see the
Is this a goal of ours? I ask because it seems to be implied in this issue, but I'm not sure. |
Hello, I think there are a few steps here. I've summarized them below and then go into further detail about my proposal for solving them later on. Let me know what you think. I can draft up an ADR once we align on an approach. I'm also happy to do some work on a rough POC to demonstrate how this would work. Steps
1. Decouple the launch_gate_endpoint From the XBlockI like the idea of using the I propose the following uses of
The purpose of using the There is a lot of contextual information that can be sent this way, and much of it is optional. For now, I propose that we include the following information, which is the information included in the current LTI launch. Base LTI 1.3 Parameters
Proctoring Parameters
LTI Advantage Parameters
The advantage of this approach is that it moves the responsibility of defining the contextual information to the code that handles the OIDC third-party authentication initiation. This is much closer to the origination of the LTI request, and so it makes it easier to decouple the launch from the LMS in a later step and makes it easier for other users of the library to provide this contextual information. 2. Decouple the OIDC Third-Party Authentication Initiation From the LMSThe above strategy moves the responsibility of defining the contextual information to the code that handles the OIDC third-party authentication initiation. Currently, that's the the get_lti_1p3_content_url function. Currently, the function has the following signature.
I propose that we modify the signature to include a number of keyword arguments for contextual information that are necessary for an LTI launch. These data will map directly to parameters I proposed that we include in the For example, the function could have the following signature.
There are a lot of claims in LTI. Some are required. Some are optional. Some are specification specific. This has the potential to balloon the signature of this function. 3. Provide Mechanisms for Users of Library to Pass Contextual InformationThere are a few ways to accomplish this. XBlock Context The XBlock does not have to change much. We can push the use of the compatibility layer into the XBlock. Here is a quick example of what I am thinking. I've removed some of the irrelevant parts related to LTI 1.1 launches.
Other Contexts Via lti_embed Function We can mirror the lti_embed function and expose a similar function that returns an auto-submitting form that kicks off the LTI 1.3 launch. The set of parameters for this function would be very similar to that of the get_lti_1p3_content_url function. Other Contexts Via Python API For other application contexts where it's preferable for, say, an MFE to have control over the frontend experience, or where we want more control over when the request is made, we can use the get_lti_1p3_content_url function of the Python API to get a preflight URL and then do a simple redirect within the application. This assumes that the size of the query parameters, including the JWT, will be under the maximum character limit for a GET request. 4. Provide Mechanisms To Get LMS Contextual Information From Outside the LibraryI think this is outside the purview of this issue or this library, but I want to surface it as a problem that will have to be solved. Both the 5. Remove the Location Field From the LtiConfiguration ModelI'm still not sure whether we want to do this. It looks like the remaining places where we reference the location is in a number of LTI Advantage features. |
What does encoding things as a JWT get us? Is it just a convenient way to get a string that can pass through all the various layers? |
@ashultz0 Yes, essentially. We can encode it however we want; it just has to be a string. It does not have to be a JWT. |
for 2 I would suggest not ballooning the signature and instead making an actual object type to wrangle all the lti fields together that callers can build |
Initial impression, this all looks great! To build on Andy's suggestion. We could build out a 'claims' object (whatever we choose to name it) using a series of setter functions for logical groups of claims. That way we might have some control over 'if this field is set that field is also required' and other validations. Maybe simply allowing As far as 4 and 5. I think these are both getting into a long vision for the library where the actual XBlock code is split out of this. I do think that should be our aim but IMO we can approach this incrementally by focusing on 1-3 now. My recommendation is to simply open it as an issue on library so our intent is documented but my understanding (correct me if I'm wrong) is we don't actually need to solve this right away. |
I was actually thinking about how weird it is that the xblock is in here while considering how do we turn off features we're not using. Maybe the correct layout would be lti library with most of this stuff, maybe in multiple apps that you could turn on and off, and separate lti xblock library that depends on it. |
I can think of
Yup, that was one of the options. Pushing it to the context using it is definitely the better option, but we need mechanisms to pass and retrieve context information that is not dependent on the launch itself (for LTI advantage services, for example).
Yes, that's it. 👍
Each context should know what variables it needs to send to make an LTI launch! But as a safeguard we can add validation on the library to the parameters sent.
Each advantage service has it's own set of challenges, and in order to get Open edX LTI certified we need to fully support all three on at least one setting.
Edit: an extra note: it doesn't make sense to have all Advantage services working everywhere. For XBlocks it sure makes sense, but whats the use of grades outside a learning context, or access to a student list (NRPS) from a proctoring service? We can star by only worrying about actual use cases for each service to avoid the extra complications that come with making them globally available.
Initially no, but to get LTI certified we need to decouple those as well.
I don't think we should use
Yup, that's the idea, but only once we get the LTI 1.3 re-usable working. Currently we are relying on this field for limiting which data LTI Advantage services have access to.
If the goal is to make this library completely independent and push the configuration responsibility to the context, then no, we should plan to deprecate CONFIG_ON_XBLOCK.
Come to think of this, we can pass parameters when calling the API methods that define the behavior and limitations of the LTI Advantage services and store those settings somewhere on the DB. I haven't thought this one through yet though... |
I apologize for forgetting to post this here, but I have a draft ADR up that addresses many concerns in this issue. Please review, if you are able to! #281 |
@MichaelRoytman Thanks! I'll do a review pass today! |
In order to make LTI 1.3 re-usable, we need to remove any dependencies on
location
from the LTI configuration model and from the launch flow. We currently uselocation
to get contextual information and determine user permissions before an LTI launch.This is being discussed in a few different places, so I wanted to link them all together here:
We need to:
location
for LTI launches.The outcomes of this issue
Use cases
Notes:
I don't think we need to get everything working and fixed in one PR, this can be divided and worked on in smaller steps.
@tecoholic @zacharis278 @MichaelRoytman @schenedx @ormsbee
The text was updated successfully, but these errors were encountered: