6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-04 19:03:39 +00:00

fix: include full-complement paramters in `JWT_PRIVATE_SIGNING_JWK`

Addresses the breaking upstream change in this commit:
92731be0dc

See Changelog entry for details.
This commit is contained in:
Kyle D. McCormick 2023-10-20 14:36:00 -04:00 committed by Régis Behmo
parent c99958893e
commit 7f47c3c8af
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
- [Bugfix] Updated how the Tutor setting ``JWT_RSA_PRIVATE_KEY`` is rendered into the LMS Django setting ``JWT_AUTH['JWT_PRIVATE_SIGNING_JWK']`` as required by a recent breaking upstream change. The new representation of the ``JWT_PRIVATE_SIGNING_JWK`` simply adds the ``dq``, ``dp``, and ``qi`` parameters. Without this fix, LMS would encounter an ``InvalidKeyError`` on all logins (by @kdmccormick).

View File

@ -189,6 +189,9 @@ JWT_AUTH["JWT_PRIVATE_SIGNING_JWK"] = json.dumps(
"n": "{{ jwt_rsa_key.n|long_to_base64 }}",
"p": "{{ jwt_rsa_key.p|long_to_base64 }}",
"q": "{{ jwt_rsa_key.q|long_to_base64 }}",
"dq": "{{ jwt_rsa_key.dq|long_to_base64 }}",
"dp": "{{ jwt_rsa_key.dp|long_to_base64 }}",
"qi": "{{ jwt_rsa_key.invq|long_to_base64 }}",
}
)
JWT_AUTH["JWT_PUBLIC_SIGNING_JWK_SET"] = json.dumps(