Skip to main content

regfish pre and post validation hooks for certbot

Project description

Certbot Regfish DNS Hooks

Overview:

Pre and post validation hooks for Certbot to automate DNS-01 challenges using the Regfish DNS API.

Installation

  1. Install via pip:

    pip install certbot-regfish-hooks
    

    See also certbot installation via pip.

  2. Set up the Regfish API key:

    $ echo "your-regfish-key" > /etc/letsencrypt/regfish-api-key.txt
    $ chmod 600 /etc/letsencrypt/regfish-api-key.txt
    

Usage

These Regfish DNS hooks can be used with Certbot's manual plugin by specifying certonly and --manual on the command line:

$ certbot \
  --manual \
  --manual-auth-hook 'certbot-regfish-auth-hook --regfish-api-key-file /etc/letsencrypt/regfish-api-key.txt' \
  --manual-cleanup-hook 'certbot-regfish-cleanup-hook --regfish-api-key-file /etc/letsencrypt/regfish-api-key.txt' \
  --preferred-challenges dns-01 \
  certonly \
  <your other options>

Alternatively, use a global configuration file to apply your options:

$ certbot --config /etc/letsencrypt/regfish-example.ini certonly

/etc/letsencrypt/regfish-example.ini:

# register
email = your.email@example.com
no-eff-email = true
agree-tos = true

# authenticator
manual = true
manual-auth-hook = 'certbot-regfish-auth-hook --regfish-api-key-file /etc/letsencrypt/regfish-api-key.txt'
manual-cleanup-hook = 'certbot-regfish-cleanup-hook --regfish-api-key-file /etc/letsencrypt/regfish-api-key.txt'

# domain settings
domains = test.example.com,*.test.example.com

# NOTE: remove test-cert to use Let's Encrypt production endpoints
test-cert = true
preferred-challenges = dns-01
user-agent = 'autocrt/2.0'

# use ECC
key-type = ecdsa
elliptic-curve = secp384r1

Status

This is still in beta. What's missing for production?

The auth hooks have been tested as described above and this project will be deployed across two servers shortly. Let's be honest though - a bit homework remains before I'd consider this ready for production:

  • Pre-commit hooks for linting/formatting
  • Automated dependency upgrades (Dependabot)
  • Integration testing with a test domain
  • Automated builds and releases to PyPI

If that's version 2, where's version 1?

In fact, this project started six years ago as the very first Python module one of my closest friends hacked together for educational purposes. Certbot wasn't able to handle DNS challenges back then, so he came up with a hand-rolled ACME implementation and screen scraping interface for Regfish. This tool, which has requested over 50 certificates for our purposes by now, is what we named autocrt-dns.

It's been rock-solid until the day Regfish changed their DNS pad for the better and finally added an API to their product in November 2024. This public repository is a complete rewrite of our first version, leaning towards Certbot's now well-established ACME implementation and focusing on DNS authorization. None of the initial code survived but for sentimental reasons, it still identifies itself with the user-agent autocrt, now in version 2.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

certbot_regfish_hooks-2.0.0b2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certbot_regfish_hooks-2.0.0b2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file certbot_regfish_hooks-2.0.0b2.tar.gz.

File metadata

  • Download URL: certbot_regfish_hooks-2.0.0b2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for certbot_regfish_hooks-2.0.0b2.tar.gz
Algorithm Hash digest
SHA256 8be143f884e58c427bc8d6e1f0e3071385c5828d26780849cfdca3dd614ee404
MD5 c0c363323d988bfa338d25ebdb7c243c
BLAKE2b-256 89df6f681f17c35144b9657cbddddf05cc04a5ddfac49628a9e1ed0a938e2c21

See more details on using hashes here.

File details

Details for the file certbot_regfish_hooks-2.0.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_regfish_hooks-2.0.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b92ebd3ac578de262db992ae7803f66954d361df78c6248be431d13df107a7d
MD5 7982fb3275e15b58d2e5297b780ec5e4
BLAKE2b-256 bcd61610ef2ac823749e86714750c4878b4a31b105dc8bca08888e6c4d4dc5e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page