Skip to content

ingestor: warn when observerIATAWhitelist drops a region without unbounded throttle state #110

Closed

Description

@dborup

Upstream source

Evaluate and port Kpa-clawbot/CoreScope#2067: emit a throttled warning when observerIATAWhitelist rejects an incoming region.

Why this is still relevant here

Current fork master silently returns when Config.IsObserverIATAAllowed(parts[1]) is false. A legitimate region omitted from the allow-list can therefore lose all traffic without an operator-facing explanation.

The upstream implementation also fixes an important abuse case: the rejected IATA/topic segment is publisher-controlled, so an unbounded per-code throttle map would be a remote memory sink.

Acceptance criteria

  • A rejected region produces a fixed, grep-friendly warning containing the normalized region code.
  • Repeated traffic for the same code is throttled using a configurable interval with a safe default.
  • The per-code throttle state is strictly bounded.
  • Traffic beyond the bound is not silently ignored; use a bounded/shared overflow warning path.
  • Expired entries are reclaimed so the first observed codes do not own the map forever.
  • Allowed traffic and an empty whitelist behave exactly as today.
  • Tests cover normal throttling, interval expiry, more distinct attacker-controlled values than the cap, overflow behaviour and expired-slot reclamation.
  • Run the ingestor suite with -race.
  • Document the optional configuration key in this fork's configuration reference/example if one exists.

No production configuration change or deploy is part of this issue.

Activity

  1. dborup commented on Sep 29, 2026

    @dborup
    OwnerAuthor

    Draft PR #134 klar til review: CI grøn (Go Build & Test, Playwright E2E og Docker build), throttlet og begrænset advarsel når observerIATAWhitelist afviser en IATA-kode (maks. 512 sporede koder, interval 6 t som standard, konfigurerbart via iataWarnIntervalSec).


    Generated by Claude Code

  2. dborup commented on Sep 30, 2026

    @dborup
    OwnerAuthor

    Fixed by #134 (merged as 76ba11a1). Follow-up: clamp a very large iataWarnIntervalSec (overflow to a negative interval) is tracked in #150.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions