httpsig 2.6.0: clock_skew Signature-Error code; exp judged with no tolerance - #73
Merged
Conversation
…lerance The HTTP Signature Keys draft adds clock_skew for a signature `created`, or a jkt-jwt `iat`, further ahead of the verifier's clock than its validity window. Nothing is malformed or timed out — two clocks disagree — and a fresh signature or assertion from the same clock carries the same skew, so the sender waits the difference out (the response Date header is the verifier's clock) rather than refreshing. - `created` ahead of the clock by more than maxClockSkew → clock_skew; older than the window stays invalid_signature (stale or replayed) - jkt-jwt `iat` ahead by more than maxClockSkew → clock_skew (was an untyped error mapped to invalid_signature) - jkt-jwt `exp` is judged against the verifier's clock with no tolerance (was exp + maxClockSkew): the sender refreshes before expiry, the verifier does not allow for it - clock_skew accepted by parseSignatureError; README and tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEeAq61zr1oVg5FAFf3JTH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
clock_skewerror code from the HTTP Signature Keys draft (dickhardt/signature-key#37) and the strict-exprule from AAuth -11 (dickhardt/AAuth#153, Expiry and the Refresh Margin).created, or ajkt-jwtiat, further ahead of the verifier's clock thanmaxClockSkew→clock_skew. Acreatedolder than the window staysinvalid_signature.jkt-jwtexpis judged against the verifier's clock with no tolerance (previouslyexp + maxClockSkew).parseSignatureErroracceptsclock_skew; README documents the code and the change.200 tests passing. Publish by creating a GitHub release after merge (release.yml).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FEeAq61zr1oVg5FAFf3JTH