-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Removed error prone key decode looping #7325
base: master
Are you sure you want to change the base?
Conversation
@yoshiokatsuneo any clue who might be invested in / responsible for the authentication related code? |
redash/authentication/jwt_auth.py
Outdated
else: | ||
if url.startswith(FILE_SCHEME_PREFIX): | ||
keys = [get_public_key_from_file(url)] | ||
key = [get_signing_key_from_file(url)] |
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.
I just guess that "key" should not be an array.
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.
thanks, should be fixed now
@kuranium |
What type of PR is this?
Description
Old implementation could loop thru irrelevant public keys and trying to decode with them, causing unnecessary and missleading exceptions in logs.
In this commit the "net" fetched keys get filtered upon fetching, using the basic jwt functionality. So now we only use and cache keys with matching "kid" fields.
How is this tested?
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)