certbot-dns-httprequest
Plugin pour la compatibilité de Certbot avec une API HTTP Requests
Ce plugin configure un enregistrement DNS TXT pour répondre à un challenge dns-01. Il utilise une API HTTP Request Lego compatible ((https://go-acme.github.io/lego/dns/httpreq/).
Le mode RAW n'est pas pris en charge par ce plugin.
Installation
Remarques :
- Aucun package pip n'est fourni pour l'instant (todo).
- Certbot doit être installé via
pip
pour permettre l'installation de plugins personnalisés. - Si vous utilisez un environnement virtuel (venv) pour Certbot, les commandes peuvent différer. Assurez-vous d'installer le plugin dans l'environnement virtuel utilisé par Certbot.
Clonez le dépôt et installez le plugin en mode éditable :
git clone https://gitlab-forge.din.developpement-durable.gouv.fr/snum/dis/go/pst/wdns/certbot-dns-httprequest
cd certbot-dns-httprequest
pip install -e .
Les versions de pip et setuptools doivent être assez récentes pour la prise en charge du fichier pyproject.toml (pip>=21.3, setuptools>=64)
Vérifiez que le plugin est présent et détecté par Certbot :
Listez les packages installés :
pip list
Sortie attendue :
certbot-dns-httprequest 2025.0.0 /chemin/vers/projet/certbot-dns-httprequest
Listez les plugins disponibles dans Certbot :
certbot plugins
Sortie attendue :
* dns-httpreq
Configuration
Préparez un fichier mycreds.ini
avec les informations de connexion à l'API HTTP Request (tous les paramètres sont obligatoires) :
dns_httpreq_endpoint = https://httpreq-provider.example/api/acme/lego
dns_httpreq_username = username
dns_httpreq_password = password
dns_httpreq_timeout = 300
Important : Assurez-vous que les permissions sur le fichier mycreds.ini
sont restreintes :
chmod 600 mycreds.ini
Exécutez Certbot
Pour générer un certificat, utilisez la commande certbot avec les arguments suivants :
certbot certonly --authenticator dns-httpreq --dns-httpreq-credentials=mycreds.ini
ENGLISH
certbot-dns-httprequest
Plugin for Certbot Compatibility with HTTP Request Endpoints
This plugin configures a DNS TXT record to respond to a dns-01
challenge using an HTTP request API endpoint compatible with Lego.
Note: Raw mode is not supported (https://go-acme.github.io/lego/dns/httpreq/).
Installation
Notes:
- No pip package is provided yet (todo).
- Certbot MUST be installed via
pip
to allow custom plugin installation. - If using a virtual environment (venv), commands may differ slightly. Ensure you install the plugin in the same virtual environment as Certbot.
Clone the repository and install the plugin in editable mode:
git clone https://gitlab-forge.din.developpement-durable.gouv.fr/snum/dis/go/pst/wdns/certbot-dns-httprequest
cd certbot-dns-httprequest
pip install -e .
Verify Plugin Installation
Check that the plugin is installed and detected by Certbot:
-
List installed packages:
pip list
Expected output:
certbot-dns-httprequest 2025.0.0 /path/to/project/certbot-dns-httprequest
-
List available plugins in Certbot:
certbot plugins
Expected output:
* dns-httpreq
Usage
Prepare a mycreds.ini
file with your custom configuration. All fields are mandatory:
dns_httpreq_endpoint = https://httpreq-provider.example/api/acme/lego
dns_httpreq_username = username
dns_httpreq_password = password
dns_httpreq_timeout = 300
Important: Restrict permissions on the mycreds.ini
file:
chmod 600 mycreds.ini
Run Certbot
Generate your certificate using certbot command with following argumets:
certbot certonly --authenticator dns-httpreq --dns-httpreq-credentials=mycreds.ini