Skip to main content

Alibaba Cloud DNS Authenticator plugin for Certbot

Project description

Alibaba Cloud DNS Authenticator plugin for Certbot.

This plugin automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records using the Alibaba Cloud DNS API.

Installation

pip install certbot-dns-alibabacloud

Named Arguments

--dns-alibabacloud-credentials

Alibaba Cloud credentials INI file. (Required)

--dns-alibabacloud-propagation-seconds

The number of seconds to wait for DNS to propagate before asking the ACME server to verify the DNS record. (Default: 30)

Credentials

You need to provide a credentials file containing your Alibaba Cloud AccessKey to Certbot so that it can communicate with Alibaba Cloud and complete the DNS-01 domain validation on your behalf. The Access Key can be created through the Alibaba Cloud RAM (Resource Access Management) console.

An example credentials file is shown below:

# Alibaba Cloud API credentials used by Certbot
dns_alibabacloud_access_key_id = LTAI5txxxxxxxxxxxxxxxxxx
dns_alibabacloud_access_key_secret = yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

To manage the DNS records required for the challenge, the plugin first needs to locate the corresponding managed domain in Alibaba Cloud DNS for the requested certificate domain name.

The Access Key must have permission to list managed domains in Alibaba Cloud DNS, create and delete DNS records, and query existing records for challenge cleanup after the validation completes:

  • alidns:DescribeDomains

  • alidns:AddDomainRecord

  • alidns:DeleteDomainRecord

  • alidns:DescribeDomainRecords

Here is an example RAM policy that follows the Principle of Least Privilege:

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "alidns:DescribeDomains",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "alidns:AddDomainRecord",
        "alidns:DeleteDomainRecord",
        "alidns:DescribeDomainRecords"
      ],
      "Resource": "acs:alidns:*:*:domain/YOUR-DOMAIN-NAME.COM"
    }
  ]
}

Examples

To acquire a certificate for example.com:

certbot certonly \
  --authenticator dns-alibabacloud \
  --dns-alibabacloud-credentials ~/.secrets/certbot/alibabacloud.ini \
  -d example.com

To acquire a single certificate for both example.com and www.example.com:

certbot certonly \
  --authenticator dns-alibabacloud \
  --dns-alibabacloud-credentials ~/.secrets/certbot/alibabacloud.ini \
  -d example.com \
  -d www.example.com

To acquire a certificate for example.com, waiting 60 seconds for DNS propagation:

certbot certonly \
  --authenticator dns-alibabacloud \
  --dns-alibabacloud-credentials ~/.secrets/certbot/alibabacloud.ini \
  --dns-alibabacloud-propagation-seconds 60 \
  -d example.com

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_alibabacloud-0.1.0b1.tar.gz (10.0 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_alibabacloud-0.1.0b1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_alibabacloud-0.1.0b1.tar.gz.

File metadata

File hashes

Hashes for certbot_dns_alibabacloud-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 63e88782f4df4fdbbebc1d33d9c8918cabdb665e278466a597bf44b82dacb30e
MD5 182d12c62980e8a9b0763d4821be35dd
BLAKE2b-256 c3b6f09b63ed5aa874c7ee2afbc0b8ac254921cea473566f2831dfb748fa73f3

See more details on using hashes here.

File details

Details for the file certbot_dns_alibabacloud-0.1.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_alibabacloud-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebfcc83244d6470509fe812e086096dfbe87d44bf2141072521cb99329792358
MD5 19c550ff9b4dd5308a95c3782798f4bd
BLAKE2b-256 cfa8a52b70b3df03ced77716f45cbbe9753485930414641b317f811f64b9e3c8

See more details on using hashes here.

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