| 1 |
.\" Generated by Mmark Markdown Processor - mmark.miek.nl |
| 2 |
.TH "SIGN" 7 "August 2026" "atomdns handlers" "atomdns authors" |
| 3 |
|
| 4 |
.SH "NAME" |
| 5 |
.PP |
| 6 |
\fIsign\fP \- add DNSSEC records to zone files |
| 7 |
|
| 8 |
.SH "DESCRIPTION" |
| 9 |
.PP |
| 10 |
The \fIsign\fP handler is used to sign zones. In this process DNSSEC resource records are |
| 11 |
added. The signatures that sign the resource records sets have an expiration date, this means the |
| 12 |
signing process must be repeated before this expiration data is reached. Otherwise the zone's data |
| 13 |
will go bad (RFC 4035, Section 5.5). The \fIsign\fP handler takes care of all of this. |
| 14 |
|
| 15 |
.PP |
| 16 |
\fIsign\fP works in conjunction with the \fIdbfile\fP handler; this handler \fBsigns\fP the zone's files, and |
| 17 |
\fIdbfile\fP \fBserves\fP the zone's \fIdata\fP. |
| 18 |
|
| 19 |
.PP |
| 20 |
For \fIsign\fP to work at least one key is needed. This "Common Signing Key" will be used to sign the entire |
| 21 |
zone, \fIsign\fP does \fInot\fP support the ZSK/KSK split, nor will it do key or algorithm rollovers \- it just signs. |
| 22 |
This is the most authentic way of doing DNSSEC as it mimics the fire\-and\-forget style of the DNS. |
| 23 |
|
| 24 |
.PP |
| 25 |
By default every record will get a TTL of 3600 seconds, but see the \fB\fCttl\fR option. |
| 26 |
|
| 27 |
.PP |
| 28 |
\fIsign\fP will: |
| 29 |
|
| 30 |
.IP \(bu 4 |
| 31 |
(Re)\-sign the zone with the CSK(s) when: |
| 32 |
|
| 33 |
.RS |
| 34 |
.IP \(en 4 |
| 35 |
The first signature found on the SOA only has 9 days left before expiring. |
| 36 |
.IP \(en 4 |
| 37 |
The source zone \fBFILE\fP has been written to. |
| 38 |
|
| 39 |
.RE |
| 40 |
|
| 41 |
|
| 42 |
.PP |
| 43 |
When signing it will: |
| 44 |
|
| 45 |
.IP \(bu 4 |
| 46 |
Add the DNSKEYs to the apex of the zone. |
| 47 |
.IP \(bu 4 |
| 48 |
Create RRSIGs that have an inception of \-3 hours (minus a jitter between 0 and 18 hours) |
| 49 |
and a expiration of +32 (plus a jitter beteen 0 and 100 hours) days for every given DNSKEY. |
| 50 |
.IP \(bu 4 |
| 51 |
Add NSEC records for all authoritative names in the zone. |
| 52 |
.IP \(bu 4 |
| 53 |
Add or replace \fIall\fP apex CDS/CDNSKEY records with the ones derived from the given keys. For |
| 54 |
each key two CDS records are created, one with SHA1 and another with SHA256. |
| 55 |
.IP \(bu 4 |
| 56 |
Update the SOA's serial number to the \fIunix epoch\fP of when the signing happens. This will |
| 57 |
overwrite \fIany\fP previous serial number. |
| 58 |
|
| 59 |
|
| 60 |
.PP |
| 61 |
The state of each (signed) zone will be checked at 5 hour intervals. |
| 62 |
|
| 63 |
.PP |
| 64 |
Keys are named (following BIND9): \fB\fCK<name>+<alg>+<id>.key\fR and \fB\fCK<name>+<alg>+<id>.private\fR. |
| 65 |
The keys \fBmust not\fP be included in your zone; they will be added by \fIsign\fP. These keys can be |
| 66 |
generated with \fB\fCldns-keygen\fR or BIND9's \fB\fCdnssec-keygen\fR. You don't have to adhere to this naming |
| 67 |
scheme, but then you need to name your keys explicitly, see the \fB\fCkeys\fR directive, and note that |
| 68 |
\fB\fC.key\fR and \fB\fC.private\fR are always used as suffixes. |
| 69 |
|
| 70 |
.PP |
| 71 |
A generated zone is written out in a file named \fB\fC<name>.signed\fR in the \fBDIRECTORY\fP named by the |
| 72 |
\fB\fCdirectory\fR directive or otherwise the directory where to original \fBFILE\fP is found. |
| 73 |
|
| 74 |
.SH "SYNTAX" |
| 75 |
.PP |
| 76 |
.RS |
| 77 |
|
| 78 |
.nf |
| 79 |
sign FILE { |
| 80 |
ttl TTL |
| 81 |
key KEYFILE [KEYFILE]... |
| 82 |
directory DIRECTORY |
| 83 |
zonemd |
| 84 |
} |
| 85 |
|
| 86 |
.fi |
| 87 |
.RE |
| 88 |
|
| 89 |
.IP \(bu 4 |
| 90 |
\fBFILE\fP is the input zone file to sign. If the path is relative, the path from the \fIroot\fP global handler will be prepended to it. |
| 91 |
.IP \(bu 4 |
| 92 |
\fB\fCttl\fR specifies the TTL of all records that will be signed, and for the new records (NSEC, RRSIG) that get added to the zone. Without |
| 93 |
this option all records that are signed will get a TTL of 3600. |
| 94 |
.IP \(bu 4 |
| 95 |
\fB\fCkey\fR specifies the key(s) (there can be multiple) to sign the zone. Any metadata in these files (Activate, Publish, etc.) is |
| 96 |
\fIignored\fP. These keys must also be Key Signing Keys (KSK). The \fBKEYFILE\fP must be the root name of the keys |
| 97 |
files, i.e if you have "Kmiek.nl.+013+26205.key", \fBKEYFILE\fP must be "Kmiek.nl.+013+26205". For finding the |
| 98 |
keys files the same rules apply as for \fBFILE\fP. |
| 99 |
.IP \(bu 4 |
| 100 |
\fBDIRECTORY\fP specifies where to write the signed zone files. If not specified the directory where \fBFILE\fP |
| 101 |
is found is used. If the path is relative, the global \fIroot\fP will be prepended. |
| 102 |
.IP \(bu 4 |
| 103 |
if \fB\fCzonemd\fR is specified the zone will be signed and a ZONEMD record will be added afterwards. |
| 104 |
|
| 105 |
|
| 106 |
.SH "EXAMPLES" |
| 107 |
.PP |
| 108 |
Sign the \fB\fCexample.org\fR zone contained in the file \fB\fCdb.example.org\fR and write the result to |
| 109 |
\fB\fCdb.example.org.signed\fR to let the \fIdbfile\fP handler pick it up and serve it. The keys used |
| 110 |
are read from \fB\fCKexample.org.+013+32412.key\fR and \fB\fCKexample.org.+013+32412.private\fR. |
| 111 |
|
| 112 |
.PP |
| 113 |
.RS |
| 114 |
|
| 115 |
.nf |
| 116 |
example.org { |
| 117 |
sign db.example.org { |
| 118 |
key Kexample.org.+013+32412 |
| 119 |
} |
| 120 |
dbfile db.example.org.signed |
| 121 |
} |
| 122 |
|
| 123 |
.fi |
| 124 |
.RE |
| 125 |
|
| 126 |
.PP |
| 127 |
Running this leads to the following log output |
| 128 |
|
| 129 |
.PP |
| 130 |
.RS |
| 131 |
|
| 132 |
.nf |
| 133 |
2025/09/15 12:00:35 INFO example.org. handlers=log,sign,dbfile |
| 134 |
2025/09/15 12:00:35 INFO Start: /metrics handler=global |
| 135 |
2025/09/15 12:00:35 INFO Startup: signing: db.example.org handler=sign |
| 136 |
2025/09/15 12:00:35 INFO Zone "example.org." in "db.example.org" is signed and is written to db.example.org.signed handler=sign |
| 137 |
2025/09/15 12:00:35 INFO Startup: reload: db.example.org.signed handler=dbfile |
| 138 |
2025/09/15 12:00:47 INFO Zone "example.org." in "db.example.org" is signed and is written to db.example.org.signed handler=sign |
| 139 |
2025/09/15 12:00:47 INFO Resign of zone "example.org." in "db.example.org" successful handler=sign |
| 140 |
2025/09/15 12:00:49 INFO Reload of zone "example.org." in "db.example.org.signed" successful handler=dbfile |
| 141 |
|
| 142 |
.fi |
| 143 |
.RE |
| 144 |
|
| 145 |
.PP |
| 146 |
Forcibly resigning a zone can be accomplished by removing the signed zone file (atomdns will keep |
| 147 |
on serving it from memory), and \fB\fCtouch\fR\-ing \fBFILE\fP. |
| 148 |
|
| 149 |
.SH "METRICS" |
| 150 |
.PP |
| 151 |
If monitoring is enabled the following metrics are exported: |
| 152 |
|
| 153 |
.IP \(bu 4 |
| 154 |
\fB\fCatomdns_sign_duration_seconds{zone}\fR \- tracks how long each signing operation takes. |
| 155 |
.IP \(bu 4 |
| 156 |
\fB\fCatomdns_sign_rrsig_expire_timestamp{zone}\fR \- shows when the signatures are about to expire. |
| 157 |
|
| 158 |
|
| 159 |
.SH "SEE ALSO" |
| 160 |
.PP |
| 161 |
The DNSSEC RFCs: RFC 4033, RFC 4034 and RFC 4035. And the best current practice (BCP) on DNSSEC, RFC 6781. And |
| 162 |
the \fIdbfile\fP handler's documentation. Useful DNS(SEC) tools can be found in |
| 163 |
ldns |
| 164 |
\[la]https://nlnetlabs.nl/projects/ldns/about/\[ra], e.g. \fB\fCldns-key2ds\fR to create DS records from DNSKEYs. |