Skip to content

fix(jwt): distinguish epoch-zero time claims from missing claims - #209

Open
swayne275 wants to merge 1 commit into
mainfrom
swayne/fix-issue-208
Open

swayne275 wants to merge 1 commit into
mainfrom
swayne/fix-issue-208

Conversation

@swayne275

@swayne275 swayne275 commented Oct 8, 2026 •

Copy link
Copy Markdown

PCI review checklist

only derive nbf/iat if not provided (rather than provided but 0)

fixes issue 208

once this merges we should cut a new release so downstream products can update

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation correctly addresses the reported ambiguity and includes comprehensive regression coverage.

0 open findings

What changed in this PR

Fixes issue #208 by distinguishing explicit Unix-epoch JWT time claims from missing claims.

Changes:

  • Uses nil checks when deriving and validating time claims.
  • Adds epoch-zero, missing, and null claim tests.
  • Documents the corrected behavior.
File Description
jwt/​jwt.go Preserves explicit zero-value time claims.
jwt/​time_claims_test.go Tests time-claim presence and derivation.
jwt/​README.md Documents time-claim semantics.
CHANGELOG.md Records the bug fix.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation correctly addresses issue #208 with comprehensive regression coverage and consistent documentation.

0 open findings

🧠 Review effort: Balanced

@swayne275
swayne275 marked this pull request as ready for review October 8, 2026 21:56
@swayne275
swayne275 requested a review from a team as a code owner October 8, 2026 21:56
@swayne275
swayne275 requested a review from jimlambrt October 8, 2026 21:56
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.

JWT validation treats 0 as an omitted time claim

2 participants