Skip to main content

Certbot DNS Authenticator plugin for IONOS

Project description

Release PyPI version

Alt text

IONOS Cloud DNS Certbot Authenticator Plugin

The IONOS Cloud DNS Certbot Plugin automates SSL/TLS certificate creation for IONOS Cloud zones. It implements the Authenticator interface which is used by Certbot to perform a DNS-01 challenge.

Requirements

To make use of the plugin, the following is needed:

Installation

pip install certbot-dns-ionos-cloud

Arguments

Argument Example Description
--authenticator dns-ionos-cloud Tells certbot which plugin to use. dns-ionos should be used for this plugin.
--dns-ionos-cloud-credentials ./credentials.ini Denotes the directory path to the credentials file. Required.
--dns-ionos-cloud-propagation-seconds 120 Configures the duration in seconds that certbot waits before querying the TXT record. (Default: 120)

Credentials file

As mentioned in the previous section, the --dns-ionos-credentials needs to point to an ini file containing the IONOS API access token. The file must contain the ionos_dns_token key with the value of the access token.

dns_ionos_token=YOUR_API_JWT_ACCESS_TOKEN

Example Usage

certbot certonly \
  --authenticator dns-ionos-cloud \
  --dns-ionos-cloud-credentials /path/to/credentials.ini \
  --dns-ionos-cloud-propagation-seconds 60 \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'example.com'

In the background, the plugin will try to find your zone. If found, it will create a TXT record for the DNS-01 challenge. At the end of the process, the TLS/SSL certificate is generated and the TXT record is deleted.

Support

If you encounter any issues or have suggestions, please feel free to open an issue.

License

This project is licensed under the Apache License 2.0 License - see the LICENSE file for details.

How to develop locally

To develop and test the plugin locally, it is recommend to create a python virtual environment. For example: python -m venv .venv

After activating the virtual environment, the following command should be used to install the project to the virtual environment local site packages: pip install -e .

Afterwards, any changes made to the plugin will be directly reflected when executing the certbot certonly --authenticator dns-ionos (without the need to execute pip install again).

It's important to note that the following arguments need also to be provided when developing locally in a virtual environment --logs-dir, --config-dir, --work-dir, otherwise the certbot will attempt to use the global folders for logging, configuration, and work. This may not work because of the lack of permissions, so you may see errors like below if those arguments are not set:

The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.

As explained by the error message, to be able write to /var/log/letsencrypt/, root permissions are needed. However, when running as a root (e.g sudo certbot), the global certbot package will be used and not the one from the virtual environment. The solution is to set --logs-dir, --config-dir, and --work-dir to a different folder for which the current user has write permissions.

Testing

unit tests can be run using: make test

Related Plugins

It's important to note that this plugin targets IONOS Cloud DNS service. IONOS offers a different service for managing DNS zones, referred to as IONOS Developer DNS API. For the latter, there is dedicated plugin managed by the community: https://github.com/helgeerbe/certbot-dns-ionos

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_ionos_cloud-2.0.0.tar.gz (12.9 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_ionos_cloud-2.0.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_ionos_cloud-2.0.0.tar.gz.

File metadata

  • Download URL: certbot_dns_ionos_cloud-2.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for certbot_dns_ionos_cloud-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b53fb2db544c97e466ca850259a6030c2b12f8e8ab3e1db21bcf118c9c5aad9b
MD5 66a44b380baba138a8071f3e6406a6b7
BLAKE2b-256 faeab98f8fc872af6a6d58d0a1e24d9d1601a15858311452524b47159081f8b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for certbot_dns_ionos_cloud-2.0.0.tar.gz:

Publisher: release.yaml on ionos-cloud/certbot-dns-ionos-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file certbot_dns_ionos_cloud-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_ionos_cloud-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caaadb28bd1bd19428927ec429209fb1885e99087f12e23a6bda14583fa669e6
MD5 51ea98920e089b9097c344af360a8e3b
BLAKE2b-256 0c9d5ca43f461abc65ae3b8391f4bb46a6c9d13081a3cb5931e86796bdf3a254

See more details on using hashes here.

Provenance

The following attestation bundles were made for certbot_dns_ionos_cloud-2.0.0-py3-none-any.whl:

Publisher: release.yaml on ionos-cloud/certbot-dns-ionos-cloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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