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:The domain, if found.
Return type:str
Raises:certbot.errors.PluginError – if no SOA record can be found.
_query_soa(domain_name)[source]

Query a domain name for an authoritative SOA record.

Parameters:domain_name (str) – The domain name to query for an SOA record.
Returns:True if found, False otherwise.
Return type:bool
Raises:certbot.errors.PluginError – if no response is received.