Skip to content
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

Replace pyjwkest #290

Open
jmbowman opened this issue Jan 9, 2023 · 2 comments
Open

Replace pyjwkest #290

jmbowman opened this issue Jan 9, 2023 · 2 comments
Assignees

Comments

@jmbowman
Copy link
Contributor

jmbowman commented Jan 9, 2023

The pyjwkest package was abandoned upstream more than 3 years ago. Let's replace it with something more actively maintained. First check to see if the latest version of PyJWT (already used here) supports what we need from pyjwkest. If not, I nominate Authlib as seeming to cover the same functionality with much more usage and active maintenance, but feel free to do a quick search on PyPI or elsewhere for a better replacement.

@jmbowman
Copy link
Contributor Author

jmbowman commented Jan 9, 2023

Maybe jpadilla/pyjwt#723 added what we need? Not sure without further digging into how this works.

timmc-edx added a commit to openedx/edx-platform that referenced this issue Apr 18, 2023
This script accepts a signing JWK (presumably `JWT_PRIVATE_SIGNING_JWK`)
and ensures that it has all of the precomputed private numbers that are
required for top performance. This is necessary before moving away from
pyjwkest to PyJWT for signing JWTs. See issue
<openedx/edx-drf-extensions#290>. (Alternatively,
one could remove the p, q, dp, dq, and qi params, but there is an unknown
performance cost to doing so as we are not currently caching these keys,
and the precompution happens on every load due to the way pyjwkest's API
works.)
rgraber pushed a commit to openedx/edx-platform that referenced this issue Apr 20, 2023
…est (#32089)

* feat: Add a script to enhance JWKs in preparation for move from pyjwkest

This script accepts a signing JWK (presumably `JWT_PRIVATE_SIGNING_JWK`)
and ensures that it has all of the precomputed private numbers that are
required for top performance. This is necessary before moving away from
pyjwkest to PyJWT for signing JWTs. See issue
<openedx/edx-drf-extensions#290>. (Alternatively,
one could remove the p, q, dp, dq, and qi params, but there is an unknown
performance cost to doing so as we are not currently caching these keys,
and the precompution happens on every load due to the way pyjwkest's API
works.)

* fixup! Upgrade devstack at the same time
@robrap
Copy link
Contributor

robrap commented Apr 21, 2023

Please see #333 for related discussion. I do not know if we have custom decoding code for asymmetric JWTs, or only for the symmetric JWTs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants