observability: broker-front-door-probe — a bounded POST /v1/subdomains/probe on the BROKER — the one vantage IDSS actually has #813

Closed
opened 2026-08-25 10:58:58 +00:00 by matou-build-agent · 2 comments

Parent

Feature spec: #792 — control-panel observability child spec: network (P11) (DDR 0204).
Design ticket #761; slice-map fan-in #770; wayfinder map #7.
Slice broker-front-door-probe of docs/slices/observability.yaml; covers spec #792 stories 16–20 (vantage half), 47.

What to build

Note for the swarm: this slice adds a route to the broker, a different codebase from every
other slice in this arc.

The outside-in probe needs a vantage IDSS actually has. A gateway dialling its own public address
is not outside-in — hairpin NAT makes the answer unreliable in both directions, and a probe
that can lie is a fabricated fact (ADR 0100). So v1 ships one production vantage: a bounded
POST /v1/subdomains/probe beside /point on the broker — the community's existing external
correspondent, already claim-secret authenticated (ADR 0135).

The bounds are what make it safe: it dials only the address the broker's own record already
carries for that claimed host
, and only the fixed IDSS port groups. The caller supplies no
address and no port, so the endpoint is not a general dialer. A caller-supplied address is
ignored. The answer carries per-group verdicts plus the vantage they were obtained from.

Additive and bounded: a new route beside /point, the same claim-secret gate, the same 400/401/403
shape, no change to any existing route and no new credential anywhere.

A deployment with no broker relationship has no vantage — that limit is stated by the surface
(transport-network-read / dashboard-network-surface), never papered over with an invented
open.

Acceptance criteria

  • (story 47) Given the probe route, when it answers, then the observation carries per-port-group verdicts and the vantage it was obtained from, with its timestamp.
  • (decisions) Given an authenticated claimed host, when the probe is called, then it dials only the address the broker's own record already carries for that host and only the fixed IDSS port groups.
  • (decisions) Given a caller-supplied address or port in the request, then it is ignored — the endpoint is not a general dialer.
  • (decisions) Given a missing claim secret, then the response is 401; given a wrong one, then 403; given an unclaimed host, then a client error — the same shape /point already uses (ADR 0135).
  • (decisions) Given every existing broker route, then it is unchanged by this slice, and no new credential is introduced anywhere.
  • Given the probe, then it is bounded — it does not retry unboundedly and does not become a standing loop of its own (the monitoring tick drives it, monitor-front-door-observation).

