Skip to content

What's the real error when getting KeyError: 'keys' #77

@JuR-0

Description

@JuR-0

We have an aws authorizer using okta-jwt-python.
Sometimes when we try to verify the token we get a JWTValidationException:
JWTValidationException: 'keys'
This error is returned by verify_access_token: jwt_verifier.py at line 101.
By looking at the traceback we can find the origin of the error to be :
for key in jwks['keys']: in _get_jwk_by_kid, jwt_verifier.py at line 180

The error is quite frankly not self explainative at all. I wanted to know what was the real error when jwks has no "keys" ? Is it possible to update the error handling accordingly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions