resource 2.4.0: clock_skew for a future iat; exp judged with no tolerance - #26
Merged
Conversation
…ance
AAuth -11 §Expiry and the Refresh Margin: a verifier judges exp against
its own clock with no skew tolerance — the agent refreshes at least five
minutes before expiry — and iat is not a validity check, except that a
verifier MAY refuse an iat further ahead of its clock than the signature
validity window, answering clock_skew.
- jose clockTolerance is 0: `exp` five seconds past is token_expired
- clockToleranceSeconds (default 60) now bounds `iat` alone; beyond it
verifyToken throws AAuthTokenError('clock_skew'), exported as
CLOCK_SKEW — the Signature-Error value a resource returns with 401
- README: the new code, and the 2.4.0 change note
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 AAuth -11 §Expiry and the Refresh Margin (dickhardt/AAuth#153) in
@aauth/resource:expis judged against the verifier's clock with no tolerance (joseclockTolerance: 0). The agent refreshes at least five minutes before expiry; the verifier does not allow for skew.clockToleranceSeconds(default 60, the signaturecreatedwindow) now boundsiatalone. Aniatbeyond it throwsAAuthTokenError('clock_skew'), exported asCLOCK_SKEW— theSignature-Errorvalue a resource returns with401(Add the revoked_jwt error code dickhardt/signature-key#37). The issuer's clock, not the token, is at fault; the presenter waits rather than refreshes.137 resource tests, 760 repo-wide, typecheck clean. Release after merge per CLAUDE.md (
gh release create); consumers to follow: access (mapsAAuthTokenErrorcodes), test-resource.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEeAq61zr1oVg5FAFf3JTH