-
Notifications
You must be signed in to change notification settings - Fork 17
KeyBundle's do_keys ignores invalid keys #63
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
Comments
Can you provide an example? I tried to replicate, but failed. |
You can replicate by loading a malformed RSA key from a json file given in the This happens only with I would prefer that an exception is raised in cases of corrupted/malformed keys, instead of handling it and generating new keys, but I may well be wrong. |
A challenge might be that sometimes you want to read all the keys you can and ignore the other, and sometimes you want to fail upon error. Perhaps a flag to |
Yeah, I've never been able to decide on the correct behaviour (fail or best effort). |
I'm thinking we could add a |
Code review needed by @angelakis |
What I think is more of an |
KeyBundle's do_keys method tries to load keys from a JSON jwks file and if it finds a key that is considered invalid, it overwrites it in the existing file.
Not sure if this is considered a bug, but it seems counter-intuitive to me. Maybe we should instead raise an exception and let the user/app know that there's an error with their key?
The text was updated successfully, but these errors were encountered: