Summary
Allow the TSIG key for the dynamic DNS nsupdate (RFC2136) protocol to be defined in the config tree, instead of referencing a statically provisioned key file under /config/auth. The CLI can follow service dhcp-server dynamic-dns-update tsig-key:
set service dns dynamic name <name> tsig-key <key-name> algorithm <md5|sha1|sha224|sha256|sha384|sha512> set service dns dynamic name <name> tsig-key <key-name> secret <base64>
This replaces set service dns dynamic name <name> key '/config/auth/<file>'.
Use case
Currently the TSIG key file has to be created out-of-band (e.g. with tsig-keygen) and copied to /config/auth on every router, and the config only holds its path. So the key material cannot be managed, reviewed, synced or restored with the rest of the config. This is the last remnant of legacy implementation we still carry around. The change is similar to what was done with pki config few years back.
Additional information
- Ephemeral file(s) will be dynamically generated as /run/ddclient/<name>.key, and auto-removed when the service for <name> is deleted or the protocol changes from nsupdate to something else.
- The tag has to change from key to tsig-key to avoid ambiguity and also be consistent with the property used in DHCP Server (Kea) config.
- The existing key file(s) will be parsed (named.conf-style format, as produced by tsig-keygen/ddns-confgen) and converted to tsig-key <key-name> algorithm|secret on best-effort basis.
- And if the key file conversion fails during migration (missing/unreadable file etc), the service is removed with a warning so it can be reconfigured.