Skip to main content

Edge-Center DNS Authenticator plugin for Certbot

Project description

PyPI version Documentation Status Tests Build GitHub last commit Code style: black

The certbot_dns_ecenter plugin automates the process of completing a dns-01 challenge (acme.challenges.DNS01) by creating, and subsequently removing, TXT records using the Edge-Center DNS API.

Documentation

For full documentation, including installation, examples, changelog please see readthedocs page.

Install

The plugin is not installed by default. It can be installed by command below.

pip install certbot-dns-ecenter

Named Arguments

plugin flags Description
--dns-ecenter-credentials Edge-Center credentials INI file. (Required)
--dns-ecenter-propagation-seconds The number of seconds to wait for DNS to propagate before asking the ACME server to verify the DNS record. (Default: 10)

Credentials

Use of this plugin requires a configuration file containing Edge-Center DNS API credentials. You can use:

  • Edge-Center API Token, obtained from your profile panel or
  • use Edge-Center Authentication credentials (email and password) for login page.

Edge-Center API Token is recommended authentication option.

The token needed by Certbot for add temporary TXT record to zone what you need certificates for.

Example Edge-Center.ini credentials file using restricted API Token (recommended)

# Edge-Center API token used by Certbot
dns_ecenter_apitoken = 0123456789abcdef0123456789abcdef01234567

Example Edge-Center.ini credentials file using authentication credentials (not recommended)

# Edge-Center API credentials used by Certbot
dns_ecenter_email = edge_center_user@example.com
dns_ecenter_password = 0123456789abcdef0123456789abcdef01234

The path to this file can be provided interactively or using the --dns-ecenter-credentials command-line argument. Certbot records the path to this file for use during renewal, but does not store the file's contents.

WARNING: You should protect these API credentials as you would the password to your Edge-Center 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-01 challenge 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).

Also you can override the default api_url or achieve even more flexibility by specifying auth and dns_api urls separately. Example ecenter.ini file:

# Edge-Center API urls used by Certbot
dns_ecenter_api_url = https://api.reseller.com
# implies that authapi available as /iam and dnsapi as /dns

# or
dns_ecenter_auth_url = https://api.example.org/iam
dns_ecenter_dns_api_url = https://dnsapi.example.com

Examples

To acquire a certificate for example.com

certbot certonly --authenticator dns-ecenter --dns-ecenter-credentials=./ecenter.ini -d 'example.com'

To acquire a certificate for example.com, waiting 80 seconds (recommended) for DNS propagation

certbot certonly --authenticator dns-ecenter --dns-ecenter-credentials=./ecenter.ini --dns-ecenter-propagation-seconds=80 -d 'example.com'

To acquire a ecdsa backed wildcard certificate for *.example.com, waiting 80 seconds (recommended) for DNS propagation in isolated directory (e.g. as non-root user)

mkdir certbot && cd certbot
certbot certonly --authenticator dns-ecenter --dns-ecenter-credentials=./ecenter.ini --dns-ecenter-propagation-seconds=80 -d '*.example.com' --key-type ecdsa --logs-dir=. --config-dir=. --work-dir=.

For developers

How to run\develop plugin in docker

docker-compose run --rm --service-ports dev bash
# commands below run inside docker container
pip install -e .
touch ./ecenter.ini # add edgecenter dns api credentials
pip install certbot
certbot certonly --authenticator dns-ecenter --dns-ecenter-credentials=./ecenter.ini -d 'example.com'

Main docs file here: certbot_dns_ecenter/__init__.py Build html docs files: cd ./docs && sphinx-build -b html . _build/html Main plugin version here: certbot_dns_ecenter/__version__.py

How to run tests: please see document .github/workflows/ci.yml

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_dns_ecenter-0.2.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

certbot_dns_ecenter-0.2.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_ecenter-0.2.1.tar.gz.

File metadata

  • Download URL: certbot_dns_ecenter-0.2.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for certbot_dns_ecenter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 17a2ceb52923fc5338cdfb87cea711649bf10de6de480e9b195c51c55dda1209
MD5 c5d6e8e92a21fafb4859809a5808b570
BLAKE2b-256 08a2ab40c473e3c4c40c397fc3d95028f714586a326b09a899e69ee4e7b7afcc

See more details on using hashes here.

File details

Details for the file certbot_dns_ecenter-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_ecenter-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ac908e7fd9d1e6ac6180f620b97ca616bd65efe45cdfc2bc6ee26a81aa197d7
MD5 e001248e54dc391aa9d7c31dedbb2c6c
BLAKE2b-256 586f0a08fa4a9e2fc6b3b81b7f9c76b91bd7f76dbaa1dcb93a6be662160b6b25

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