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

select the authenticator plugin (Required)

--dns-infomaniak-credentials

Infomaniak Token credentials INI file. (Required)

An example credentials.ini file:

dns_infomaniak_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

certbot certonly \
  --authenticator 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.2.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

certbot_dns_infomaniak-0.2.2-py2.py3-none-any.whl (12.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for certbot-dns-infomaniak-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a2c06581de56b00b0bd6f5d9d132df0131212d307f860a370e44d7051d6e342b
MD5 e62cc4a7142b3824d7ab68c6b76a6213
BLAKE2b-256 15ed8b3853a88c8a32a8c66fd38ecb831a7a4e31585cad192b896a653c6736a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for certbot_dns_infomaniak-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 28766fbff18127da0780f448d01cc5353b93893c057fda60d4200f5f6392b26b
MD5 ff1340c7d9bd08f0b0ac4e673fc605cc
BLAKE2b-256 47b522f29c61755ad7be0643b176a4e11f15dcae915e3f1c17fa6b84fe77038a

See more details on using hashes here.

Supported by

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