Gigahost DNS Authenticator plugin for Certbot
Project description
certbot-dns-gigahost
Gigahost DNS Authenticator plugin for Certbot.
This plugin automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records using the Gigahost API.
Named Arguments
| Argument | Description |
|---|---|
--dns-gigahost-credentials |
Gigahost credentials INI file. (required) |
--dns-gigahost-propagation-seconds |
The number of seconds to wait for DNS to propagate before asking the ACME server to verify the DNS record. (Default: 120) |
Installation
pip install certbot-dns-gigahost
Credentials
Use of this plugin requires a configuration file containing your Gigahost account credentials.
See the Gigahost API documentation for more information.
An example credentials.ini file:
dns_gigahost_username=user@example.com
dns_gigahost_password=yourpassword
The path to this file can be provided interactively or using the --dns-gigahost-credentials command-line argument. Certbot records the path to this file for use during renewal, but does not store the file's contents.
CAUTION: You should protect these credentials as you would the password to your Gigahost account. Users who can read this file can use these credentials to issue arbitrary API calls on your behalf. Users who can cause Certbot to run using these credentials can complete a
dns-01challenge to acquire new certificates or revoke existing certificates for associated domains, even if those domains aren't being managed by this server.
Certbot will emit a warning if it detects that the credentials file can be accessed by other users on your system. The warning reads "Unsafe permissions on credentials configuration file", followed by the path to the credentials file. This warning will be emitted each time Certbot uses the credentials file, including for renewal, and cannot be silenced except by addressing the issue (e.g., by using a command like chmod 600 to restrict access to the file).
Examples
Acquire a certificate
To acquire a single certificate for both example.com and www.example.com, waiting 120 seconds (the default) for DNS propagation:
certbot certonly \
--authenticator dns-gigahost \
--dns-gigahost-credentials ~/.secrets/certbot/gigahost.ini \
--dns-gigahost-propagation-seconds 120 \
-d example.com \
-d www.example.com
Wildcard certificate
certbot certonly \
--authenticator dns-gigahost \
--dns-gigahost-credentials ~/.secrets/certbot/gigahost.ini \
-d example.com \
-d "*.example.com"
Secure your credentials file
mkdir -p ~/.secrets/certbot
chmod 700 ~/.secrets/certbot
cat > ~/.secrets/certbot/gigahost.ini << EOF
dns_gigahost_username=user@example.com
dns_gigahost_password=yourpassword
EOF
chmod 600 ~/.secrets/certbot/gigahost.ini
Docker
A Docker image can be built from the included Dockerfile:
docker build -t certbot-dns-gigahost .
Example usage:
docker run --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
certbot-dns-gigahost \
certonly \
--authenticator dns-gigahost \
--dns-gigahost-credentials /etc/letsencrypt/gigahost.ini \
--agree-tos \
--email "email@example.com" \
-d example.com
Automatic renewal
Certbot will automatically use the plugin and credentials file during renewal. No additional configuration is needed after the initial certificate issuance. You can test renewal with:
certbot renew --dry-run
How it works
- When Certbot needs to validate domain ownership, the plugin authenticates with the Gigahost API using HTTP Basic Auth.
- It looks up the DNS zone for the domain being validated.
- It creates a
_acme-challengeTXT record with the validation token. - After Certbot verifies the challenge, the plugin removes the TXT record.
Development
# Clone the repository
git clone https://github.com/gigahost/certbot-dns-gigahost.git
cd certbot-dns-gigahost
# Install in development mode
pip install -e .
# Verify the plugin is recognized by certbot
certbot plugins
License
Apache License 2.0. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file certbot_dns_gigahost-0.1.0.tar.gz.
File metadata
- Download URL: certbot_dns_gigahost-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ac6add7ee02b6580ae03cf8a379d4c570a4314673c365c3c5451f347a249237
|
|
| MD5 |
266dc4f88beee12f5e032ccc971230f2
|
|
| BLAKE2b-256 |
bc3df5d03ac36c79c57fb0126f4349286151bb7eb5ff74dc64ad47174dca3d97
|
File details
Details for the file certbot_dns_gigahost-0.1.0-py3-none-any.whl.
File metadata
- Download URL: certbot_dns_gigahost-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd8071da849707cfccad7ee362300b0c50fedcd388eeb362c4dd8fb2c569528
|
|
| MD5 |
626100b98662397c66f461ebd2292056
|
|
| BLAKE2b-256 |
e7823fa2027a1dc9c891996351a020559fffa7eb7e764a16dc799656a98d30a1
|