carlos / platform Public

Born-HA hosts publish <host>.env, instance.key and report.token to the data bucket unsealed Issue open

Found during the durability design refresh (rev 2, branch design-carloku-durability, 2026-10-30).

Region HA P1a's files publication (internal/hostfiles/publisher.go, Publisher.put) uploads <host>.env, instance.key and report.token for a born-HA host to the region's data bucket as plaintext objects. N-HA5 syncs them about once a second.

Who can read them today:

  • every box role in the region, which can already read the tenant's database replicas;
  • the console;
  • the off-account copier the durability design adds (Hetzner, §5.5).

The last of those is the new exposure. The durability design's rule is that a secret is sealed to a key only if everyone holding that key may already hold the secret. On that rule, these objects should be sealed before they leave the box: to the deployment or fleet secrets key, the same key the console seals config to.

Impact now: none on flagship, which has no born-HA hosts. On dev, hapair-a1 and hacheck-ha1 publish this way.

Proposed: seal on publish (and open on import) in the hostfiles publisher. Alternatively, the copier excludes the files prefix until sealing lands. Either must happen before any born-HA host exists on flagship, or before the offsite copy covers data buckets, whichever comes first.

Durability 3a dev check (Task 8 Step 6): PASS. 3a merged as 44d810d0 and shipped in v0.33.4, rolled to dev at 13:50-13:58Z on 2026-11-01. The bucket is carlos-dev-ie-640012953448.

  • wakecheck (non-HA escrow): the manifest at seq 2 holds env.sealed and sealed.cutover, with no raw host.env and no live instance.key or report.token. Five minutes later there had been no new write, so an unchanged sweep costs 0 requests.
  • hapair-a1 (born-HA): it had kept a pre-3a raw host.env since 10-27. A request at 14:03Z woke it (200, 0.71 s), and the manifest then held env.sealed, sealed.cutover and wake.json, with the raw item dropped. hacheck-ha1 has never been woken, so it has no manifest.
  • The visible check: with wakecheck asleep on sophie, I removed its <host>.env (14:15:47Z, after a root-only backup) and woke it with a request. The box logged "escrow: restored wakecheck.dev.carlosframework.com.env from the bucket" and the wake took 450 ms. CARLOSADMINTOKEN and CARLOSINSTANCEKEY hash the same before and after, and the whole file is byte-identical. I compared hashes only. The backup is removed.
  • Journals: across sophie, leo, dennis, box-1 and the console there were 0 escrow errors, conflict markers, raw-secret pages or "could not be read" lines.

Still open: the historical raw objects (hapair-a1's old host.env object, for example) stay until 3b's operator migration after the restore window. #477 stays open for that.

Flagship: v0.33.4 (3a) rolled on 2026-11-01. Boxes went 16:28-16:34Z and annie's console at 16:38Z. All four boxes carry CARLOSSECRETSKEY. There were 0 escrow ALERTs, conflict markers or raw-secret pages. Manifests, item names only: annie's bunkhouse and proving hold env.sealed and sealed.cutover, with no host.env; iris's canada holds env.sealed, instance.key.sealed and sealed.cutover. adi and barbara have only hibernating routes, so they publish at their next launch. No new raw writes anywhere now. The historical raw objects wait for 3b's migration.