Add LTI 1.1 config handler for the /lti11/config route - #67
Conversation
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
Signed-off-by: Greg Werner <werner.greg@gmail.com>
consideRatio
left a comment
There was a problem hiding this comment.
This looks good to me but there were some issues with the markdown in the README.md after merging some formatting PR I think =/
Let's stop using explicit numbers and use 1. at all time to avoid numbering issues and make sure all numbered bullet points have their content indented under it.
|
Hi, @consideRatio thanks for the detailed review comments regarding the docs. I found some issues when testing with our Canvas sandbox and am updating the handlers/tests so will make sure to update the docs as well with the next push. |
|
@jgwerner absolutely! Btw, do you think of this as something to release in 1.1.0 or later? Note I never cut that release when I ran into the outdated RELEASE.md docs. |
Signed-off-by: Greg Werner <werner.greg@gmail.com>
|
@consideRatio this should be ready now. The docs are updated and completed e2e tests with Canvas and Moodle.
I'm not sure if you follow the Semantic Release convention or not (I think @yuvipanda once mentioned that you do not). If you do, then this PR adds a new feature so it should require a new minor release version. If not, your call! |
Signed-off-by: Greg Werner <werner.greg@gmail.com>
There was a problem hiding this comment.
I made some documentation suggestions, but otherwise this LGTM from what I can tell.
Thank you for your thorough work on this @jgwerner!! ❤️ 🎉!
| There are two configuration values to define with LTI 1.1: | ||
|
|
||
| Now we will use these strings to allow edX and JupyterHub to authenticate each other. | ||
| - The **consumers** setting: the value for the LTI 1.1 configuration `consumer key` and `shared secret`. | ||
| - The **username_key** setting: the parameter from the LTI 1.1 launch request used to set the JupyterHub username. | ||
| - The **config_description** setting: | ||
| - The **config_icon** setting: | ||
| - The **config_title** setting: | ||
|
|
||
| _Note_: These commands will simply generate strings for you, it will not store them anywhere on the computer. Therefore you do not need to run these commands on your JupyterHub server--we will be supplying them manually in the next few steps. | ||
| | LTI Authenticator Configuration Setting | Required | Description | Default | | ||
| | --------------------------------------- | -------- | ------------------------------------------------------------------------ | ---------------------------------- | | ||
| | config_description | No | The LTI 1.1 external tool description | `JupyterHub LTI 1.1 external tool` | | ||
| | config_icon | No | The http/s URL with the LTI 1.1 icon | `nil` | | ||
| | config_title | No | The LTI 1.1 external tool Title | `JupyterHub` | | ||
| | consumers | Yes | The key/value pair that represents the client key and shared secret | `{}` | | ||
| | username_key | No | The LTI 1.1 launch parameter that contains the JupyterHub username value | `canvas_custom_user_id` | |
There was a problem hiding this comment.
This section is confusing to me.
- "There are two configuration values to define with LTI 1.1:"
I wonder both about "two" and "to define". Is the user required to set two values? Then why do I only see one listed as required in the table below? - There is a bullet list table, followed by a markdown formatted table and both include the same things. I assume the bullet list table should be removed as an outdated duplicate.
There was a problem hiding this comment.
You're right, I goofed and had left the bullets in there by mistake. Only the table is documented now.
| # Custom config for JupyterHub's helm chart | ||
| auth: | ||
| type: "lti" | ||
| lti: | ||
| consumers: { "client-key": "client-secret" } | ||
| username_key: "lis_person_contact_email_primary" | ||
| config_icon: "https://my.static.assets/img/icon.jpg" |
There was a problem hiding this comment.
The documentation above is outdated, it should be like this since ~0.10.X or 0.11.X i think, and the chart is now at 1.1.3.
| # Custom config for JupyterHub's helm chart | |
| auth: | |
| type: "lti" | |
| lti: | |
| consumers: { "client-key": "client-secret" } | |
| username_key: "lis_person_contact_email_primary" | |
| config_icon: "https://my.static.assets/img/icon.jpg" | |
| # Custom config for JupyterHub's helm chart | |
| hub: | |
| config: | |
| # Additional documentation related to authentication and authorization available at | |
| # https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/authentication.html | |
| JupyterHub: | |
| authenticator_class: lti | |
| LTI11Authenticator: | |
| consumers: { "client-key": "client-secret" } | |
| username_key: "lis_person_contact_email_primary" | |
| config_icon: "https://my.static.assets/img/icon.jpg" |
| ``` | ||
|
|
||
| _Note_: You will see **Client Key** and **Consumer Key** used interchangably. | ||
| > _Note_: all settings available with the `jupyterhub-ltiauthenticator` package are available with the `lti` key when defining a custom config for the JupyterHub helm chart. |
There was a problem hiding this comment.
| > _Note_: all settings available with the `jupyterhub-ltiauthenticator` package are available with the `lti` key when defining a custom config for the JupyterHub helm chart. | |
| > _Note_: Configuring for example `hub.config.LTI11Authenticator.username_key=lis_person_contact_email_primary` above is the same as in a `jupyterhub_config.py writing `c.LTI11Authenticator.username_key = lis_person_contact_email_primary`. |
|
@jgwerner how is the endpoint |
|
|
||
| class LTI11ConfigHandler(BaseHandler): | ||
| """ | ||
| Renders LTI 1.1 configuration file in XML format. |
There was a problem hiding this comment.
Could you elaborate a bit in this docstring, perhaps link out to relevant schemas as described in #49?
|
@consideRatio updates are pushed based on your suggestions |
consideRatio
left a comment
There was a problem hiding this comment.
Wieee nice! Ready for merge I'd say, do you want to review this also @yuvipanda?
|
Go for it, @consideRatio. Let's be generous with our minor versions :) |
|
Wieeee great work as always @jgwerner, I appreciate how caring you are for this project!! |
Closes #49