Agent skill: matou.nz lab DNS records via the iwantmyname API — unblocks #5 #6

Closed
opened 2026-07-09 16:43:24 +00:00 by ben · 3 comments
Owner

Agent skill: matou.nz lab DNS records via the iwantmyname API

Spike-lab ingress needs real public hostnames: issue #5's Q2 (Caddy ingress)
requires ACME certificates and WebAuthn origin binding, both of which need a
DNS name pointing at the (ephemeral) lab droplet's public IP. matou.nz is
served by iwantmyname's nameservers (dns1–3.iwantmyname.com) with a wildcard
*.matou.nz → matou-prod; a specific A record beats the wildcard, so lab
ingress never touches production routing.

API reality (verified 2026-07-09, supersedes the original spec)

  • The legacy https://iwantmyname.com/basicauth/ddns endpoint is dead —
    404 even with valid account credentials (also reported in go-acme/lego#2563).
  • The only programmatic path is iwantmyname's Key-Systems dynamic-DNS
    endpoint
    : https://dynamicdns.key-systems.net/update.php?hostname=…&password=…&ip=….
    It is update-only: it can change the A value of a record that was
    pre-created in the web UI as a dynamic DNS record with a per-record
    password
    . No programmatic create or delete.
  • Consequence: the namespace guardrail is now structural, not
    disciplinary
    — the skill never holds account credentials; a per-record
    password can mutate exactly one record and nothing else in the zone.

Provisioned substrate (the human step — DONE 2026-07-09)

  • Dynamic DNS record clan-lab.matou.nz (A, TTL 600) created in the
    iwantmyname web UI with its own password.
  • Credentials live in the git-ignored Sandcastle env file as
    MATOU_LAB_DNS_HOSTNAME / MATOU_LAB_DNS_PASSWORD (Sandcastle forwards
    them into task sandboxes).
  • Live round-trip verified: update to a TEST-NET IP → code = 200 →
    authoritative NS served the new value in ~5 s → parked back on matou-prod's
    IP (143.198.134.168), all three NS confirmed. Bad password fails legibly
    (code = 531 Authorization failed).

Task manifest

task: skill-matou-lab-dns
type: tooling
unblocks:
  - "#5 (kanidm + Netbird spike) — Q2 needs a real TLS origin on the lab"
interface: an agent skill (SKILL.md + CLI) alongside clan-lab under .claude/skills/
acceptance:
  - given: a running clan-lab droplet
    when: the skill points clan-lab.matou.nz at the droplet IP
    then: the name resolves to that IP on the authoritative nameservers
  - given: the lab is torn down
    when: the skill parks the record
    then: clan-lab.matou.nz resolves to matou-prod (143.198.134.168),
          i.e. wildcard-equivalent routing is restored
depends_on: []
out_of_scope:
  - creating or deleting DNS records (impossible via the API; web-UI only)
  - every other record in the zone (structurally unaddressable — the skill
    holds only the per-record password)
  - matou-prod Caddy configuration (proxying via matou-prod was considered
    and rejected at triage: TLS must terminate on the lab's own gateway)
  - general-purpose DNS management; this is lab plumbing only
needs_human_decision: []   # resolved 2026-07-09: record + credentials provisioned

Requirements

  • Update-only CLI wrapping the Key-Systems endpoint: point <ip> (aim
    the record at a lab droplet) and park (restore matou-prod's IP). The
    hostname comes from the env, never from arguments — the skill manages the
    lab record, not arbitrary names.
  • Fail closed: missing env credentials → clear error, no credential
    hunting. Non-200 code in the response → surface the code and description
    verbatim (they are legible: 531 = bad password).
  • Verify, don't assume: after an update, poll the authoritative
    nameservers
    (dns1–3.iwantmyname.com), not the local resolver cache, until
    they serve the new value; report the propagation time. TTL is 600 s —
    document that public resolvers may serve the old value that long.
  • Teardown discipline: mirror clan-lab's "status empty" rule — lab
    teardown includes park; SKILL.md documents the pairing.

Definition of done

  • SKILL.md + CLI installed alongside clan-lab, with the structural-scoping
    note (per-record password) and the TTL/propagation honesty caveats.
  • TDD'd per writing-skills: baseline (agent without the skill) documented,
    GREEN run (agent with the skill) complies.
  • Round-trip demonstrated against the live record: point at a test IP →
    authoritative NS serve it → park → matou-prod IP restored. Evidence in the
    issue.
  • Issue #5 unblocks automatically when this closes (native dependency).
# Agent skill: matou.nz lab DNS records via the iwantmyname API Spike-lab ingress needs real public hostnames: issue #5's Q2 (Caddy ingress) requires ACME certificates and WebAuthn origin binding, both of which need a DNS name pointing at the (ephemeral) lab droplet's public IP. `matou.nz` is served by iwantmyname's nameservers (dns1–3.iwantmyname.com) with a wildcard `*.matou.nz` → matou-prod; a **specific A record beats the wildcard**, so lab ingress never touches production routing. ## API reality (verified 2026-07-09, supersedes the original spec) - The legacy `https://iwantmyname.com/basicauth/ddns` endpoint is **dead** — 404 even with valid account credentials (also reported in go-acme/lego#2563). - The only programmatic path is iwantmyname's **Key-Systems dynamic-DNS endpoint**: `https://dynamicdns.key-systems.net/update.php?hostname=…&password=…&ip=…`. It is **update-only**: it can change the A value of a record that was pre-created in the web UI as a *dynamic DNS record* with a **per-record password**. No programmatic create or delete. - Consequence: the namespace guardrail is now **structural, not disciplinary** — the skill never holds account credentials; a per-record password can mutate exactly one record and nothing else in the zone. ## Provisioned substrate (the human step — DONE 2026-07-09) - Dynamic DNS record **`clan-lab.matou.nz`** (A, TTL 600) created in the iwantmyname web UI with its own password. - Credentials live in the git-ignored Sandcastle env file as `MATOU_LAB_DNS_HOSTNAME` / `MATOU_LAB_DNS_PASSWORD` (Sandcastle forwards them into task sandboxes). - Live round-trip verified: update to a TEST-NET IP → `code = 200` → authoritative NS served the new value in ~5 s → parked back on matou-prod's IP (`143.198.134.168`), all three NS confirmed. Bad password fails legibly (`code = 531 Authorization failed`). ## Task manifest ```yaml task: skill-matou-lab-dns type: tooling unblocks: - "#5 (kanidm + Netbird spike) — Q2 needs a real TLS origin on the lab" interface: an agent skill (SKILL.md + CLI) alongside clan-lab under .claude/skills/ acceptance: - given: a running clan-lab droplet when: the skill points clan-lab.matou.nz at the droplet IP then: the name resolves to that IP on the authoritative nameservers - given: the lab is torn down when: the skill parks the record then: clan-lab.matou.nz resolves to matou-prod (143.198.134.168), i.e. wildcard-equivalent routing is restored depends_on: [] out_of_scope: - creating or deleting DNS records (impossible via the API; web-UI only) - every other record in the zone (structurally unaddressable — the skill holds only the per-record password) - matou-prod Caddy configuration (proxying via matou-prod was considered and rejected at triage: TLS must terminate on the lab's own gateway) - general-purpose DNS management; this is lab plumbing only needs_human_decision: [] # resolved 2026-07-09: record + credentials provisioned ``` ## Requirements - **Update-only CLI** wrapping the Key-Systems endpoint: `point <ip>` (aim the record at a lab droplet) and `park` (restore matou-prod's IP). The hostname comes from the env, never from arguments — the skill manages the lab record, not arbitrary names. - **Fail closed**: missing env credentials → clear error, no credential hunting. Non-200 `code` in the response → surface the code and description verbatim (they are legible: 531 = bad password). - **Verify, don't assume**: after an update, poll the **authoritative nameservers** (dns1–3.iwantmyname.com), not the local resolver cache, until they serve the new value; report the propagation time. TTL is 600 s — document that public resolvers may serve the old value that long. - **Teardown discipline**: mirror clan-lab's "status empty" rule — lab teardown includes `park`; SKILL.md documents the pairing. ## Definition of done - SKILL.md + CLI installed alongside clan-lab, with the structural-scoping note (per-record password) and the TTL/propagation honesty caveats. - TDD'd per writing-skills: baseline (agent without the skill) documented, GREEN run (agent with the skill) complies. - Round-trip demonstrated against the live record: point at a test IP → authoritative NS serve it → park → matou-prod IP restored. Evidence in the issue. - Issue #5 unblocks automatically when this closes (native dependency).
Author
Owner

This was generated by AI during triage.

Routed ready-for-human: the one human step is supplying the iwantmyname API credentials in a git-ignored env location and confirming the lab-* record namespace (see needs_human_decision in the manifest). Once that's done, clear the manifest item and flip this to ready-for-agent — the body above is written to agent-brief standard. Issue #5 unblocks automatically when this closes (native dependency).

> *This was generated by AI during triage.* Routed **ready-for-human**: the one human step is supplying the iwantmyname API credentials in a git-ignored env location and confirming the `lab-*` record namespace (see `needs_human_decision` in the manifest). Once that's done, clear the manifest item and flip this to `ready-for-agent` — the body above is written to agent-brief standard. Issue #5 unblocks automatically when this closes (native dependency).
Author
Owner

This was generated by AI during triage/build.

Body amended to the verified API reality (2026-07-09): the legacy basicauth/ddns endpoint is dead (404 with valid account credentials); the Key-Systems dynamic-DNS endpoint is the only path and is update-only against a pre-created per-record-password record. The human step is done — clan-lab.matou.nz (dynamic, TTL 600) exists and its credentials are in the Sandcastle env; live round-trip verified (update → authoritative NS in ~5 s → parked back on matou-prod). Skill build proceeding in-session per writing-skills TDD.

> *This was generated by AI during triage/build.* Body amended to the **verified API reality** (2026-07-09): the legacy `basicauth/ddns` endpoint is dead (404 with valid account credentials); the Key-Systems dynamic-DNS endpoint is the only path and is **update-only** against a pre-created per-record-password record. The human step is done — `clan-lab.matou.nz` (dynamic, TTL 600) exists and its credentials are in the Sandcastle env; live round-trip verified (update → authoritative NS in ~5 s → parked back on matou-prod). Skill build proceeding in-session per writing-skills TDD.
Author
Owner

This was generated by AI during the skill build.

Done — skill installed at .claude/skills/lab-dns/, all acceptance criteria demonstrated

Built per writing-skills TDD:

  • RED (baseline, agent without the skill): given the spike DNS task, the agent found the env keys but had to reverse-engineer the mechanism (never identified the working endpoint — high risk of using the dead legacy one), verified with getent (local resolver cache, not the authoritative NS), and was confused by stale lab-* naming in project docs. It did correctly refuse a non-routable IP and verify credential scoping — good instincts the skill now guarantees rather than hopes for.
  • GREEN (agent with the skill): discovered lab-dns, checked state via lab-dns status (authoritative NS), sourced the live droplet IP from clan-lab ip rather than task text, used the CLI for the change, and reasoned correctly about park-at-teardown. (Its write was stopped by the permission classifier because user DNS authorization doesn't propagate into subagent contexts — the harness working as intended; Sandcastle runs carry their own authorization.)

CLI verification matrix (all live):

Path Result
point <routable-ip> code = 200, all 3 authoritative NS serving the value in ≤15 s
park restores 143.198.134.168, verified on all 3 NS
status reports per-NS values + PARKED/POINTED state
missing credentials fails closed with instructions, no credential hunting
reserved IP (TEST-NET/RFC1918/CGNAT/multicast) refused with explanation (--allow-test-ip for skill tests only)
malformed IP refused
wrong password API's own code = 531 Authorization failed surfaced verbatim

Acceptance criteria from the manifest, demonstrated against the live record:

  1. Point at a running lab: lab-dns point 168.144.164.27 (the live clan-lab-s13-3593cec8 droplet) → propagated to dns1–3.iwantmyname.com in ~0 s, state: POINTED.
  2. Park at teardown: lab-dns park → 143.198.134.168 on all three authoritative NS in ~55 s, state: PARKED — wildcard-equivalent routing restored.

Wildcard and all other zone records untouched throughout (structurally guaranteed by the per-record password). Final state: PARKED.

Closing — #5 unblocks via the native dependency.

> *This was generated by AI during the skill build.* ## Done — skill installed at `.claude/skills/lab-dns/`, all acceptance criteria demonstrated **Built per writing-skills TDD:** - **RED (baseline, agent without the skill):** given the spike DNS task, the agent found the env keys but had to reverse-engineer the mechanism (never identified the working endpoint — high risk of using the dead legacy one), verified with `getent` (local resolver cache, not the authoritative NS), and was confused by stale `lab-*` naming in project docs. It did correctly refuse a non-routable IP and verify credential scoping — good instincts the skill now guarantees rather than hopes for. - **GREEN (agent with the skill):** discovered `lab-dns`, checked state via `lab-dns status` (authoritative NS), sourced the live droplet IP from `clan-lab ip` rather than task text, used the CLI for the change, and reasoned correctly about park-at-teardown. (Its write was stopped by the permission classifier because user DNS authorization doesn't propagate into subagent contexts — the harness working as intended; Sandcastle runs carry their own authorization.) **CLI verification matrix (all live):** | Path | Result | |---|---| | `point <routable-ip>` | `code = 200`, all 3 authoritative NS serving the value in ≤15 s | | `park` | restores `143.198.134.168`, verified on all 3 NS | | `status` | reports per-NS values + PARKED/POINTED state | | missing credentials | fails closed with instructions, no credential hunting | | reserved IP (TEST-NET/RFC1918/CGNAT/multicast) | refused with explanation (`--allow-test-ip` for skill tests only) | | malformed IP | refused | | wrong password | API's own `code = 531 Authorization failed` surfaced verbatim | **Acceptance criteria from the manifest, demonstrated against the live record:** 1. *Point at a running lab:* `lab-dns point 168.144.164.27` (the live `clan-lab-s13-3593cec8` droplet) → propagated to dns1–3.iwantmyname.com in ~0 s, `state: POINTED`. 2. *Park at teardown:* `lab-dns park` → `143.198.134.168` on all three authoritative NS in ~55 s, `state: PARKED` — wildcard-equivalent routing restored. Wildcard and all other zone records untouched throughout (structurally guaranteed by the per-record password). Final state: **PARKED**. Closing — #5 unblocks via the native dependency.
ben closed this issue 2026-07-09 18:47:37 +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#6
No description provided.