danectl

DNSSEC DANE implementation manager


What is danectl? | Supported Platforms | Documentation | Download

What is danectl?

Danectl is a DNSSEC DANE implementation manager. It uses certbot to create and manage pairs of keys for use with a TLSA 3 1 1 current + next workflow. It generates TLSA records for your TLS services for you to publish to the DNS, checks that they are correctly published, and performs key rollovers.

Danectl can also generate and check SSHFP records for the local SSH server.
Danectl can also generate and check an OPENPGPKEY record for a GnuPG key.
Danectl can also generate and check an SMIMEA record for an S/MIME certificate.

Danectl lets you create a pair of certbot certificate lineages to be used with DANE-aware TLS clients. They are referred to as the "original" and the "duplicate", or as the "current" and the "next". The current and next will repeatedly swap places between the original and the duplicate as the key rolls over from one to the other (with a new "next" key being created after each rollover).

    danectl new example.org www.example.org mail.example.org
    danectl dup example.org www.example.org mail.example.org

If you already have a certbot certificate lineage that you want to use with DANE, then instead of creating both certificate lineages, you can adopt the existing one for DANE use, and then just create the duplicate.

    danectl adopt example.org
    danectl dup example.org www.example.org mail.example.org

After that, certbot automatically renews both certificates every few months, but the underlying keypairs won't change, and the TLSA records (see below) can remain stable.

You then configure danectl with the set of port/protocol/host combinations that you need TLSA records for.

    danectl add-tlsa example.org _443._tcp _443._tcp.www
    danectl add-tlsa example.org _25._tcp.mail _465._tcp.mail _587._tcp.mail
    danectl add-tlsa example.org _110._tcp.mail _143._tcp.mail
    danectl add-tlsa example.org _993._tcp.mail _995._tcp.mail
    danectl del-tlsa example.org _110._tcp.mail _143._tcp.mail

Danectl can then output the TLSA records, in zonefile format, and you need to publish them to the DNS (somehow).

    danectl tlsa-current example.org
    danectl tlsa-next example.org

Danectl can then check that the TLSA records have been published to the DNS.

    danectl tlsa-check example.org

You also need to configure danectl with the list of TLS services that need to be reloaded when the key rolls over.

    danectl add-reload example.org apache2 postfix dovecot
    danectl del-reload example.org postfix

This is needed even when certbot is configured to do it with deploy hooks, because those hooks are only run when a certificate is renewed. Service reloads also need to happen when there's a DANE key rollover, and that doesn't necessarily happen at the same time as automatic certbot certificate renewals.

You then need to configure your TLS services to use the "current" certificate in /etc/letsencrypt/current/<cert-name>, and then reload them. This is like following instructions for using a certbot certificate, but replacing "live" with "current".

    Left as an exercise for the reader

Periodically, you can perform key rollovers on a schedule that suits you (e.g. annually). An emergency key rollover is exactly the same.

    danectl rollover example.org

At any time, you can show the status (which certificate lineages are current, which are next, which new TLSA records are not yet published, and which old TLSA records have not yet been removed).

    danectl status

In addition to TLSA records, you can also generate SSHFP, OPENPGPKEY, and SMIMEA records, and check that they are published.

    danectl sshfp example.org
    danectl sshfp-check example.org
    danectl openpgpkey user@example.org
    danectl openpgpkey-check user@example.org
    danectl smimea smimecert.pem
    danectl smimea-check smimecert.pem

For more information read the Documentation.

Supported Platforms

Danectl is written in Bourne shell, and should work on any platform that has the following prerequisites.

For TLSA usage: /bin/sh, ls, sed, grep, host, readlink, certbot, openssl, sha256sum, and root privileges.

For SSHFP usage: /bin/sh, sed, host, perl, and ssh-keygen.

For OPENPGPKEY usage: /bin/sh, perl, and gpg.

For SMIMEA usage: /bin/sh, perl, and openssl.

For reloading affected services on key rollover, any system with systemctl(1), service(8), rcctl(8), or service scripts in /etc/init.d, /etc/rc.d, or /usr/local/etc/rc.d should work (e.g. Linux, FreeBSD, NetBSD, OpenBSD, Solaris).

Documentation

There is a README file and a manual entry:

README - Description, Install, Requirements
LICENSE - GNU General Public Licence Version 2
danectl(1) - DNSSEC DANE implementation manager (source)

Download

Latest: danectl-0.6.tar.gz (SHA256 4f7e64fb27b315489f58dbb2cf3ea344aceefd91f0bcf850a82ef9e67a9e60dc)
     
Previous: danectl-0.5.tar.gz (SHA256 62fc5dc331a0d4e38dc202b3467c0ae0fbb6d908ed9ce25b1a4729869cb6a73f)
danectl-0.4.1.tar.gz (SHA256 074d455683d5a85cf755926b26cd1d97703e666753afee682d87bc8df14d4299)
danectl-0.4.tar.gz (SHA256 8f7431d7dc0740224bef013c8fbf7829353448c589fe3a0de9dd763dda7cf23f)
danectl-0.3.2.tar.gz (SHA256 b1df9d906a31d0eb4c552991df33f02c9351738efa30e18626f8cb2287815917)
danectl-0.3.1.tar.gz (SHA256 a064fd103682156322b05b7ad0acf06d29e522774adfd8ec22b68d11d8408c76)
danectl-0.3.tar.gz (SHA256 c1c015d6e9db848f74e0e8395ed9d4a9683a3bbf4ef972479ab6732a2f762c97)
danectl-0.2.tar.gz (SHA256 f308f80f93146a26c10a7d25358c4c9c3ea00545a7f0051f7a29473bc0f44505)
danectl-0.1.tar.gz (SHA256 ed1de2edabff073331d406d82ed590968371e6a3bb402f6c73a2e8638ae2b4d4)

What is danectl? | Supported Platforms | Documentation | Download

Last modified by raf at Mon 06 Sep 2021 00:13:41 AEST
v