dnssec-keymgr.html revision 46bb3884a0738664862e3a36b7848aa374aebd45
273e660f5f11ea8a59377520134c8b4be87fedbccilix<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<!--
273e660f5f11ea8a59377520134c8b4be87fedbccilix - Copyright (C) 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
273e660f5f11ea8a59377520134c8b4be87fedbccilix -
273e660f5f11ea8a59377520134c8b4be87fedbccilix - This Source Code Form is subject to the terms of the Mozilla Public
273e660f5f11ea8a59377520134c8b4be87fedbccilix - License, v. 2.0. If a copy of the MPL was not distributed with this
273e660f5f11ea8a59377520134c8b4be87fedbccilix - file, You can obtain one at http://mozilla.org/MPL/2.0/.
273e660f5f11ea8a59377520134c8b4be87fedbccilix-->
273e660f5f11ea8a59377520134c8b4be87fedbccilix<html lang="en">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<head>
5c45bb188ab729e501e48732842cb9de6a9813beAlex Valavanis<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
eb4caa8f4cdc2955b58dcd2de06fe770533414c8Jon A. Cruz<title>dnssec-keymgr</title>
eb4caa8f4cdc2955b58dcd2de06fe770533414c8Jon A. Cruz<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
273e660f5f11ea8a59377520134c8b4be87fedbccilix</head>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<a name="man.dnssec-keymgr"></a><div class="titlepage"></div>
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix
2e10ea952a319db08edf0986dea15de42b14d92fbuliabyak
08c634c4b964dbbb89686a645bce04c1c7275611Liam P. White <div class="refnamediv">
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix<h2>Name</h2>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <span class="application">dnssec-keymgr</span>
273e660f5f11ea8a59377520134c8b4be87fedbccilix &#8212; Ensures correct DNSKEY coverage for a zone based on a defined policy
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix</div>
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix <div class="refsynopsisdiv">
4ea30e1bba14987abced98e7bf194b69153e9e21cilix<h2>Synopsis</h2>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <div class="cmdsynopsis"><p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <code class="command">dnssec-keymgr</code>
fc336487182165df2bbcbe52800aa3d2e292b7c7Liam P. White [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
312bccd9de1cbb6c10da3e96d6e709fb19519288Liam P. White [<code class="option">-c <em class="replaceable"><code>file</code></em></code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-f</code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-k</code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-q</code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-v</code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-z</code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-g <em class="replaceable"><code>path</code></em></code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-r <em class="replaceable"><code>path</code></em></code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [<code class="option">-s <em class="replaceable"><code>path</code></em></code>]
273e660f5f11ea8a59377520134c8b4be87fedbccilix [zone...]
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p></div>
273e660f5f11ea8a59377520134c8b4be87fedbccilix </div>
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix <div class="refsection">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<a name="id-1.7"></a><h2>DESCRIPTION</h2>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <span class="command"><strong>dnssec-keymgr</strong></span> is a high level Python wrapper
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix to facilitate the key rollover process for zones handled by
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix BIND. It uses the BIND commands for manipulating DNSSEC key
5cd969f185e1a05f873e023378d0831e71441da6joncruz metadata: <span class="command"><strong>dnssec-keygen</strong></span> and
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix <span class="command"><strong>dnssec-settime</strong></span>.
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix </p>
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix <p>
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix DNSSEC policy can be read from a configuration file (default
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix <code class="filename">/etc/dnssec-policy.conf</code>), from which the key
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix parameters, publication and rollover schedule, and desired
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix coverage duration for any given zone can be determined. This
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix file may be used to define individual DNSSEC policies on a
71aad46792b4f0eac60baac9bbeb5366e6a21e9fDiederik van Lierop per-zone basis, or to set a default policy used for all zones.
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix </p>
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix <p>
71aad46792b4f0eac60baac9bbeb5366e6a21e9fDiederik van Lierop When <span class="command"><strong>dnssec-keymgr</strong></span> runs, it examines the DNSSEC
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix keys for one or more zones, comparing their timing metadata against
85bc45682f5dd745ceb7f01b0d47efd35853844fcilix the policies for those zones. If key settings do not conform to the
273e660f5f11ea8a59377520134c8b4be87fedbccilix DNSSEC policy (for example, because the policy has been changed),
273e660f5f11ea8a59377520134c8b4be87fedbccilix they are automatically corrected.
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix A zone policy can specify a duration for which we want to
71aad46792b4f0eac60baac9bbeb5366e6a21e9fDiederik van Lierop ensure the key correctness (<code class="option">coverage</code>). It can
273e660f5f11ea8a59377520134c8b4be87fedbccilix also specify a rollover period (<code class="option">roll-period</code>).
273e660f5f11ea8a59377520134c8b4be87fedbccilix If policy indicates that a key should roll over before the
273e660f5f11ea8a59377520134c8b4be87fedbccilix coverage period ends, then a successor key will automatically be
273e660f5f11ea8a59377520134c8b4be87fedbccilix created and added to the end of the key series.
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix If zones are specified on the command line,
273e660f5f11ea8a59377520134c8b4be87fedbccilix <span class="command"><strong>dnssec-keymgr</strong></span> will examine only those zones.
273e660f5f11ea8a59377520134c8b4be87fedbccilix If a specified zone does not already have keys in place, then
273e660f5f11ea8a59377520134c8b4be87fedbccilix keys will be generated for it according to policy.
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
5e910edf3969fcedbc5d170ceddfe15796a1e285Liam P. White If zones are <span class="emphasis"><em>not</em></span> specified on the command
273e660f5f11ea8a59377520134c8b4be87fedbccilix line, then <span class="command"><strong>dnssec-keymgr</strong></span> will search the
273e660f5f11ea8a59377520134c8b4be87fedbccilix key directory (either the current working directory or the directory
273e660f5f11ea8a59377520134c8b4be87fedbccilix set by the <code class="option">-K</code> option), and check the keys for
5cf332777b4c27336d64c273ac63bce3ee27a53dAlex Valavanis all the zones represented in the directory.
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix It is expected that this tool will be run automatically and
273e660f5f11ea8a59377520134c8b4be87fedbccilix unattended (for example, by <span class="command"><strong>cron</strong></span>).
4ea30e1bba14987abced98e7bf194b69153e9e21cilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix </div>
273e660f5f11ea8a59377520134c8b4be87fedbccilix
273e660f5f11ea8a59377520134c8b4be87fedbccilix <div class="refsection">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<a name="id-1.8"></a><h2>OPTIONS</h2>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <div class="variablelist"><dl class="variablelist">
273e660f5f11ea8a59377520134c8b4be87fedbccilix<dt><span class="term">-c <em class="replaceable"><code>file</code></em></span></dt>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<dd>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix If <code class="option">-c</code> is specified, then the DNSSEC
273e660f5f11ea8a59377520134c8b4be87fedbccilix policy is read from <code class="option">file</code>. (If not
4ea30e1bba14987abced98e7bf194b69153e9e21cilix specified, then the policy is read from
273e660f5f11ea8a59377520134c8b4be87fedbccilix <code class="filename">/etc/dnssec-policy.conf</code>; if that file
273e660f5f11ea8a59377520134c8b4be87fedbccilix doesn't exist, a built-in global default policy is used.)
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix </dd>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<dt><span class="term">-f</span></dt>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<dd>
273e660f5f11ea8a59377520134c8b4be87fedbccilix <p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix Force: allow updating of key events even if they are
273e660f5f11ea8a59377520134c8b4be87fedbccilix already in the past. This is not recommended for use with
273e660f5f11ea8a59377520134c8b4be87fedbccilix zones in which keys have already been published. However,
273e660f5f11ea8a59377520134c8b4be87fedbccilix if a set of keys has been generated all of which have
273e660f5f11ea8a59377520134c8b4be87fedbccilix publication and activation dates in the past, but the
273e660f5f11ea8a59377520134c8b4be87fedbccilix keys have not been published in a zone as yet, then this
273e660f5f11ea8a59377520134c8b4be87fedbccilix option can be used to clean them up and turn them into a
273e660f5f11ea8a59377520134c8b4be87fedbccilix proper series of keys with appropriate rollover intervals.
273e660f5f11ea8a59377520134c8b4be87fedbccilix </p>
273e660f5f11ea8a59377520134c8b4be87fedbccilix </dd>
273e660f5f11ea8a59377520134c8b4be87fedbccilix<dt><span class="term">-g <em class="replaceable"><code>keygen-path</code></em></span></dt>
<dd>
<p>
Specifies a path to a <span class="command"><strong>dnssec-keygen</strong></span> binary.
Used for testing.
See also the <code class="option">-s</code> option.
</p>
</dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Print the <span class="command"><strong>dnssec-keymgr</strong></span> help summary
and exit.
</p>
</dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Sets the directory in which keys can be found. Defaults to the
current working directory.
</p>
</dd>
<dt><span class="term">-k</span></dt>
<dd>
<p>
Only apply policies to KSK keys.
See also the <code class="option">-z</code> option.
</p>
</dd>
<dt><span class="term">-q</span></dt>
<dd>
<p>
Quiet: suppress printing of <span class="command"><strong>dnssec-keygen</strong></span>
and <span class="command"><strong>dnssec-settime</strong></span>.
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
<dd>
<p>
Specifies a path to a file containing random data.
This is passed to the <span class="command"><strong>dnssec-keygen</strong></span> binary
using its <code class="option">-r</code> option.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>settime-path</code></em></span></dt>
<dd>
<p>
Specifies a path to a <span class="command"><strong>dnssec-settime</strong></span> binary.
Used for testing.
See also the <code class="option">-g</code> option.
</p>
</dd>
<dt><span class="term">-v</span></dt>
<dd>
<p>
Print the <span class="command"><strong>dnssec-keymgr</strong></span> version and exit.
</p>
</dd>
<dt><span class="term">-z</span></dt>
<dd>
<p>
Only apply policies to ZSK keys.
See also the <code class="option">-k</code> option.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>POLICY CONFIGURATION</h2>
<p>
The <code class="filename">dnssec-policy.conf</code> file can specify three kinds
of policies:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<span class="emphasis"><em>Policy classes</em></span>
(<code class="option">policy <em class="replaceable"><code>name</code></em> { ... };</code>)
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 <strong class="userinput"><code>normal</code></strong> might specify
1024-bit key sizes, but a class <strong class="userinput"><code>extra</code></strong> might
specify 2048 bits instead; <strong class="userinput"><code>extra</code></strong> would be
used for zones that had unusually high security needs.
</p>
</li>
<li class="listitem">
<p>
Algorithm policies:
(<code class="option">algorithm-policy <em class="replaceable"><code>algorithm</code></em> { ... };</code> )
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 <span class="command"><strong>algorithm-policy</strong></span>, and the
new key sizes would then be used for any key of type RSASHA256.
</p>
</li>
<li class="listitem">
<p>
Zone policies:
(<code class="option">zone <em class="replaceable"><code>name</code></em> { ... };</code> )
set policy for a single zone by name. A zone policy can inherit
a policy class by including a <code class="option">policy</code> option.
Zone names beginning with digits (i.e., 0-9) must be quoted.
</p>
</li>
</ul></div>
<p>
Options that can be specified in policies:
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><span class="command"><strong>algorithm</strong></span></span></dt>
<dd>
<p>
The key algorithm. If no policy is defined, the default is
RSASHA256.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>coverage</strong></span></span></dt>
<dd>
<p>
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.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>directory</strong></span></span></dt>
<dd>
<p>
Specifies the directory in which keys should be stored.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>key-size</strong></span></span></dt>
<dd>
<p>
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.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>keyttl</strong></span></span></dt>
<dd>
<p>
The key TTL. If no policy is defined, the default is one hour.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>post-publish</strong></span></span></dt>
<dd>
<p>
How long after inactivation a key should be deleted from the zone.
Note: If <code class="option">roll-period</code> 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.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>pre-publish</strong></span></span></dt>
<dd>
<p>
How long before activation a key should be published. Note: If
<code class="option">roll-period</code> 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.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>roll-period</strong></span></span></dt>
<dd>
<p>
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.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>standby</strong></span></span></dt>
<dd>
<p>
Not yet implemented.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>REMAINING WORK</h2>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Enable scheduling of KSK rollovers using the <code class="option">-P sync</code>
and <code class="option">-D sync</code> options to
<span class="command"><strong>dnssec-keygen</strong></span> and
<span class="command"><strong>dnssec-settime</strong></span>. Check the parent zone
(as in <span class="command"><strong>dnssec-checkds</strong></span>) to determine when it's
safe for the key to roll.
</p>
</li>
<li class="listitem">
<p>
Allow configuration of standby keys and use of the REVOKE bit,
for keys that use RFC 5011 semantics.
</p>
</li>
</ul></div>
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry">
<span class="refentrytitle">dnssec-coverage</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">dnssec-keygen</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">dnssec-settime</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">dnssec-checkds</span>(8)
</span>
</p>
</div>
</div></body>
</html>