SaltDns. Knot. OrgConfig
(Salt v1.0.0)
The Knot configuration one organisation needs for distribution, and the configuration transaction that makes Knot match it. Pure.
For organisation o with secondaries s1..sn this is:
key[<key name>] one per secondary: the transfer TSIG key
remote[sec-o-s] the secondary's addresses and key (for NOTIFY)
acl[sec-o-s] transfer only, from the secondary's addresses
(and any extra sources) and with its key
(both must match)
zone[oO.catalog.invalid] the organisation's catalog zone, generated
by Knot; ACL and NOTIFY only for secondaries that
consume the catalog
template[org-o] what the organisation's active zones use: member
of that catalog, ACL and NOTIFY for every
secondary (plus the base ones, the edge's)A secondary therefore can transfer only its own organisation's zones and catalog, and only with its own key from its own addresses.
plan/2 takes the desired spec and Knot's current items (parsed
conf-read output) and returns the conf-set/conf-unset argument lists
for one transaction; an empty plan means Knot already matches and no
transaction should be opened (a commit would reload the organisation's
zones).
Summary
Types
{section, id} mapped to item => [values], values as Knot prints them.
Functions
Name of the organisation's catalog zone (no trailing dot).
The items Knot should have for the spec.
The edges in parsed remotes/remote items: the members of the groups
groups, each with its addresses split into host and port. A remote that
does not exist is skipped; a loopback or unspecified address (the placeholder
of an edge that is not set up yet) is dropped, and so is a remote left with
no address.
Prefix of the ids of an organisation's remotes and ACLs.
Suffix of the TSIG key names generated for an organisation's secondaries.
Parses knotc conf-read output into items. Each value line is
section[id].item value; a multi-value item continues on the following
lines without a prefix. A line section.id <id> only declares the section.
Lines that do not parse are ignored.
The argument lists (without the leading knotc options) of one config
transaction that turns actual into the desired items of spec, or [].
Name of the member template of the organisation's active zones.
Types
{section, id} mapped to item => [values], values as Knot prints them.
Functions
Name of the organisation's catalog zone (no trailing dot).
The items Knot should have for the spec.
@spec edges(items(), [String.t()]) :: [SaltDns.Knot.edge()]
The edges in parsed remotes/remote items: the members of the groups
groups, each with its addresses split into host and port. A remote that
does not exist is skipped; a loopback or unspecified address (the placeholder
of an edge that is not set up yet) is dropped, and so is a remote left with
no address.
Prefix of the ids of an organisation's remotes and ACLs.
Suffix of the TSIG key names generated for an organisation's secondaries.
Parses knotc conf-read output into items. Each value line is
section[id].item value; a multi-value item continues on the following
lines without a prefix. A line section.id <id> only declares the section.
Lines that do not parse are ignored.
The argument lists (without the leading knotc options) of one config
transaction that turns actual into the desired items of spec, or [].
actual should hold the organisation's template, catalog zone and every
key, remote and acl section Knot has (they are filtered here to the
organisation's own). Stale secondaries (this organisation's, no longer in
the spec) are removed.
Name of the member template of the organisation's active zones.