Karta.RFC2136 (Karta v1.0.0)

RFC 2136 dynamic update with TSIG: a DNS provider (Karta.DNS.Provider) for the authoritative servers that accept it, BIND, Knot, PowerDNS and others.

Configuration (config :karta, Karta.RFC2136; in production from the environment, see the configuration guide):

  • :server, :port - the server Karta sends to (KARTA_DNS_RFC2136_SERVER, KARTA_DNS_RFC2136_PORT, default 53).
  • :zones - the zones Karta may write to (KARTA_DNS_RFC2136_ZONES); the server has no way to list its zones, so these are the list.
  • :key_name, :secret, :algorithm - the TSIG key (KARTA_DNS_RFC2136_TSIG_KEY_NAME, KARTA_DNS_RFC2136_TSIG_SECRET, KARTA_DNS_RFC2136_TSIG_ALGORITHM, hmac-sha256 or hmac-sha512).
  • :timeout - milliseconds per exchange (KARTA_DNS_RFC2136_TIMEOUT, default 10 000).

Every message is signed and every answer's signature is checked (Karta.RFC2136.TSIG). Queries go over UDP, and an answer with the truncation bit is asked for again over TCP. Every UPDATE goes over TCP (RFC 2136 §2.1, §7.8): a requestor that needs an accurate response code uses TCP, since a lost UDP answer to a successful update cannot be told from a lost request.

What Karta owns. Dynamic update has no comments, so the provider keeps Karta's records in an inventory TXT record at _karta-records.<zone>: one entry per RRset, karta1 <domain id> <name> <type>, separated by ;. The name is reserved for this provider; another TXT record there is an error and nothing is written. read_zone/3 asks for the names Karta may write and the names the inventory lists (a TXT and a CNAME query each, the only types Karta writes, rather than an ANY query whose answer may be minimal per RFC 8482 §4; it does not transfer the zone), and reports as Karta's only the RRsets the inventory names.

A change set is one UPDATE message: a prerequisite per RRset (it exists with the records read, or it does not exist yet), the deletes and replacements, and the inventory update, so the server applies it whole or not at all. The server raises the zone's serial and notifies its secondaries itself.

Summary

Functions

The settings in the environment (KARTA_DNS_RFC2136_*), or nil.

A configuration made ready for use: nil without a server, a key name, a base64 secret, an algorithm this module knows and at least one zone.

Functions

config()

The settings in the environment (KARTA_DNS_RFC2136_*), or nil.

config(config)

A configuration made ready for use: nil without a server, a key name, a base64 secret, an algorithm this module knows and at least one zone.