-
Notifications
You must be signed in to change notification settings - Fork 118
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
Misleading error message when validating audience of JWT against check_claims #239
Comments
This sounds like a bug. |
What version of jwcrypto are you using ? |
I'm on 1.0 |
Internally it looks as if there is a And if that is allowed how should it be handled? |
Ok, I thought this was a bug, but after creating a patch for it I realized it looks to me you are using this backwards. The 'aud' claim in the token can be a list, because the token can be defined to be intended for multiple host/ervices/entities. What is the context in which this bug arose? |
I think you’re right and that I misused the aud in check_claims. |
Yeah I guess we can check that the check_claims are strings as well, wherever appropriate. |
Issue latchset#239 brought up that check_claims are not actually checked to be of the right type and this can lead to confusion in some case, as well as defer error reporting after potentially costly signature computations. Check for general claims type validity upfront where appropriate. Resolves latchset#239 Signed-off-by: Simo Sorce <[email protected]>
Issue latchset#239 brought up that check_claims are not actually checked to be of the right type and this can lead to confusion in some case, as well as defer error reporting after potentially costly signature computations. Check for general claims type validity upfront where appropriate. Resolves latchset#239 Signed-off-by: Simo Sorce <[email protected]>
Issue #239 brought up that check_claims are not actually checked to be of the right type and this can lead to confusion in some case, as well as defer error reporting after potentially costly signature computations. Check for general claims type validity upfront where appropriate. Resolves #239 Signed-off-by: Simo Sorce <[email protected]>
Im confused by the error message when validating a JWT's
aud
claim against thecheck_claims
parameter when initalizing aJWT
.Below is an example to clarify
this throws
jwcrypto.jwt.JWTInvalidClaimValue: Invalid 'aud' value. Expected 'www.example.com' to be in '['www.example.com', 'account']'
Which is a mystifying error as
I'm not sure if there is a problem in the code or if "I'm just doing it wrong"
The text was updated successfully, but these errors were encountered: