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

Select JWK by kid to get around python-jose bug #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Nov 8, 2022

Python jose has a bug where it'll crash with a JWK type mismatch when validating a JWT against a heterogeneous set of JWKs. I opened a PR against the project to manage that case better in accordance with the JOSE RFC, but that project is is poorly maintained and so it may be worthwhile to work around it for now.

Also, it may be worth switching to PyJWT, which supports this use case just as well and is better maintained.

Python jose has a bug where it'll crash with a JWK type mismatch when
validating a JWT against a heterogeneous set of JWKs. I opened a PR
against the project to manage that case better in accordance with the
JOSE RFC, but that project is is poorly maintained and so it may be
worthwhile to work around it for now.

Also, it may be worth switching to PyJWT, which supports this use case
just as well and is better maintained.
@ghost
Copy link
Author

ghost commented Nov 8, 2022

mpdavis/python-jose#304 This is the Upstream PR

@samedii
Copy link
Collaborator

samedii commented Dec 10, 2022

Thanks for the PR! Sorry getting a lot of github emails and missed this. I think this looks okay. Would indeed prefer to migrate PyJWT if you think it's better maintained.

I need to spend some time testing this doesn't break anything for us since we use this in production

@ghost
Copy link
Author

ghost commented Dec 13, 2022

@samedii No worries! I maintain a fork we're using ourselves for this, I can help migrate to pyJWT if you're interested. I'd rather help maintain code than start yet another fork.

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

Successfully merging this pull request may close these issues.

2 participants