certbot_dns_rfc2136.dns_rfc2136

DNS Authenticator using RFC 2136 Dynamic Updates.

class certbot_dns_rfc2136.dns_rfc2136.Authenticator(*args, **kwargs)[source]

Bases: certbot.plugins.dns_common.DNSAuthenticator

DNS Authenticator using RFC 2136 Dynamic Updates

This Authenticator uses RFC 2136 Dynamic Updates to fulfull a dns-01 challenge.

classmethod add_parser_arguments(add)[source]

Add plugin arguments to the CLI argument parser.

NOTE: If some of your flags interact with others, you can use cli.report_config_interaction to register this to ensure values are correctly saved/overridable during renewal.

Parameters:add (callable) – Function that proxies calls to argparse.ArgumentParser.add_argument prepending options with unique plugin name prefix.
_setup_credentials()[source]

Establish credentials, prompting if necessary.

_perform(_domain, validation_name, validation)[source]

Performs a dns-01 challenge by creating a DNS TXT record.

Parameters:
  • domain (str) – The domain being validated.
  • validation_domain_name (str) – The validation record domain name.
  • validation (str) – The validation record content.
Raises:

errors.PluginError – If the challenge cannot be performed

_cleanup(_domain, validation_name, validation)[source]

Deletes the DNS TXT record which would have been created by _perform_achall.

Fails gracefully if no such record exists.

Parameters:
  • domain (str) – The domain being validated.
  • validation_domain_name (str) – The validation record domain name.
  • validation (str) – The validation record content.
class certbot_dns_rfc2136.dns_rfc2136._RFC2136Client(server, port, key_name, key_secret, key_algorithm)[source]

Bases: object

Encapsulates all communication with the target DNS server.

add_txt_record(record_name, record_content, record_ttl)[source]

Add a TXT record using the supplied information.

Parameters:
  • record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
  • record_content (str) – The record content (typically the challenge validation).
  • record_ttl (int) – The record TTL (number of seconds that the record may be cached).
Raises:

certbot.errors.PluginError – if an error occurs communicating with the DNS server

del_txt_record(record_name, record_content)[source]

Delete a TXT record using the supplied information.

Parameters:
  • record_name (str) – The record name (typically beginning with ‘_acme-challenge.’).
  • record_content (str) – The record content (typically the challenge validation).
  • record_ttl (int) – The record TTL (number of seconds that the record may be cached).
Raises:

certbot.errors.PluginError – if an error occurs communicating with the DNS server

_find_domain(record_name)[source]

Find the closest domain with an SOA record for a given domain name.

Parameters:record_name (str) – The record name for which to find the closest SOA record.
Returns:tuple of (entry, zone) where entry - canonical relative entry into the target zone; zone - canonical absolute name of the zone to be modified.
Return type:(dns.name.Name, dns.name.Name)
Raises:certbot.errors.PluginError – if the search failed for any reason.
_query_soa(domain)[source]

Query a domain name for an authoritative SOA record.

Parameters:domain (dns.name.Name) – The domain name to query for an SOA record.
Returns:(authoritative, rdata) if found autoritative bool if response was authoritative rdata dns.rdata.Rdata or None the returned record
Return type:(bool, dns.rdata.Rdata or None)
Raises:certbot.errors.PluginError – if no response is received.