Skip to content

httpsig 2.6.0: clock_skew Signature-Error code; exp judged with no tolerance - #73

Merged
dickhardt merged 1 commit into
mainfrom
clock-skew-error
Sep 8, 2026
Merged

httpsig 2.6.0: clock_skew Signature-Error code; exp judged with no tolerance#73
dickhardt merged 1 commit into
mainfrom
clock-skew-error

Conversation

@dickhardt

Copy link
Copy Markdown
Member

Implements the clock_skew error code from the HTTP Signature Keys draft (dickhardt/signature-key#37) and the strict-exp rule from AAuth -11 (dickhardt/AAuth#153, Expiry and the Refresh Margin).

  • A signature created, or a jkt-jwt iat, further ahead of the verifier's clock than maxClockSkewclock_skew. A created older than the window stays invalid_signature.
  • jkt-jwt exp is judged against the verifier's clock with no tolerance (previously exp + maxClockSkew).
  • parseSignatureError accepts clock_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

…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
@dickhardt
dickhardt merged commit 7cff8f8 into main Sep 8, 2026
1 check failed
@dickhardt
dickhardt deleted the clock-skew-error branch September 8, 2026 13:15
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

Successfully merging this pull request may close these issues.

1 participant