Skip to content

Hosted DNS service: reserve, records, lease and release #1016

Closed
getployz/hosted-dns
#1

Description

@nick-potts

Parent

Spec: Hosted DNS, Cluster Domain and wildcard certificates

What to build

The Hosted DNS service in a new private repository getployz/hosted-dns: a Rust axum service backed by Route 53 and Postgres. Cloud can anonymously mint a Cluster Domain from a preferred label, then use the per-name bearer token to rotate it, publish the apex address set, renew the lease and release the name.

Acceptance criteria

  • POST /domains {preferred?} returns {name, token}; the token is shown once and stored bcrypt-hashed; anonymous minting is rate-limited per source IP.
  • A mint key from MINT_KEYS (comma-separated, compared in constant time) sent as a bearer token on POST /domains bypasses the per-IP limit; a wrong key is refused with 401.
  • The preferred label is validated ([a-z0-9-]{3,40}, no edge hyphens, reserved words); a taken or refused label gets a 4-character suffix, an invalid one a random label.
  • rotate returns a new token and invalidates the old one immediately.
  • The full-set idempotent records PUT writes apex A/AAAA only; *.name is a CNAME to the apex written once.
  • Authenticated calls renew a 7-day lease; reservations with no records are reaped after 24 hours; expired leases are released.
  • release retires the name forever; retired names are never reissued.
  • HTTP API tests run against a fake Route 53.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions