Skip to content

Remove unsafe caching#611

Merged
keiranjprice101 merged 4 commits intomainfrom
remove_unsafe_caching
Feb 23, 2026
Merged

Remove unsafe caching#611
keiranjprice101 merged 4 commits intomainfrom
remove_unsafe_caching

Conversation

@keiranjprice101
Copy link
Collaborator

@keiranjprice101 keiranjprice101 commented Feb 23, 2026

This pull request removes the caching layer for JWT (JSON Web Token) validation.

Security Impact

By shifting to real-time validation for every request, we mitigate the following threats:

  • Prevents Session Persistence via Misconfiguration: In certain cache configurations (specifically "sliding expiration"), the act of retrieving a token from the cache refreshes its Time-To-Live (TTL). This can inadvertently allow a session to remain active indefinitely as long as the user stays active, bypassing the intended hard expiry of the JWT.

  • Ensures Immediate Revocation: Currently, if a JWT is revoked (e.g., via a logout event or a security breach), a cached version of that token might remain valid until the cache entry expires. Removing the cache ensures that the system checks the current revocation status/blacklist on every request, providing immediate protection against compromised tokens.

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.26%. Comparing base (d15484e) to head (af5cce2).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #611      +/-   ##
==========================================
- Coverage   96.28%   96.26%   -0.02%     
==========================================
  Files          48       48              
  Lines        1882     1872      -10     
==========================================
- Hits         1812     1802      -10     
  Misses         70       70              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@keiranjprice101 keiranjprice101 merged commit 8b5a275 into main Feb 23, 2026
10 checks passed
@keiranjprice101 keiranjprice101 deleted the remove_unsafe_caching branch February 23, 2026 14:52
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.

2 participants