-
Notifications
You must be signed in to change notification settings - Fork 118
test(l1): verify we reject invalid iat claims. #5245
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
base: main
Are you sure you want to change the base?
Conversation
mpaulucci
left a comment
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.
LGTM
|
Are the tests running? They should fail, given the documented behavior of the library. |
|
Hey @Oppen, yes tests are running here at https://github.com/lambdaclass/ethrex/actions/runs/19242301387/job/55007724747?pr=5245#step:5:843 As you can see when deserialize the claims part of the token we expect iat claim, if its not there it would throw error. When iat is available and its value is not within 60s range then we throw error. If the library were to check the iat claims it would do the same as we are doing it here. |
Yes, a teammate showed me it's being checked externally. Not obvious, but it works. |
Motivation
jsonwebtoken crate doesn't validate
iatclaims even if we explicitly ask it, hence we needed tests.Description
Added unit tests to correctly reject invalid
iatclaims.Closes #5074