rehearsal: no live broker behind broker.idss.nz — nothing holds the Cloudflare token, the drive's claim leg has nowhere to land #395

Closed
opened 2026-08-10 13:02:58 +00:00 by ben · 4 comments
Owner

The drive env on matou-workstation is correctly pointed (OURCLOUD_BROKER_URL=https://broker.idss.nz) and the workstation itself needs no zone credential — by design the broker is the only DNS writer, booting on OURCLOUD_CLOUDFLARE_TOKEN (ADR 0128, broker/cmd/broker/main.go:58; matou-ops boot injection). But probing 2026-08-10 ~13:00Z:

  • broker.idss.nz A → 143.198.134.168 (the mail.matou.nz droplet) — its Caddy answers HTTP 308→https but TLS fails (tlsv1 alert internal error): no vhost/cert for the name; SSH probe of what's behind it was blocked from this session.
  • matou-prod (128.199.220.197, where STATUS says apex + * point) serves a fallback cert maramataka-api.matou.nz for the broker SNI — no broker vhost there either.

So every rehearsal drive so far would have died at the S5 claim even with the fixture selector fixed — the wizard's claim-subdomain has no reachable broker, and no running broker holds the Cloudflare token to write rehearsal.idss.nz.

Ben's leg (secrets + matou-ops): decide the broker's home (mail droplet vs matou-prod — the current A record says mail), deploy the broker service there with OURCLOUD_CLOUDFLARE_TOKEN (+ optional OURCLOUD_CLOUDFLARE_ZONE_ID) injected at boot, give Caddy the broker.idss.nz vhost, and confirm the A record matches the chosen home. Smoke = a claim-check POST answering over TLS.

Blocks the standing drive issue #378 via native dependency. Related: #394 (the app claims into the matou.nz zone — same S5 leg), #322 (broker mutation auth — worth landing before the broker goes properly live).

The drive env on matou-workstation is correctly pointed (`OURCLOUD_BROKER_URL=https://broker.idss.nz`) and the workstation itself needs no zone credential — by design the **broker** is the only DNS writer, booting on `OURCLOUD_CLOUDFLARE_TOKEN` (ADR 0128, `broker/cmd/broker/main.go:58`; matou-ops boot injection). But probing 2026-08-10 ~13:00Z: - `broker.idss.nz` A → **143.198.134.168 (the mail.matou.nz droplet)** — its Caddy answers HTTP 308→https but TLS fails (`tlsv1 alert internal error`): no vhost/cert for the name; SSH probe of what's behind it was blocked from this session. - `matou-prod` (128.199.220.197, where STATUS says apex + `*` point) serves a fallback cert `maramataka-api.matou.nz` for the broker SNI — no broker vhost there either. So every rehearsal drive so far would have died at the S5 claim even with the fixture selector fixed — the wizard's `claim-subdomain` has no reachable broker, and no running broker holds the Cloudflare token to write `rehearsal.idss.nz`. Ben's leg (secrets + matou-ops): decide the broker's home (mail droplet vs matou-prod — the current A record says mail), deploy the broker service there with `OURCLOUD_CLOUDFLARE_TOKEN` (+ optional `OURCLOUD_CLOUDFLARE_ZONE_ID`) injected at boot, give Caddy the `broker.idss.nz` vhost, and confirm the A record matches the chosen home. Smoke = a claim-check POST answering over TLS. Blocks the standing drive issue #378 via native dependency. Related: #394 (the app claims into the matou.nz zone — same S5 leg), #322 (broker mutation auth — worth landing before the broker goes properly live).
Author
Owner

Reachability addendum (2026-08-10 ~13:20Z, with Ben's permission to inspect the mail VPS): SSH to 143.198.134.168 is network-filtered — ports 22 and 2222 time out from both matou-workstation and Ben's laptop (the laptop's workspace ssh-config alias points at this box, user dev); only 80/443 answer (Caddy). doctl compute firewall list on the account is empty, so the block is host-level (ufw/iptables, or sshd bound to a VPN/mesh interface only). Whether a broker service sits behind that Caddy un-fronted therefore can't be confirmed remotely — inspect via the DO web console (or the box's usual private path): systemctl list-units | grep -i broker, grep -rn -i broker /etc/caddy/, ss -tlnp | grep 8080.

Reachability addendum (2026-08-10 ~13:20Z, with Ben's permission to inspect the mail VPS): SSH to 143.198.134.168 is **network-filtered** — ports 22 and 2222 time out from both matou-workstation and Ben's laptop (the laptop's `workspace` ssh-config alias points at this box, user `dev`); only 80/443 answer (Caddy). `doctl compute firewall list` on the account is **empty**, so the block is host-level (ufw/iptables, or sshd bound to a VPN/mesh interface only). Whether a broker service sits behind that Caddy un-fronted therefore can't be confirmed remotely — inspect via the DO web console (or the box's usual private path): `systemctl list-units | grep -i broker`, `grep -rn -i broker /etc/caddy/`, `ss -tlnp | grep 8080`.
Author
Owner

CONFIRMED from inside the box (2026-08-10 ~13:30Z, over Netbird — workspace.netbird.selfhosted = 100.98.48.68, SSH as dev; public :22 is closed, the mesh is the door): the mail droplet has no broker at all. No broker/ourcloud systemd unit, no broker container (it runs Stalwart, the self-hosted Netbird control plane, acme-dns, forms, admin dashboards; both :8080 listeners are Stalwart's), and Caddy serves nine matou.nz vhosts — zero idss.nz, zero broker. So the earlier caveat is resolved: the broker binary is deployed nowhere; the broker.idss.nz A record points at a box that has never heard of it, and Caddy's TLS alert is just the missing vhost.

Remaining decision is exactly the ticket body's: pick the broker's home (this box already fronts public 443 with Caddy conf.d/ drop-ins, so a broker.idss.nz vhost + the broker container/unit + OURCLOUD_CLOUDFLARE_TOKEN injection would fit the existing pattern; or move the A record to matou-prod and deploy there), then smoke a claim-check POST over TLS.

CONFIRMED from inside the box (2026-08-10 ~13:30Z, over Netbird — `workspace.netbird.selfhosted` = 100.98.48.68, SSH as `dev`; public :22 is closed, the mesh is the door): the mail droplet has **no broker at all**. No broker/ourcloud systemd unit, no broker container (it runs Stalwart, the self-hosted Netbird control plane, acme-dns, forms, admin dashboards; both :8080 listeners are Stalwart's), and Caddy serves nine `matou.nz` vhosts — zero `idss.nz`, zero broker. So the earlier caveat is resolved: the broker binary is deployed **nowhere**; the `broker.idss.nz` A record points at a box that has never heard of it, and Caddy's TLS alert is just the missing vhost. Remaining decision is exactly the ticket body's: pick the broker's home (this box already fronts public 443 with Caddy `conf.d/` drop-ins, so a `broker.idss.nz` vhost + the broker container/unit + `OURCLOUD_CLOUDFLARE_TOKEN` injection would fit the existing pattern; or move the A record to matou-prod and deploy there), then smoke a claim-check POST over TLS.
Author
Owner

DEPLOYED 2026-08-10 ~13:50Z (Ben directed: broker on the mail droplet, fronted by its Caddy).

  • Binary: static CGO_ENABLED=0 build of broker/cmd/broker at main b85e341, sha256 949e467b…b4cb64, installed /usr/local/bin/ourcloud-broker (built on matou-workstation from a fresh clone; shipped over the Netbird mesh — public :22 stays shut).
  • Service: ourcloud-broker.service — DynamicUser, StateDirectory=ourcloud-broker (durable ledger at /var/lib/ourcloud-broker/reservations.json, the #278 invariant), EnvironmentFile=/etc/ourcloud/broker.env (root:600), BROKER_ADDR=127.0.0.1:8090 (8080 is Stalwart's), enabled + active. Boot log: real Cloudflare idss.nz zone binding configured (ADR 0128) + durable reservation ledger configured.
  • Vhost: /etc/caddy/conf.d/broker.caddy → reverse_proxy 127.0.0.1:8090, Caddy reloaded.
  • Smoke GREEN: Let's Encrypt cert minted CN=broker.idss.nz; POST /v1/subdomains/point {} over public TLS → HTTP 400 broker JSON via Caddy; token sanity: read-only CF GET /zones?name=idss.nz with the injected credential → success, zone active. The rehearsal slug was deliberately NOT pre-claimed — the drive's wizard leg owns that claim.
  • #322/ADR 0135 checked before fronting: mutation auth (claim secret) is in this build.

One interim left for Ben's ruling before this issue is done: the injected credential is the lab-dns Cloudflare token (identical zone-wide scope — CF can't fence below the zone), NOT the dedicated ourcloud-broker token ADR 0128 names; that token wasn't findable in any reachable store. Swap = mint in the CF dashboard, replace the value in /etc/ourcloud/broker.env, systemctl restart ourcloud-broker.

**DEPLOYED 2026-08-10 ~13:50Z** (Ben directed: broker on the mail droplet, fronted by its Caddy). - Binary: static `CGO_ENABLED=0` build of `broker/cmd/broker` at main `b85e341`, sha256 `949e467b…b4cb64`, installed `/usr/local/bin/ourcloud-broker` (built on matou-workstation from a fresh clone; shipped over the Netbird mesh — public :22 stays shut). - Service: `ourcloud-broker.service` — `DynamicUser`, `StateDirectory=ourcloud-broker` (durable ledger at `/var/lib/ourcloud-broker/reservations.json`, the #278 invariant), `EnvironmentFile=/etc/ourcloud/broker.env` (root:600), `BROKER_ADDR=127.0.0.1:8090` (8080 is Stalwart's), enabled + active. Boot log: `real Cloudflare idss.nz zone binding configured (ADR 0128)` + `durable reservation ledger configured`. - Vhost: `/etc/caddy/conf.d/broker.caddy` → `reverse_proxy 127.0.0.1:8090`, Caddy reloaded. - Smoke GREEN: Let's Encrypt cert minted `CN=broker.idss.nz`; `POST /v1/subdomains/point {}` over public TLS → HTTP 400 broker JSON via Caddy; token sanity: read-only CF `GET /zones?name=idss.nz` with the injected credential → success, zone active. The `rehearsal` slug was deliberately NOT pre-claimed — the drive's wizard leg owns that claim. - #322/ADR 0135 checked before fronting: mutation auth (claim secret) is in this build. **One interim left for Ben's ruling before this issue is done:** the injected credential is the `lab-dns` Cloudflare token (identical zone-wide scope — CF can't fence below the zone), NOT the dedicated `ourcloud-broker` token ADR 0128 names; that token wasn't findable in any reachable store. Swap = mint in the CF dashboard, replace the value in `/etc/ourcloud/broker.env`, `systemctl restart ourcloud-broker`.
Author
Owner

Ruled closed by Ben 2026-08-10: broker deployed + smoke green at https://broker.idss.nz (comment 5480). The interim lab-dns Cloudflare token stands until Ben mints the dedicated ourcloud-broker token (swap in /etc/ourcloud/broker.env + restart) — accepted as a non-gating follow-up.

Ruled closed by Ben 2026-08-10: broker deployed + smoke green at https://broker.idss.nz (comment 5480). The interim lab-dns Cloudflare token stands until Ben mints the dedicated ourcloud-broker token (swap in /etc/ourcloud/broker.env + restart) — accepted as a non-gating follow-up.
ben closed this issue 2026-08-10 14:08:25 +00:00
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#395
No description provided.