Skip to main content

Infomaniak DNS Authenticator plugin for Certbot

Project description

Infomaniak DNS Authenticator plugin for certbot

This plugin enables usage of Infomaniak public API to complete dns-01 challenges.

Issue a token

At your Infomaniak manager dashboard, to to the API section and generate a token with “Domain” scope

Installation

pip install certbot-dns-infomaniak

Usage

Via environment variable

export INFOMANIAK_API_TOKEN=xxx
certbot certonly \
  --authenticator certbot-dns-infomaniak:dns-infomaniak \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

If certbot requires elevated rights, the following command must be used instead:

export INFOMANIAK_API_TOKEN=xxx
sudo --preserve-env=INFOMANIAK_API_TOKEN certbot certonly \
  --authenticator certbot-dns-infomaniak:dns-infomaniak \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

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 certbot-dns-infomaniak:dns-infomaniak

select the authenticator plugin (Required)

--certbot-dns-infomaniak:dns-infomaniak-credentials

Infomaniak Token credentials INI file. (Required)

An example credentials.ini file:

certbot_dns_infomaniak:dns_infomaniak_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

certbot certonly \
  --authenticator certbot-dns-infomaniak:dns-infomaniak \
  --certbot-dns-infomaniak:dns-infomaniak-credentials <path to file> \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

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="INFOMANIAK_API_TOKEN=<YOUR_API_TOKEN>"

Acknowledgments

Based on certbot-dns-ispconfig plugin at https://github.com/m42e/certbot-dns-ispconfig/

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-infomaniak-0.1.13.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

certbot_dns_infomaniak-0.1.13-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file certbot-dns-infomaniak-0.1.13.tar.gz.

File metadata

  • Download URL: certbot-dns-infomaniak-0.1.13.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for certbot-dns-infomaniak-0.1.13.tar.gz
Algorithm Hash digest
SHA256 7f11ce4e222477127279ddce41b335cea625d08a73ae58adf4783e7edd393572
MD5 e7d08b31298704699fdc10144efc46d3
BLAKE2b-256 41f91578797141b1b7b41e4dd3e705beefce8d6f8d861b82db8c1df57860aa71

See more details on using hashes here.

File details

Details for the file certbot_dns_infomaniak-0.1.13-py2.py3-none-any.whl.

File metadata

  • Download URL: certbot_dns_infomaniak-0.1.13-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for certbot_dns_infomaniak-0.1.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a33ac5beff55fe15cdbd1d2f0e3581360e9807b0be92101e11c809153819b0ae
MD5 4ed086d1e63f739b58c0fe4700692f64
BLAKE2b-256 e6fccc65d258cecdf7fe63ae72217ef521d1025199805d5c095097359f0b8769

See more details on using hashes here.

Supported by

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