fix: reject jwt-bearer assertions with future iat claim#877
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR rejects JWT assertions whose ChangesJWT issued-at future timestamp validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c3d52c8 to
5587dd9
Compare
Rejects
urn:ietf:params:oauth:grant-type:jwt-bearerassertions whoseiatclaim is in the future. Previously the max-duration check usedexp - iat, so a token withiatset far ahead would always satisfy the bound regardless ofexp.Related Issue or Design Document
Closes #853
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
Further comments
The bug is described in the public issue #853 (open since April 2025); the reporter notes the implications are minor (long-lived JTIs accumulating in storage). The fix mirrors the existing
nbfvalidation pattern in the same function.Summary by CodeRabbit
Bug Fixes
Tests