GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alainwolf/DHANE: Dehydrated Authentication of Named Entities

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
dehydrated_tlsa
dehydrated_tlsa
 
 

Repository files navigation

DHANE

Dehydrated Authentication of Named Entities

A plug-in for dehydrated to create DNS TLSA records.

Requirements

PowerDNS Authoritative Server

Since I use PowerDNS myself, its written for its command and control utility. The script calls pdnsutil to create the records in DNS. It also uses dig for DNS queries.

Installation

Call it in your dehydrated hook script with the deploy_cert() and maybe also unchanged_cert() hook.

deploy_cert() {
    local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}"

    # This hook is called once for each certificate that has been
    # produced. Here you might, for instance, copy your new certificates
    # to service-specific locations and reload the service.
    # Create TLSA records in DNS.

./dehydrated_tlsa "deploy_cert" "${DOMAIN}" "${KEYFILE}" "${CERTFILE}" "${FULLCHAINFILE}" "${CHAINFILE}" "${TIMESTAMP}"

Defining TLSA Records

For certificates which need TLSA DNS records, create a file called tlsa.txt in the certificates directory and add the FQDN records one by line:

#/etc/dehydrated/certs/mail.example.net/tlsa.txt
#
# DANE TLSA records for the mail.example.net certificate
#
_25._tcp.mail.example.net
_443._tcp.webmail.example.net
_443._tcp.webmail.example.org

Empty lines, spaces and lines beginning with # are ignored.

The DNS records can be in different domains, as long as pdnsutil is able to create records in it.

Configuration

You need to set the IP address of your DNS master in the script.

Besides that you can customize the TTL of your DNS records, and pick your favorites from the usual menu of TLSA usage flags, selectors and mtypes, While the set defaults are sane, selector 0 (full certificate in DNS) is not implemented.

Limitations

  • It never deletes any DNS records. Just checks if the required ones are already there and adds new ones as needed.
  • It won't create TLSA records of un-hashed full certificates or public keys (mtype 0).
  • While checking existing DNS records, it just compares the record names and SHA2 hash values. It doesn't look at the usage flags, selectors and mtypes. I never had a use case where this should be necessary.

ACKs

Most thanks go to lukas2511 and contributors for dehydrated. And to Let's Encrypt of course for encrypting the whole universe planet by planet.

About

Dehydrated Authentication of Named Entities

Topics

acmebashcertificatedanedehydratedletsencryptpowerdnsshelltlsa

Resources

Readme
MIT license
Activity

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.