SaltDns. Dnssec. KeyExport
(Salt v1.0.0)
Copies the DNSSEC keys of signed zones from the leader's Knot into Postgres
(SaltDns.Dnssec.Key, private keys encrypted by the vault), so that the other
node can sign the same zones with the same keys after a takeover.
Runs on the leader (it is a child of SaltDns.Knot.LeaderSupervisor) every
interval ms (default 15000) and on demand with export_now/0; call that
after anything that changes keys (set_dnssec, a rollover, a DS submission).
A key that left the key store is marked removed, not deleted, so that an
import can remove it from the other node too.
The private key is read from the key store only for keys not exported before; later runs only update the timers.
Summary
Functions
Returns a specification to start this module under a supervisor.
Exports the keys of every signed zone. Needs the node to be allowed to write (the leader); returns the number of keys written or updated.
Exports now and waits. Returns the number of keys written.
Asks for an export soon and returns at once. Does nothing when none runs here.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec export_all() :: {:ok, non_neg_integer()} | {:error, term()}
Exports the keys of every signed zone. Needs the node to be allowed to write (the leader); returns the number of keys written or updated.
@spec export_now() :: {:ok, non_neg_integer()} | {:error, term()}
Exports now and waits. Returns the number of keys written.
@spec kick() :: :ok
Asks for an export soon and returns at once. Does nothing when none runs here.
@spec start_link(keyword()) :: GenServer.on_start()