Tencent Cloud DNS Authenticator plugin for Certbot
Project description
certbot-dns-tencentcloud
This package provides a Certbot authenticator plugin that can complete the DNS-01 challenge using the Tencent Cloud API.
Installation
Only Tested on python 3.8, should work on python 3.7 too and forward.
- no plan to support python2
- dataclasses is used, so python 3.6 and down will not work. However you can try installing
dataclasses
from pypi.
Use pip to install this package:
sudo pip3 install certbot-dns-tencentcloud
Verify the installation with Certbot:
sudo certbot plugins
You should see dns-tencentcloud
in the output.
Usage
To use this plugin, set the authenticator to dns-tencentcloud
via the -a
or --authenticator
flag.
You may also set this using Certbot's configuration file (defaults to /etc/letsencrypt/cli.ini
).
You will also need to provide a credentials file with your Tencent Cloud API key id and secret, like the following:
dns_tencentcloud_secret_id = TENCENTCLOUD_SECRET_ID
dns_tencentcloud_secret_key = TENCENTCLOUD_SECRET_KEY
The path to this file can be provided interactively or via the --dns-tencentcloud-credentials
argument.
You can also provide the credential using TENCENTCLOUD_SECRET_ID
and TENCENTCLOUD_SECRET_KEY
environment variables.
CAUTION: Protect your API key as you would the password to your account. Anyone with access to this file can make API calls on your behalf. Be sure to read the security tips below.
Arguments
--dns-tencentcloud-credentials
path to Tencent Cloud credentials INI file (Required)--dns-tencentcloud-propagation-seconds
seconds to wait before verifying the DNS record (Default: 10)
NOTE: Due to a limitation in Certbot, these arguments cannot be set via Certbot's configuration file.
Example
When in root:
certbot certonly \
-a dns-tencentcloud \
--dns-tencentcloud-credentials ~/.secrets/certbot/tencentcloud.ini \
-d example.com
or if providing credentials using environment variable:
export TENCENTCLOUD_SECRET_ID=<your_secret_id> TENCENTCLOUD_SECRET_KEY=<your_secret_key>
certbot certonly \
-a dns-tencentcloud \
-d example.com
Security Tips
Restrict access of your credentials file to the owner.
You can do this using chmod 600
.
Certbot will emit a warning if the credentials file
can be accessed by other users on your system.
Use a separate key from your account's primary API key. Make a separate user under your account, and limit its access to only allow DNS access and the IP address of the machine(s) that will be using it.
FAQ
- Which strategy should I choose to limit my API key access to only allow DNS resolution related operation?
We now use the new DNSPOD api so you need to give QcloudDNSPodFullAccess
strategy (need to add record so write permission is necessary).
- renew certs for
*.abc.com
andabc.com
at the same time sometimes show error about incorrect TXT records.
It seems Let's Encrypt cache TXT records for at most 60 seconds, since DNSPod doesn't seem
to allow setting TXT record's TTL below 60, in this case the best/safest way is to set
--dns-tencentcloud-propagation-seconds
longer than 60.
- Debug mode?
--dns-tencentcloud-debug true
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file certbot-dns-tencentcloud-2.0.2.tar.gz
.
File metadata
- Download URL: certbot-dns-tencentcloud-2.0.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f174529b3abfd28eda3a2031fad2c63ca9561a09742b1de22f1b37ee20a069d |
|
MD5 | cd2ba6f81b8efb196e42531d419566c7 |
|
BLAKE2b-256 | f9040dca6cc6973a85215412da260cba3dbab3199b79cb74005797cd6edc6d0b |
File details
Details for the file certbot_dns_tencentcloud-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: certbot_dns_tencentcloud-2.0.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15805603c7dfc9c14d267c4f856e4210835f8237537898a765059db9e76aa5a2 |
|
MD5 | e3545014a996fb5f956b4917941505fb |
|
BLAKE2b-256 | 038f5627725d1371647ad6155b4f0050501114b84dd5b8af254dc5dedaf3c039 |