Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spire-agent: limit JWT-SVID cache size #5633

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sorindumitru
Copy link
Contributor

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
spire-agent JWT-SVID cache

Description of change
This PR makes the maximum size of the JWT-SVID cache in spire-agent configurable. This avoid the cache becoming too large and using too much memory. When the cache becomes too big, the least recently used JWT-SVID is evicted.

There's more improvements that can be made here. We could also periodically try to evict expired tokens, since tokens can have different TTLs. Opening this for now to see if that's a desired behaviour.

Which issue this PR fixes
fixes #4891

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.

Convert the Agent JWT Cache into a fixed entry count cache
2 participants