-
Notifications
You must be signed in to change notification settings - Fork 130
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
test(l1): verify we reject invalid iat claims. #5245
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. |
|
@lakshya-sky thanks for the contribution, but commits need to be signed. See https://github.com/lambdaclass/ethrex/blob/main/CONTRIBUTING.md#commit-signature-verification for how to do it. |
Head branch was pushed to by a user without write access
Author: lakshya-sky <[email protected]> Signed-off-by: lakshya-sky <[email protected]>
Author: lakshy-sky <[email protected]> Signed-off-by: lakshya-sky <[email protected]>
df6a3ee to
446c45e
Compare
|
Hey @MegaRedHand, I've fixed the commits but it added two new reviewers while fixing it. Could you guys take a look again. Thanks! |
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