Blocked by

  • bootstrap:skeleton (#23 — done, satisfied)

Task manifest

task: observability:broker-front-door-probe
interface: a bounded `POST /v1/subdomains/probe {host}` on the **broker**, gated by that host's claim
  secret exactly as `/point` is, dialling only the broker's own recorded address for the claimed host
  on only the fixed IDSS port groups, answering per-group verdicts plus the vantage
seam: 'the existing broker HTTP test harness (prior art `broker/internal/broker/http_test.go`, `authgate_test.go`):
  an authenticated claimed host is probed at its **own recorded address**; a caller-supplied address is
  ignored; a missing secret is 401 and a wrong one 403; an unclaimed host is a client error; existing
  routes unchanged'
acceptance:
- given: an authenticated claimed host
  when: the probe is called
  then: only the broker's own recorded address for that host is dialled, on only the fixed IDSS port groups
- given: a request carrying a caller-supplied address and port
  when: the probe is called
  then: they are ignored — the endpoint is not a general dialer
- given: a missing claim secret
  when: the probe is called
  then: 401 is returned
- given: a wrong claim secret
  when: the probe is called
  then: 403 is returned
- given: an unclaimed host
  when: the probe is called
  then: a client error is returned
- given: the answer
  when: it is read
  then: it carries per-group verdicts and the vantage they were obtained from
depends_on:
- bootstrap:skeleton
out_of_scope:
- the gateway probing its own public address as a vantage — explicitly rejected (hairpin NAT; ADR 0100)
- a general-purpose dialer or any caller-supplied address/port
- any change to existing broker routes or any new credential
- recording the observation and raising off it (`monitor-front-door-observation`)
- 'building the portmap seam / router lease machinery (ADR 0141, #331)'
- founding's S10 port walkthrough and the S10b port board
needs_human_decision: []

Emitted by /to-tickets over docs/slices/observability.yaml in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.

## Parent Feature spec: **#792** — control-panel observability child spec: network (P11) (DDR 0204). Design ticket #761; slice-map fan-in **#770**; wayfinder map #7. Slice `broker-front-door-probe` of `docs/slices/observability.yaml`; covers spec #792 stories 16–20 (vantage half), 47. ## What to build **Note for the swarm: this slice adds a route to the *broker*, a different codebase from every other slice in this arc.** The outside-in probe needs a vantage IDSS actually has. A gateway dialling its own public address is **not** outside-in — hairpin NAT makes the answer unreliable in both directions, and a probe that can lie is a fabricated fact (ADR 0100). So v1 ships one production vantage: a bounded `POST /v1/subdomains/probe` beside `/point` on the broker — the community's existing external correspondent, already claim-secret authenticated (ADR 0135). The bounds are what make it safe: it dials **only the address the broker's own record already carries for that claimed host**, and **only** the fixed IDSS port groups. The caller supplies no address and no port, so **the endpoint is not a general dialer**. A caller-supplied address is ignored. The answer carries per-group verdicts **plus the vantage** they were obtained from. Additive and bounded: a new route beside `/point`, the same claim-secret gate, the same 400/401/403 shape, **no change to any existing route and no new credential anywhere**. A deployment with no broker relationship has **no vantage** — that limit is stated by the surface (`transport-network-read` / `dashboard-network-surface`), never papered over with an invented `open`. ## Acceptance criteria - [ ] (story 47) Given the probe route, when it answers, then the observation carries per-port-group verdicts **and the vantage** it was obtained from, with its timestamp. - [ ] (decisions) Given an authenticated claimed host, when the probe is called, then it dials **only the address the broker's own record already carries for that host** and **only** the fixed IDSS port groups. - [ ] (decisions) Given a caller-supplied address or port in the request, then it is **ignored** — the endpoint is not a general dialer. - [ ] (decisions) Given a missing claim secret, then the response is 401; given a wrong one, then 403; given an unclaimed host, then a client error — the same shape `/point` already uses (ADR 0135). - [ ] (decisions) Given every existing broker route, then it is unchanged by this slice, and **no new credential is introduced anywhere**. - [ ] Given the probe, then it is bounded — it does not retry unboundedly and does not become a standing loop of its own (the monitoring tick drives it, `monitor-front-door-observation`). ## Blocked by - `bootstrap:skeleton` (#23 — done, satisfied) ## Task manifest ```yaml task: observability:broker-front-door-probe interface: a bounded `POST /v1/subdomains/probe {host}` on the **broker**, gated by that host's claim secret exactly as `/point` is, dialling only the broker's own recorded address for the claimed host on only the fixed IDSS port groups, answering per-group verdicts plus the vantage seam: 'the existing broker HTTP test harness (prior art `broker/internal/broker/http_test.go`, `authgate_test.go`): an authenticated claimed host is probed at its **own recorded address**; a caller-supplied address is ignored; a missing secret is 401 and a wrong one 403; an unclaimed host is a client error; existing routes unchanged' acceptance: - given: an authenticated claimed host when: the probe is called then: only the broker's own recorded address for that host is dialled, on only the fixed IDSS port groups - given: a request carrying a caller-supplied address and port when: the probe is called then: they are ignored — the endpoint is not a general dialer - given: a missing claim secret when: the probe is called then: 401 is returned - given: a wrong claim secret when: the probe is called then: 403 is returned - given: an unclaimed host when: the probe is called then: a client error is returned - given: the answer when: it is read then: it carries per-group verdicts and the vantage they were obtained from depends_on: - bootstrap:skeleton out_of_scope: - the gateway probing its own public address as a vantage — explicitly rejected (hairpin NAT; ADR 0100) - a general-purpose dialer or any caller-supplied address/port - any change to existing broker routes or any new credential - recording the observation and raising off it (`monitor-front-door-observation`) - 'building the portmap seam / router lease machinery (ADR 0141, #331)' - founding's S10 port walkthrough and the S10b port board needs_human_decision: [] ``` --- *Emitted by `/to-tickets` over `docs/slices/observability.yaml` in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=10065
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10065 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #813 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 813,
  "status": "success",
  "commits": [
    "1aabd43"
  ],
  "changed_files": [
    "STATUS.md",
    "broker/cmd/broker/main.go",
    "broker/internal/broker/frontdoor.go",
    "broker/internal/broker/frontdoor_test.go",
    "broker/internal/broker/http.go"
  ],
  "tests": [
    {
      "command": "cd broker && go test ./...",
      "exit_code": 0
    },
    {
      "command": "cd broker && go vet ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: gofmt/build/vet/test/golangci-lint over root + broker)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "story 47 — the observation carries per-port-group verdicts AND the vantage it was obtained from, with its timestamp": "Observation{Groups[]PortGroupVerdict, Vantage, At} in broker/internal/broker/frontdoor.go; asserted by TestAPI_ProbeDialsOnlyTheRecordedAddressOnTheFixedGroups (frontdoor_test.go) — web/certificate-zone verdicts, Vantage=broker.idss.nz, At=fixed timestamp",
    "decisions — dials only the address the broker's own record carries for that host, only the fixed IDSS port groups": "FrontDoor.Probe resolves the host's A record (resolveRecordAddress) and dials only idssPortGroups (web 80/443, certificate-zone 53); test asserts every dial is to 203.0.113.10 on {80,443,53} only",
    "decisions — a caller-supplied address or port is ignored (not a general dialer)": "probeRequest.Address/Port accepted but never read in registerProbeRoute (http.go); test posts address=6.6.6.6,port=9999 and asserts no dial to them",
    "decisions — missing secret 401, wrong 403, unclaimed host client error (same shape /point uses, ADR 0135)": "registerProbeRoute calls authorizeGateway before probing; TestAPI_ProbeGatedByClaimSecret asserts 401 (no secret), 403 (wrong), 400 (unclaimed) and that a refusal dials nothing",
    "decisions — every existing broker route unchanged, no new credential introduced anywhere": "route added additively via WithFrontDoor handler option (http.go); NewHandler's existing callers unchanged; TestAPI_ProbeAbsentWithoutAFrontDoor proves the route is absent without a wired front door and existing verbs still answer; no new credential — reuses the claim secret gate",
    "bounded — does not retry unboundedly and does not become a standing loop of its own (monitor-front-door-observation drives it)": "FrontDoor.Probe is a single request-response: one dial per port (probePort), each context-timeout-bounded, no retry loop and no goroutine/ticker — documented in frontdoor.go"
  },
  "summary": "Added a bounded outside-in POST /v1/subdomains/probe on the broker that dials only the claimed host's own recorded A-record address on only the fixed IDSS port groups, claim-secret gated exactly as /point, answering per-group verdicts plus the vantage and timestamp.",
  "blockers": []
}
**close-report** for #813 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 813, "status": "success", "commits": [ "1aabd43" ], "changed_files": [ "STATUS.md", "broker/cmd/broker/main.go", "broker/internal/broker/frontdoor.go", "broker/internal/broker/frontdoor_test.go", "broker/internal/broker/http.go" ], "tests": [ { "command": "cd broker && go test ./...", "exit_code": 0 }, { "command": "cd broker && go vet ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: gofmt/build/vet/test/golangci-lint over root + broker)", "exit_code": 0 } ], "criteria": { "story 47 — the observation carries per-port-group verdicts AND the vantage it was obtained from, with its timestamp": "Observation{Groups[]PortGroupVerdict, Vantage, At} in broker/internal/broker/frontdoor.go; asserted by TestAPI_ProbeDialsOnlyTheRecordedAddressOnTheFixedGroups (frontdoor_test.go) — web/certificate-zone verdicts, Vantage=broker.idss.nz, At=fixed timestamp", "decisions — dials only the address the broker's own record carries for that host, only the fixed IDSS port groups": "FrontDoor.Probe resolves the host's A record (resolveRecordAddress) and dials only idssPortGroups (web 80/443, certificate-zone 53); test asserts every dial is to 203.0.113.10 on {80,443,53} only", "decisions — a caller-supplied address or port is ignored (not a general dialer)": "probeRequest.Address/Port accepted but never read in registerProbeRoute (http.go); test posts address=6.6.6.6,port=9999 and asserts no dial to them", "decisions — missing secret 401, wrong 403, unclaimed host client error (same shape /point uses, ADR 0135)": "registerProbeRoute calls authorizeGateway before probing; TestAPI_ProbeGatedByClaimSecret asserts 401 (no secret), 403 (wrong), 400 (unclaimed) and that a refusal dials nothing", "decisions — every existing broker route unchanged, no new credential introduced anywhere": "route added additively via WithFrontDoor handler option (http.go); NewHandler's existing callers unchanged; TestAPI_ProbeAbsentWithoutAFrontDoor proves the route is absent without a wired front door and existing verbs still answer; no new credential — reuses the claim secret gate", "bounded — does not retry unboundedly and does not become a standing loop of its own (monitor-front-door-observation drives it)": "FrontDoor.Probe is a single request-response: one dial per port (probePort), each context-timeout-bounded, no retry loop and no goroutine/ticker — documented in frontdoor.go" }, "summary": "Added a bounded outside-in POST /v1/subdomains/probe on the broker that dials only the claimed host's own recorded A-record address on only the fixed IDSS port groups, claim-secret gated exactly as /point, answering per-group verdicts plus the vantage and timestamp.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#813
No description provided.