dnssec-keymgr.docbook revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync<!--
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync - Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync -
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync - This Source Code Form is subject to the terms of the Mozilla Public
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync - License, v. 2.0. If a copy of the MPL was not distributed with this
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync - file, You can obtain one at http://mozilla.org/MPL/2.0/.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync-->
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-keymgr">
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <info>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <date>2016-06-03</date>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </info>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refentryinfo>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <corpname>ISC</corpname>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </refentryinfo>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refmeta>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refentrytitle><application>dnssec-keymgr</application></refentrytitle>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <manvolnum>8</manvolnum>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refmiscinfo>BIND9</refmiscinfo>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </refmeta>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refnamediv>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refname><application>dnssec-keymgr</application></refname>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refpurpose>Ensures correct DNSKEY coverage for a zone based on a defined policy</refpurpose>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </refnamediv>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <docinfo>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <copyright>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <year>2016</year>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </copyright>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </docinfo>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refsynopsisdiv>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <cmdsynopsis sepchar=" ">
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <command>dnssec-keymgr</command>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">file</replaceable></option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-f</option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-k</option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-q</option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-v</option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-z</option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-g <replaceable class="parameter">path</replaceable></option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">path</replaceable></option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">path</replaceable></option></arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <arg choice="opt" rep="repeat">zone</arg>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </cmdsynopsis>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </refsynopsisdiv>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <refsection><info><title>DESCRIPTION</title></info>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <command>dnssec-keymgr</command> is a high level Python wrapper
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync to facilitate the key rollover process for zones handled by
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync BIND. It uses the BIND commands for manipulating DNSSEC key
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync metadata: <command>dnssec-keygen</command> and
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <command>dnssec-settime</command>.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync DNSSEC policy can be read from a configuration file (default
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <filename>/etc/dnssec.policy</filename>), from which the key
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync parameters, publication and rollover schedule, and desired
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync coverage duration for any given zone can be determined. This
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync file may be used to define individual DNSSEC policies on a
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync per-zone basis, or to set a default policy used for all zones.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync When <command>dnssec-keymgr</command> runs, it examines the DNSSEC
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync keys for one or more zones, comparing their timing metadata against
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync the policies for those zones. If key settings do not conform to the
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync DNSSEC policy (for example, because the policy has been changed),
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync they are automatically corrected.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync A zone policy can specify a duration for which we want to
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync ensure the key correctness (<option>coverage</option>). It can
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync also specify a rollover period (<option>roll-period</option>).
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync If policy indicates that a key should roll over before the
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync coverage period ends, then a successor key will automatically be
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync created and added to the end of the key series.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync If zones are specified on the command line,
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <command>dnssec-keymgr</command> will examine only those zones.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync If a specified zone does not already have keys in place, then
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync keys will be generated for it according to policy.
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync </para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync <para>
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync If zones are <emphasis>not</emphasis> specified on the command
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync line, then <command>dnssec-keymgr</command> will search the
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync key directory (either the current working directory or the directory
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync set by the <option>-K</option> option), and check the keys for
a5fb10feb5ad0a875c114c6f117b9718784c9650vboxsync all the zones represented in the directory.
</para>
<para>
It is expected that this tool will be run automatically and
unattended (for example, by <command>cron</command>).
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-c <replaceable class="parameter">file</replaceable></term>
<listitem>
<para>
If <option>-c</option> is specified, then the DNSSEC
policy is read from <option>file</option>. (If not
specified, then the policy is read from
<filename>/etc/policy.conf</filename>; if that file
doesn't exist, a built-in global default policy is used.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-f</term>
<listitem>
<para>
Force: allow updating of key events even if they are
already in the past. This is not recommended for use with
zones in which keys have already been published. However,
if a set of keys has been generated all of which have
publication and activation dates in the past, but the
keys have not been published in a zone as yet, then this
option can be used to clean them up and turn them into a
proper series of keys with appropriate rollover intervals.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-g <replaceable class="parameter">keygen-path</replaceable></term>
<listitem>
<para>
Specifies a path to a <command>dnssec-keygen</command> binary.
Used for testing.
See also the <option>-s</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Print the <command>dnssec-keymgr</command> help summary
and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-K <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Sets the directory in which keys can be found. Defaults to the
current working directory.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k</term>
<listitem>
<para>
Only apply policies to KSK keys.
See also the <option>-z</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem>
<para>
Quiet: suppress printing of <command>dnssec-keygen</command>
and <command>dnssec-settime</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
<listitem>
<para>
Specifies a path to a file containing random data.
This is passed to the <command>dnssec-keygen</command> binary
using its <option>-r</option> option.
<!-- TODO: what to do about "-r keyboard"? -->
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">settime-path</replaceable></term>
<listitem>
<para>
Specifies a path to a <command>dnssec-settime</command> binary.
Used for testing.
See also the <option>-g</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v</term>
<listitem>
<para>
Print the <command>dnssec-keymgr</command> version and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Only apply policies to ZSK keys.
See also the <option>-k</option> option.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>POLICY CONFIGURATION</title></info>
<para>
The <filename>policy.conf</filename> file can specify three kinds
of policies:
</para>
<itemizedlist>
<listitem>
<para>
<emphasis>Policy classes</emphasis>
(<option>policy <replaceable>name</replaceable> { ... };</option>)
can be inherited by zone policies or other policy classes; these
can be used to create sets of different security profiles. For
example, a policy class <userinput>normal</userinput> might specify
1024-bit key sizes, but a class <userinput>extra</userinput> might
specify 2048 bits instead; <userinput>extra</userinput> would be
used for zones that had unusually high security needs.
</para>
</listitem>
<listitem>
<para>
Algorithm policies:
(<option>algorithm-policy <replaceable>algorithm</replaceable> { ... };</option> )
override default per-algorithm settings. For example, by default,
RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This
can be modified using <command>algorithm-policy</command>, and the
new key sizes would then be used for any key of type RSASHA256.
</para>
</listitem>
<listitem>
<para>
Zone policies:
(<option>zone <replaceable>name</replaceable> { ... };</option> )
set policy for a single zone by name. A zone policy can inherit
a policy class by including a <option>policy</option> option.
</para>
</listitem>
</itemizedlist>
<para>
Options that can be specified in policies:
</para>
<variablelist>
<varlistentry>
<term><command>algorithm</command></term>
<listitem>
<para>
The key algorithm. If no policy is defined, the default is
RSASHA256.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>coverage</command></term>
<listitem>
<para>
The length of time to ensure that keys will be correct; no action
will be taken to create new keys to be activated after this time.
This can be represented as a number of seconds, or as a duration using
human-readable units (examples: "1y" or "6 months").
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies.
If no policy is configured, the default is six months.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>directory</command></term>
<listitem>
<para>
Specifies the directory in which keys should be stored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>key-size</command></term>
<listitem>
<para>
Specifies the number of bits to use in creating keys.
Takes two arguments: keytype (eihter "zsk" or "ksk") and size.
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies. If no policy is
configured, the default is 1024 bits for DSA keys and 2048 for
RSA.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>keyttl</command></term>
<listitem>
<para>
The key TTL. If no policy is defined, the default is one hour.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>post-publish</command></term>
<listitem>
<para>
How long after inactivation a key should be deleted from the zone.
Note: If <option>roll-period</option> is not set, this value is
ignored. Takes two arguments: keytype (eihter "zsk" or "ksk") and a
duration. A default value for this option can be set in algorithm
policies as well as in policy classes or zone policies. The default
is one month.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>pre-publish</command></term>
<listitem>
<para>
How long before activation a key should be published. Note: If
<option>roll-period</option> is not set, this value is ignored.
Takes two arguments: keytype (either "zsk" or "ksk") and a duration.
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies. The default is
one month.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>roll-period</command></term>
<listitem>
<para>
How frequently keys should be rolled over.
Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration.
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies. If no policy is
configured, the default is one year for ZSK's. KSK's do not
roll over by default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>standby</command></term>
<listitem>
<para>
Not yet implemented.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>REMAINING WORK</title></info>
<itemizedlist>
<listitem>
<para>
Enable scheduling of KSK rollovers using the <option>-P sync</option>
and <option>-D sync</option> options to
<command>dnssec-keygen</command> and
<command>dnssec-settime</command>. Check the parent zone
(as in <command>dnssec-checkds</command>) to determine when it's
safe for the key to roll.
</para>
</listitem>
<listitem>
<para>
Allow configuration of standby keys and use of the REVOKE bit,
for keys that use RFC 5011 semantics.
</para>
</listitem>
</itemizedlist>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para>
<citerefentry>
<refentrytitle>dnssec-coverage</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-settime</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-checkds</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsection>
</refentry>