Skip to content

feat: add bounded memory protection for session store #52

@pavelanni

Description

@pavelanni

Summary

The in-memory session store (internal/session/store.go) has no limits on the number of sessions or messages per session. A misbehaving client could exhaust server memory.

What to add

  • Max sessions: configurable limit (e.g., 1000), reject new sessions with an error when exceeded or evict LRU
  • Max messages per session: configurable limit (e.g., 200 messages), trigger compaction or truncation when exceeded
  • Session ID validation: currently truncated to 64 chars; consider restricting to alphanumeric + hyphens

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions