Skip to main content

Buddy DNS Authenticator plugin for Certbot

Project description

Buddy 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 Buddy Rest API.

Issue a token

In your Buddy account create personal access token with scopes:

  • WORKSPACE

  • ZONE_WRITE

  • ZONE_READ

Installation

pip install certbot-dns-buddy

Usage

Via environment variable

export BUDDY_TOKEN=xxx
# pass workspace url domain
export BUDDY_WORKSPACE=yyy
# pass domain id
export BUDDY_DOMAIN_ID=zzz
# if you want to use different region than US
export BUDDY_BASE_URL=https://api.eu.buddy.works
certbot certonly \
   --authenticator dns-buddy \
   --agree-tos \
   -d 'foo.bar'

Via INI file

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).

--authenticator dns-buddy

select the authenticator plugin (Required)

--dns-buddy-credentials

Buddy Token credentials INI file. (Required)

An example credentials.ini file:

dns_buddy_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
dns_buddy_workspace = YYY
dns_buddy_domain_id = ZZZ
dns_buddy_base_url = https://api.eu.buddy.works

To start using DNS authentication for Buddy, pass the following arguments on certbot’s command line:

certbot certonly \
  --authenticator dns-buddy \
  --dns-buddy-credentials <path to file> \
  --agree-tos \
  -d 'foo.bar'

Automatic renewal

By default, certbot installs a service that periodically renews its certificates automatically. In order to do this, the command must know the API key, otherwise it will fail silently.

In order to enable automatic renewal for your wildcard certificates, you will need to edit /lib/systemd/system/certbot.service. In there, add the following line in Service, with <YOUR_API_TOKEN> replaced with your actual token:

Environment="BUDDY_TOKEN=<YOUR_API_TOKEN>"
Environment="BUDDY_WORKSPACE=<YOUR_API_TOKEN>"
Environment="BUDDY_DOMAIN_ID=<YOUR_DOMAIN_ID>"

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

certbot_dns_buddy-1.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_buddy-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_buddy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db662eaa0ca976dafb78735af4d4d09d7d742ed2957e29e4268629af3eae58d6
MD5 5f80f0185dd3bf26ced66eb270082149
BLAKE2b-256 13b97997a61fd52f61f740ea52c203174e09dffa91a56a7c339471f35d6acbfe

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