Files
infrastructure/openspec/specs/public-fronts/spec.md
T

2.4 KiB

public-fronts Specification

Purpose

TBD - created by archiving change move-vps01-fronts-to-vps02. Update Purpose after archive.

Requirements

Requirement: Public Fronts Live on a Reachable Node

A hostname served to clients MUST terminate on a node whose public address is reachable from the intended audience, independently of the node that runs the backend service.

Scenario: Front is moved without touching the service

  • GIVEN a Caddy site on a node whose public IP is blocked for part of the audience
  • AND the backend service listens on another node reachable over the WireGuard mesh
  • WHEN the site block is added to a reachable node with the same upstream (via 10.8.0.x) and the DNS record is repointed
  • THEN clients reach the service through the new node
  • AND the backend service is not reconfigured, restarted or moved

Scenario: Upstream port is verified, not copied

  • GIVEN a site block that proxies to http://10.8.0.2 and nothing listens on port 80 of that host
  • WHEN the block is transferred to another node
  • THEN the upstream MUST be probed from the target node before the transfer is claimed as working (curl -o /dev/null -w '%{http_code}')
  • AND a dead upstream is corrected to the real port instead of being copied

Scenario: Cluster-backed storage is fronted by any healthy node

  • GIVEN an S3 gateway backed by a multi-node cluster where every node exposes the S3 API and sees the same buckets
  • WHEN the public front is moved to another cluster node
  • THEN that node answers S3 requests for the same buckets
  • AND an anonymous request returns the gateway's XML AccessDenied, which proves the API is served rather than a 404 from a web server

Scenario: Verification ignores the DNS cache

  • GIVEN the record TTL is measured in hours and the previous answer is cached
  • WHEN the move is verified right after the DNS change
  • THEN the check uses the explicit target address (curl --resolve host:443:<ip>) or the authoritative NS (dig @ns1.<registrar> host A)
  • AND a stale cached answer is reported as cache, not as a failed move

Scenario: Unauthenticated data services are not published

  • GIVEN an internal service that has no authentication enabled
  • WHEN its hostname is repointed to a public front
  • THEN no site block is added for it
  • AND the absence of the block is reported to the owner together with the options (enable an API key first, or keep WG-only access)