Skip to content
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

Review: Disable unreliable check between current times of different systems #17 #20

Open
hugoib opened this issue Oct 9, 2024 · 1 comment
Assignees

Comments

@hugoib
Copy link
Collaborator

hugoib commented Oct 9, 2024

Given a bug found in our verifier, this change was performed:

https://github.com/adorsys/sd-jwt/pull/17/files

Revise the question and check if it makes sense within the specs.

@IngridPuppet IngridPuppet self-assigned this Oct 23, 2024
@IngridPuppet
Copy link
Collaborator

IngridPuppet commented Oct 23, 2024

The issue about validating that the iat claim is not in the future has sparked interesting discussions in other projects:

One thing is clear: the JWT spec does not prompt for this check and many implementations do not do it. While it sounds logical to validate that iat is not in the future, the record of real-word problems occasioned by the check, as reported in the linked discussions, justified the decision to drop it. Considering a tolerance window or leeway might mitigate the issue, but it is still not safe enough.

That said, dropping the iat check in https://github.com/adorsys/sd-jwt/pull/17/files was indeed the right move to take.

Note that the specs on SD-JWT verification talks about checking time-related claims in these statements:

Check that the [Issuer-signed JWT] is valid using claims such as nbf, iat, and exp in the processed payload.
Check that the creation time of the Key Binding JWT, as determined by the iat claim, is within an acceptable window.

I believe we can remain compliant and more reliable with these further changes:

  • Completely remove iat checks beyond emptying the corresponding method definition, as we did.
  • Introduce a configurable leeway for nbf and exp checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants