Skip to content

fix: authenticate route-affinity metadata and bound multipart forwarding #136

Description

@chubes4

Found during merge-gate review of #135.

Problem

Route-affinity consumers can trust caller-supplied verified/client/remote-address metadata, allowing throttle identity spoofing. Multipart forwarding also hashes/loads files before public admission and does not preserve authenticated cookie/bearer identity like the standard cross-site helper.

Scope

  • Replace public-header trust with server-verifiable affinity metadata tied to the forwarded request and target.
  • Never preserve caller-supplied _ec_affinity_* identity fields.
  • Preserve canonical authenticated identity for JSON and multipart forwarding without forwarding arbitrary user IDs.
  • Enforce file count/per-file/aggregate bounds before hashing or loopback forwarding.
  • Provide streaming/bounded multipart construction rather than unbounded memory concatenation where supported.
  • Make public-write rate limiting concurrency-safe through the existing shared admission primitive.

Acceptance

Direct target-host spoofing, rotated client IDs, authenticated multipart, source-to-target JSON/multipart, concurrent limits, and oversized invalid-Turnstile requests are tested.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions