-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: LTI 1.3 reusable configuration #2
feat: LTI 1.3 reusable configuration #2
Conversation
Co-authored-by: Squirrel18 <daniel.quiroga@edunext.co> Co-authored-by: alexjmpb <alexander.mendoza@edunext.co> Co-authored-by: anfbermudezme <andres.bermudez@edunext.co> Co-authored-by: sergiovalero20 <sergio.valero@edunext.co>
dc31a69
to
9d1b22b
Compare
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.
@kuipumu, this looks good. Only a few small questions.
# Regenerate public JWK. | ||
public_keys = jwk.KEYS() | ||
public_keys.append(RSAKey( | ||
kid=self.lti_1p3_private_key_id, | ||
key=RSA.import_key(self.lti_1p3_private_key), | ||
)) | ||
self.lti_1p3_public_jwk = json.loads(public_keys.dump_jwks()) |
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.
Why do we want to regenerate JWK on every save? The LtiConfiguration
model is doing this only when the value is missing.
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 is only executed when the external configuration is saved, I don't think there is much of a performance hit compared to verifying if any key is missing every time they are being accessed. The method used on the LtiConfiguration has a disadvantage, if the LtiConfiguration private key is updated, the public JWK will need to be deleted so it's regenerated. I could add more logic to make sure the public JWK is only re-generated if the private key or private key ID is changed, but I didn't find a simple way to do this on the model save method.
Hi @Agrendalath, sorry for the delay. I just replied your comments in this PR and in openedx/xblock-lti-consumer#390 |
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.
@kuipumu, please update the version in lti_store/__init__.py
. Let's call it 1.0.0
to indicate that we don't want to introduce breaking changes here.
👍
- I tested this: LTI 1.3 configurations can be reused
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation
a2a2b04
to
f79ada7
Compare
@Agrendalath Just applied your suggestions and update the version. I didn't modified the CHANGELOG.md file since I'm not sure what standard should follow this repository. |
Description
This PR adds compatibility for LTI 1.3 external configuration to the openedx-ltistore. This change adds missing fields required for LTI 1.3 external reusable configurations to work.
Type of Change
Testing