Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

authorizationCache has no size bound between resets

Open Beginner friendly
#3,312 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript

Research direction

Start by reading security/auth.ts and locate authorizationCache, its invalidation paths, and periodic reset tick. Add a bounded eviction policy or sweep expired authExpiresAt entries there; run the relevant authentication tests and verify the cache stays bounded or expired entries are removed.

Written by the indexing model from the issue text.

Description

authorizationCache in security/auth.ts is a Map keyed by the full Authorization header. It is replaced on any user/role invalidation and on its periodic reset, but has no size bound in between. Clients that rotate Bearer tokens often (short-lived access tokens, many clients) add one entry per distinct token until the next reset. Expired entries are only evicted when the same header is seen again.

Impact is memory growth bounded by the token rate times the reset interval, per worker. Basic credentials and Harper operation tokens behave the same; component Bearer validators (server.registerBearerValidator, in review) add another source of rotating headers.

Fix direction: cap the map (drop the oldest entries past a size limit), or sweep expired authExpiresAt entries on the periodic reset tick.

Found by the pre-push review of the registerBearerValidator branch.

Review-Deferral: a6a257702252e7a8 severity=nit category=reliability

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp.

Dominant language
JavaScript
Stars
90
Forks
15
Avg merge
2d 14h
Merged PRs (30d)
328

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/harper

All issues in HarperFast/harper

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.