Skip to content

Withdraw the CLI's SSH DNS registration; spored is the registrar (#872) - #892

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/872-withdraw-cli-dns
Oct 13, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/872-withdraw-cli-dns

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #872

Decision: withdraw. spored already registers the --name/--dns name from the spawn:dns-name tag (pkg/agent/agent.go:263), SigV4-signed, and it is the only thing that renews the DNS lease (#875). The CLI's SSH registration duplicated that while being broken three ways (dead API Gateway default, unsigned, PKCS#7 body). Finishing it would have produced a second registrar that, being one-shot, can't hold a lease.

What changes

  • Launch reports, doesn't register. After spored is verified, the launch reads spawn:dns-status/spawn:dns-error. It shows the record, the failure detail, or "spored registers once it is running; spawn status shows the result". The SSH/curl script, its retry loop, the NXDOMAIN pre-check and the misattributing warning are deleted.
  • --no-dns / dns.enabled: false now actually skip DNS. Before, they only gated the CLI attempt; the tag was still written, so spored registered anyway. They now withhold config.DNSName and therefore the tag.
  • spawn dns register / delete work from a workstation. pkg/dns fetched the identity document from IMDS before every request, so off-instance it failed before sending anything. The updater ignores those fields (lambda/dns-updater/main.go, since [HIGH] dns-updater accepts unsigned identity docs + default-allows cross-account → Route53 spoofing #173). --domain on spawn dns now reaches the request instead of only the printed FQDN.
  • Removed from pkg/config: defaultAPIEndpoint (the deleted f4gm19tl70 API), Domain/APIEndpoint, the SSM /spawn/dns/* lookups and SPAWN_DNS_* env. These fed only the withdrawn path, and the domain was never sent. LoadDNSConfig resolves enabled only and makes no AWS call.
  • Deprecated: launch --dns-domain, --dns-api-endpoint (hidden, warn). The second is added to knownUnwiredFlags per the --cartesian is parsed and never read: sweeps silently produce the wrong run count #674/--use-reservation is parsed and never read: it silently does nothing (superseded by --reservation-id) #675 precedent. --dns-domain isn't caught by that gate because its variable is shared with spawn dns --domain.
  • scripts/deploy-custom-dns.sh "next steps" no longer advertises SSM auto-discovery. Writing it surfaced Custom DNS deployments: nothing points spored at the custom domain or endpoint #891: nothing points spored at a custom domain or endpoint, so custom DNS deployments don't work end to end.

Gates. Each was reverted in a way that compiles, and each failed:

  • TestEveryRequestWorksWithoutIMDS, built via NewClient with AWS_EC2_METADATA_DISABLED, all four request kinds. Against the original client.go it fails with GetInstanceIdentityDocument, access disabled to EC2 IMDS.
  • TestNoDNSWithholdsTheTagSporedRegistersFrom covers --name, --no-dns, --dns --no-dns, and dns.enabled: false. It fails for each of: the tag gate forced true, the file setting ignored, and the flag ignored in LoadDNSConfig.
  • TestSporedDNSReport covers every tag state, including pending, which used to print nothing.

make check, make check-docs, Tier 0 e2e (-count=1, 67s) green; semgrep clean.

Not verified against real AWS: spawn dns register from a workstation against the live updater. That writes a real Route53 record, so it needs approval.

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch_single.go 58.62% 12 Missing ⚠️
cmd/dns.go 0.00% 2 Missing ⚠️
cmd/launch_posthook.go 60.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn force-pushed the fix/872-withdraw-cli-dns branch from d94c51c to 03d1e4a Compare October 13, 2026 19:52
@scttfrdmn
scttfrdmn merged commit a07643a into main Oct 13, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the fix/872-withdraw-cli-dns branch October 13, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spawn launch --dns posts to a nonexistent endpoint with the auth scheme #173 removed

1 participant