Skip to content

Aggregate per-connection byte budget for structural objects on a writable listener #233

Closed

Description

@tonibergholm-codento

Spotted in the #227 review. Object::blob_size returns 0 for trees, snapshots, secrets and transcripts, so a writable sc serve connection has no aggregate byte bound on repeated PutObject of distinct structural objects. Each is individually capped by the max object size, but nothing bounds the sum per connection; the bound today is --max-connections x connection lifetime (--timeout).

This predates #227 (it was already true at the old fixed 256 MiB cap), but a raised --max-object-size (up to 1 GiB) amplifies it.

Proposal: a per-connection running byte budget on object-write verbs (PutObject, PutPack ingest) in the serve loop, with a typed refusal and a flag (or reuse of --max-pack-size semantics), mirroring the PutPack spool cap.

Until then (documented in THREAT-MODEL.md and ADR-0039): prefer read-only or token-gated listeners, keep --max-object-size low, and size --max-connections down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions