././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6324775 certbot_dns_rfc2136-4.0.0/0000775000175000017500000000000014775045675014273 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/LICENSE.txt0000664000175000017500000002504214775045665016120 0ustar00willgwillg Copyright 2015 Electronic Frontier Foundation and others Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/MANIFEST.in0000664000175000017500000000023114775045665016024 0ustar00willgwillginclude LICENSE.txt include README.rst recursive-include docs * include certbot_dns_rfc2136/py.typed global-exclude __pycache__ global-exclude *.py[cod] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6324775 certbot_dns_rfc2136-4.0.0/PKG-INFO0000644000175000017500000000312114775045675015363 0ustar00willgwillgMetadata-Version: 2.4 Name: certbot-dns-rfc2136 Version: 4.0.0 Summary: RFC 2136 DNS Authenticator plugin for Certbot Home-page: https://github.com/certbot/certbot Author: Certbot Project Author-email: certbot-dev@eff.org License: Apache License 2.0 Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Plugins Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Security Classifier: Topic :: System :: Installation/Setup Classifier: Topic :: System :: Networking Classifier: Topic :: System :: Systems Administration Classifier: Topic :: Utilities Requires-Python: >=3.9 License-File: LICENSE.txt Requires-Dist: dnspython>=2.6.1 Requires-Dist: acme>=4.0.0 Requires-Dist: certbot>=4.0.0 Provides-Extra: docs Requires-Dist: Sphinx>=1.0; extra == "docs" Requires-Dist: sphinx_rtd_theme; extra == "docs" Provides-Extra: test Requires-Dist: pytest; extra == "test" Dynamic: author Dynamic: author-email Dynamic: classifier Dynamic: home-page Dynamic: license Dynamic: license-file Dynamic: provides-extra Dynamic: requires-dist Dynamic: requires-python Dynamic: summary ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/README.rst0000664000175000017500000000005614775045665015762 0ustar00willgwillgRFC 2136 DNS Authenticator plugin for Certbot ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6304774 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/0000775000175000017500000000000014775045675017747 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/__init__.py0000664000175000017500000002023314775045665022057 0ustar00willgwillg""" The `~certbot_dns_rfc2136.dns_rfc2136` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using RFC 2136 Dynamic Updates. .. note:: The plugin is not installed by default. It can be installed by heading to `certbot.eff.org `_, choosing your system and selecting the Wildcard tab. Named Arguments --------------- ===================================== ===================================== ``--dns-rfc2136-credentials`` RFC 2136 credentials_ INI file. (Required) ``--dns-rfc2136-propagation-seconds`` The number of seconds to wait for DNS to propagate before asking the ACME server to verify the DNS record. (Default: 60) ===================================== ===================================== Credentials ----------- Use of this plugin requires a configuration file containing the target DNS server and optional port that supports RFC 2136 Dynamic Updates, the name of the TSIG key, the TSIG key secret itself, the algorithm used if it's different to HMAC-MD5, and optionally whether to sign the initial SOA query. .. code-block:: ini :name: credentials.ini :caption: Example credentials file: # Target DNS server (IPv4 or IPv6 address, not a hostname) dns_rfc2136_server = 192.0.2.1 # Target DNS port dns_rfc2136_port = 53 # TSIG key name dns_rfc2136_name = keyname. # TSIG key secret dns_rfc2136_secret = 4q4wM/2I180UXoMyN4INVhJNi8V9BCV+jMw2mXgZw/CSuxUT8C7NKKFs \ AmKd7ak51vWKgSl12ib86oQRPkpDjg== # TSIG key algorithm dns_rfc2136_algorithm = HMAC-SHA512 # TSIG sign SOA query (optional, default: false) dns_rfc2136_sign_query = false The path to this file can be provided interactively or using the ``--dns-rfc2136-credentials`` command-line argument. Certbot records the path to this file for use during renewal, but does not store the file's contents. .. caution:: You should protect this TSIG key material as it can be used to potentially add, update, or delete any record in the target DNS server. Users who can read this file can use these credentials to issue arbitrary API calls on your behalf. Users who can cause Certbot to run using these credentials can complete a ``dns-01`` challenge to acquire new certificates or revoke existing certificates for associated domains, even if those domains aren't being managed by this server. Certbot will emit a warning if it detects that the credentials file can be accessed by other users on your system. The warning reads "Unsafe permissions on credentials configuration file", followed by the path to the credentials file. This warning will be emitted each time Certbot uses the credentials file, including for renewal, and cannot be silenced except by addressing the issue (e.g., by using a command like ``chmod 600`` to restrict access to the file). Examples -------- .. code-block:: bash :caption: To acquire a certificate for ``example.com`` certbot certonly \\ --dns-rfc2136 \\ --dns-rfc2136-credentials ~/.secrets/certbot/rfc2136.ini \\ -d example.com .. code-block:: bash :caption: To acquire a single certificate for both ``example.com`` and ``www.example.com`` certbot certonly \\ --dns-rfc2136 \\ --dns-rfc2136-credentials ~/.secrets/certbot/rfc2136.ini \\ -d example.com \\ -d www.example.com .. code-block:: bash :caption: To acquire a certificate for ``example.com``, waiting 30 seconds for DNS propagation certbot certonly \\ --dns-rfc2136 \\ --dns-rfc2136-credentials ~/.secrets/certbot/rfc2136.ini \\ --dns-rfc2136-propagation-seconds 30 \\ -d example.com Sample BIND configuration ''''''''''''''''''''''''' Here's a sample BIND configuration for Certbot to use. You will need to generate a new TSIG key, include it in the BIND configuration and grant it permission to issue updates on the target DNS zone. .. code-block:: bash :caption: Generate a new SHA512 TSIG key tsig-keygen -a HMAC-SHA512 keyname. .. note:: Prior to BIND version 9.10.0, you will need to use ``dnssec-keygen`` to generate TSIG keys. Try and use the most secure algorithm supported by your DNS server. .. code-block:: none :caption: Sample BIND configuration key "keyname." { algorithm hmac-sha512; secret "4q4wM/2I180UXoMyN4INVhJNi8V9BCV+jMw2mXgZw/CSuxUT8C7NKKFs \ AmKd7ak51vWKgSl12ib86oQRPkpDjg=="; }; zone "example.com." IN { type master; file "named.example.com"; update-policy { grant keyname. name _acme-challenge.example.com. txt; }; }; .. note:: This configuration limits the scope of the TSIG key to just be able to add and remove TXT records for one specific host for the purpose of completing the ``dns-01`` challenge. If your version of BIND doesn't support the ``update-policy`` directive, then you can use the less-secure ``allow-update`` directive instead. `See the BIND documentation `_ for details. Special considerations for multiple views in BIND ''''''''''''''''''''''''''''''''''''''''''''''''' If your BIND configuration leverages multiple views, Certbot may fail with an ``Unable to determine base domain for _acme-challenge.example.com`` error. This error occurs when Certbot isn't able to communicate with an authorative nameserver for the zone, one that answers with the AA (Authorative Answer) flag set in the response. A common multiple view configuration with two views, external and internal, can cause this error. If the zone is only present in the external view, and the credentials_ ``dns_rfc2136_server`` setting is set (e.g. 127.0.0.1) so the DNS server's ``match-clients`` view option causes the DNS server to route Certbot's query to the internal view; the internal view doesn't contain the zone, so the response won't have the AA flag set. One solution is to logically place the zone into the view Certbot is sending queries to, with an `in-view `_ zone option. The zone will be then visible in both zones with exactly the same content. .. note:: Order matters in BIND views: the ``in-view`` zone option must refer to a view defined preceeding it. It cannot refer to a view defined later in the configuration file. .. code-block:: none :caption: Split-view BIND configuration key "keyname." { algorithm hmac-sha512; secret "4q4wM/2I180UXoMyN4INVhJNi8V9BCV+jMw2mXgZw/CSuxUT8C7NKKFs \ AmKd7ak51vWKgSl12ib86oQRPkpDjg=="; }; // adjust internal-addresses to suit your needs acl internal-address { 127.0.0.0/8; 10.0.0.0/8; 192.168.0.0/16; 172.16.0.0/12; }; view "external" { match-clients { !internal-addresses; any; }; zone "example.com." IN { type master; file "named.example.com"; update-policy { grant keyname. name _acme-challenge.example.com. txt; }; }; }; view "internal" { zone "example.com." IN { in-view external; }; }; Another solution is to add `dns_rfc2136_sign_query = true` to the configuration file and then add the key to the `match-clients` list within the external zone view. All queries signed with this key should then be directed to this view, regardless of source IP. .. code-block:: none :caption: Split-view BIND configuration with key-based ACLs key "keyname." { algorithm hmac-sha512; secret "4q4wM/2I180UXoMyN4INVhJNi8V9BCV+jMw2mXgZw/CSuxUT8C7NKKFs \ AmKd7ak51vWKgSl12ib86oQRPkpDjg=="; }; // adjust internal-addresses to suit your needs acl internal-address { 127.0.0.0/8; 10.0.0.0/8; 192.168.0.0/16; 172.16.0.0/12; }; acl certbot-keys { key keyname.; } view "external" { match-clients { acl certbot-keys; !internal-addresses; any; }; zone "example.com." IN { type master; file "named.example.com"; update-policy { grant keyname. name _acme-challenge.example.com. txt; }; }; }; """ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6304774 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/0000775000175000017500000000000014775045675021722 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/__init__.py0000664000175000017500000000011414775045665024026 0ustar00willgwillg"""Internal implementation of `~certbot_dns_rfc2136.dns_rfc2136` plugin.""" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/dns_rfc2136.py0000664000175000017500000002346714775045665024241 0ustar00willgwillg"""DNS Authenticator using RFC 2136 Dynamic Updates.""" import logging from typing import Any from typing import Callable from typing import cast from typing import Optional import dns.flags import dns.message import dns.name import dns.query import dns.rdataclass import dns.rdatatype import dns.tsig import dns.tsigkeyring import dns.update from certbot import errors from certbot.plugins import dns_common from certbot.plugins.dns_common import CredentialsConfiguration from certbot.util import is_ipaddress logger = logging.getLogger(__name__) DEFAULT_NETWORK_TIMEOUT = 45 class Authenticator(dns_common.DNSAuthenticator): """DNS Authenticator using RFC 2136 Dynamic Updates This Authenticator uses RFC 2136 Dynamic Updates to fulfill a dns-01 challenge. """ ALGORITHMS = { 'HMAC-MD5': dns.tsig.HMAC_MD5, 'HMAC-SHA1': dns.tsig.HMAC_SHA1, 'HMAC-SHA224': dns.tsig.HMAC_SHA224, 'HMAC-SHA256': dns.tsig.HMAC_SHA256, 'HMAC-SHA384': dns.tsig.HMAC_SHA384, 'HMAC-SHA512': dns.tsig.HMAC_SHA512 } PORT = 53 description = 'Obtain certificates using a DNS TXT record (if you are using BIND for DNS).' ttl = 120 def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) self.credentials: Optional[CredentialsConfiguration] = None @classmethod def add_parser_arguments(cls, add: Callable[..., None], default_propagation_seconds: int = 60) -> None: super().add_parser_arguments(add, default_propagation_seconds=60) add('credentials', help='RFC 2136 credentials INI file.') def more_info(self) -> str: return 'This plugin configures a DNS TXT record to respond to a dns-01 challenge using ' + \ 'RFC 2136 Dynamic Updates.' def _validate_credentials(self, credentials: CredentialsConfiguration) -> None: server = cast(str, credentials.conf('server')) if not is_ipaddress(server): raise errors.PluginError("The configured target DNS server ({0}) is not a valid IPv4 " "or IPv6 address. A hostname is not allowed.".format(server)) algorithm = credentials.conf('algorithm') if algorithm: if not self.ALGORITHMS.get(algorithm.upper()): raise errors.PluginError("Unknown algorithm: {0}.".format(algorithm)) def _setup_credentials(self) -> None: self.credentials = self._configure_credentials( 'credentials', 'RFC 2136 credentials INI file', { 'name': 'TSIG key name', 'secret': 'TSIG key secret', 'server': 'The target DNS server' }, self._validate_credentials ) def _perform(self, _domain: str, validation_name: str, validation: str) -> None: self._get_rfc2136_client().add_txt_record(validation_name, validation, self.ttl) def _cleanup(self, _domain: str, validation_name: str, validation: str) -> None: self._get_rfc2136_client().del_txt_record(validation_name, validation) def _get_rfc2136_client(self) -> "_RFC2136Client": if not self.credentials: # pragma: no cover raise errors.Error("Plugin has not been prepared.") algorithm: str = (self.credentials.conf('algorithm') or '').upper() return _RFC2136Client(cast(str, self.credentials.conf('server')), int(cast(str, self.credentials.conf('port')) or self.PORT), cast(str, self.credentials.conf('name')), cast(str, self.credentials.conf('secret')), self.ALGORITHMS.get(algorithm, dns.tsig.HMAC_MD5), (self.credentials.conf('sign_query') or '').upper() == "TRUE") class _RFC2136Client: """ Encapsulates all communication with the target DNS server. """ def __init__(self, server: str, port: int, key_name: str, key_secret: str, key_algorithm: dns.name.Name, sign_query: bool, timeout: int = DEFAULT_NETWORK_TIMEOUT) -> None: self.server = server self.port = port self.keyring = dns.tsigkeyring.from_text({ key_name: key_secret }) self.algorithm = key_algorithm self.sign_query = sign_query self._default_timeout = timeout def add_txt_record(self, record_name: str, record_content: str, record_ttl: int) -> None: """ Add a TXT record using the supplied information. :param str record_name: The record name (typically beginning with '_acme-challenge.'). :param str record_content: The record content (typically the challenge validation). :param int record_ttl: 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 """ domain = self._find_domain(record_name) n = dns.name.from_text(record_name) o = dns.name.from_text(domain) rel = n.relativize(o) update = dns.update.Update( domain, keyring=self.keyring, keyalgorithm=self.algorithm) update.add(rel, record_ttl, dns.rdatatype.TXT, record_content) try: response = dns.query.tcp(update, self.server, self._default_timeout, self.port) except Exception as e: raise errors.PluginError('Encountered error adding TXT record: {0}' .format(e)) rcode = response.rcode() if rcode == dns.rcode.NOERROR: logger.debug('Successfully added TXT record %s', record_name) else: raise errors.PluginError('Received response from server: {0}' .format(dns.rcode.to_text(rcode))) def del_txt_record(self, record_name: str, record_content: str) -> None: """ Delete a TXT record using the supplied information. :param str record_name: The record name (typically beginning with '_acme-challenge.'). :param str record_content: The record content (typically the challenge validation). :param int record_ttl: 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 """ domain = self._find_domain(record_name) n = dns.name.from_text(record_name) o = dns.name.from_text(domain) rel = n.relativize(o) update = dns.update.Update( domain, keyring=self.keyring, keyalgorithm=self.algorithm) update.delete(rel, dns.rdatatype.TXT, record_content) try: response = dns.query.tcp(update, self.server, self._default_timeout, self.port) except Exception as e: raise errors.PluginError('Encountered error deleting TXT record: {0}' .format(e)) rcode = response.rcode() if rcode == dns.rcode.NOERROR: logger.debug('Successfully deleted TXT record %s', record_name) else: raise errors.PluginError('Received response from server: {0}' .format(dns.rcode.to_text(rcode))) def _find_domain(self, record_name: str) -> str: """ Find the closest domain with an SOA record for a given domain name. :param str record_name: The record name for which to find the closest SOA record. :returns: The domain, if found. :rtype: str :raises certbot.errors.PluginError: if no SOA record can be found. """ domain_name_guesses = dns_common.base_domain_name_guesses(record_name) # Loop through until we find an authoritative SOA record for guess in domain_name_guesses: if self._query_soa(guess): return guess raise errors.PluginError('Unable to determine base domain for {0} using names: {1}.' .format(record_name, domain_name_guesses)) def _query_soa(self, domain_name: str) -> bool: """ Query a domain name for an authoritative SOA record. :param str domain_name: The domain name to query for an SOA record. :returns: True if found, False otherwise. :rtype: bool :raises certbot.errors.PluginError: if no response is received. """ domain = dns.name.from_text(domain_name) request = dns.message.make_query(domain, dns.rdatatype.SOA, dns.rdataclass.IN) # Turn off Recursion Desired bit in query request.flags ^= dns.flags.RD # Use our TSIG keyring if configured if self.sign_query: request.use_tsig(self.keyring, algorithm=self.algorithm) try: try: response = dns.query.tcp(request, self.server, self._default_timeout, self.port) except (OSError, dns.exception.Timeout) as e: logger.debug('TCP query failed, fallback to UDP: %s', e) response = dns.query.udp(request, self.server, self._default_timeout, self.port) rcode = response.rcode() # Authoritative Answer bit should be set if (rcode == dns.rcode.NOERROR and response.get_rrset(response.answer, domain, dns.rdataclass.IN, dns.rdatatype.SOA) and response.flags & dns.flags.AA): logger.debug('Received authoritative SOA response for %s', domain_name) return True logger.debug('No authoritative SOA record found for %s', domain_name) return False except Exception as e: raise errors.PluginError('Encountered error when making query: {0}' .format(e)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6314774 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/tests/0000775000175000017500000000000014775045675023064 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/tests/__init__.py0000664000175000017500000000004014775045665025166 0ustar00willgwillg"""certbot-dns-rfc2136 tests""" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/_internal/tests/dns_rfc2136_test.py0000664000175000017500000002622214775045665026432 0ustar00willgwillg"""Tests for certbot_dns_rfc2136._internal.dns_rfc2136.""" import sys import unittest from unittest import mock import dns.flags import dns.rcode import dns.tsig import pytest from certbot import errors from certbot.compat import os from certbot.plugins import dns_test_common from certbot.plugins.dns_test_common import DOMAIN from certbot.tests import util as test_util SERVER = '192.0.2.1' PORT = 53 NAME = 'a-tsig-key.' SECRET = 'SSB3b25kZXIgd2hvIHdpbGwgYm90aGVyIHRvIGRlY29kZSB0aGlzIHRleHQK' VALID_CONFIG = {"rfc2136_server": SERVER, "rfc2136_name": NAME, "rfc2136_secret": SECRET} TIMEOUT = 45 class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthenticatorTest): def setUp(self): from certbot_dns_rfc2136._internal.dns_rfc2136 import Authenticator super().setUp() path = os.path.join(self.tempdir, 'file.ini') dns_test_common.write(VALID_CONFIG, path) self.config = mock.MagicMock(rfc2136_credentials=path, rfc2136_propagation_seconds=0) # don't wait during tests self.auth = Authenticator(self.config, "rfc2136") self.mock_client = mock.MagicMock() # _get_rfc2136_client | pylint: disable=protected-access self.orig_get_client = self.auth._get_rfc2136_client # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.auth, '_get_rfc2136_client', mock.MagicMock(return_value=self.mock_client)) def test_get_client_default_conf_values(self): # algorithm and sign_query are intentionally absent to test that the default (None) # value does not crash Certbot. creds = { "server": SERVER, "port": PORT, "name": NAME, "secret": SECRET } self.auth.credentials = mock.MagicMock() self.auth.credentials.conf = lambda key: creds.get(key, None) client = self.orig_get_client() assert client.algorithm == self.auth.ALGORITHMS["HMAC-MD5"] assert client.sign_query is False @test_util.patch_display_util() def test_perform(self, unused_mock_get_utility): self.auth.perform([self.achall]) expected = [mock.call.add_txt_record('_acme-challenge.'+DOMAIN, mock.ANY, mock.ANY)] assert expected == self.mock_client.mock_calls def test_cleanup(self): # _attempt_cleanup | pylint: disable=protected-access self.auth._attempt_cleanup = True self.auth.cleanup([self.achall]) expected = [mock.call.del_txt_record('_acme-challenge.'+DOMAIN, mock.ANY)] assert expected == self.mock_client.mock_calls def test_invalid_algorithm_raises(self): config = VALID_CONFIG.copy() config["rfc2136_algorithm"] = "INVALID" dns_test_common.write(config, self.config.rfc2136_credentials) with pytest.raises(errors.PluginError): self.auth.perform([self.achall]) @test_util.patch_display_util() @mock.patch('certbot_dns_rfc2136._internal.dns_rfc2136._RFC2136Client') def test_valid_algorithm_passes(self, client, unused_mock_get_utility): from certbot_dns_rfc2136._internal.dns_rfc2136 import Authenticator config = VALID_CONFIG.copy() config["rfc2136_algorithm"] = "HMAC-sha512" dns_test_common.write(config, self.config.rfc2136_credentials) self.auth = Authenticator(self.config, "rfc2136") self.auth.perform([self.achall]) assert dns.tsig.HMAC_SHA512 in client.call_args.args def test_invalid_server_raises(self): config = VALID_CONFIG.copy() config["rfc2136_server"] = "example.com" dns_test_common.write(config, self.config.rfc2136_credentials) with pytest.raises(errors.PluginError): self.auth.perform([self.achall]) @test_util.patch_display_util() def test_valid_server_passes(self, unused_mock_get_utility): config = VALID_CONFIG.copy() dns_test_common.write(config, self.config.rfc2136_credentials) self.auth.perform([self.achall]) config["rfc2136_server"] = "2001:db8:3333:4444:cccc:dddd:eeee:ffff" dns_test_common.write(config, self.config.rfc2136_credentials) self.auth.perform([self.achall]) class RFC2136ClientTest(unittest.TestCase): def setUp(self): from certbot_dns_rfc2136._internal.dns_rfc2136 import _RFC2136Client self.rfc2136_client = _RFC2136Client(SERVER, PORT, NAME, SECRET, dns.tsig.HMAC_MD5, False, TIMEOUT) @mock.patch("dns.query.tcp") def test_add_txt_record(self, query_mock): query_mock.return_value.rcode.return_value = dns.rcode.NOERROR # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) self.rfc2136_client.add_txt_record("bar", "baz", 42) query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) assert 'bar. 42 IN TXT "baz"' in str(query_mock.call_args[0][0]) @mock.patch("dns.query.tcp") def test_add_txt_record_wraps_errors(self, query_mock): query_mock.side_effect = Exception # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) with pytest.raises(errors.PluginError): self.rfc2136_client.add_txt_record("bar", "baz", 42) @mock.patch("dns.query.tcp") def test_add_txt_record_server_error(self, query_mock): query_mock.return_value.rcode.return_value = dns.rcode.NXDOMAIN # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) with pytest.raises(errors.PluginError): self.rfc2136_client.add_txt_record("bar", "baz", 42) @mock.patch("dns.query.tcp") def test_del_txt_record(self, query_mock): query_mock.return_value.rcode.return_value = dns.rcode.NOERROR # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) self.rfc2136_client.del_txt_record("bar", "baz") query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) assert 'bar. 0 NONE TXT "baz"' in str(query_mock.call_args[0][0]) @mock.patch("dns.query.tcp") def test_del_txt_record_wraps_errors(self, query_mock): query_mock.side_effect = Exception # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) with pytest.raises(errors.PluginError): self.rfc2136_client.del_txt_record("bar", "baz") @mock.patch("dns.query.tcp") def test_del_txt_record_server_error(self, query_mock): query_mock.return_value.rcode.return_value = dns.rcode.NXDOMAIN # _find_domain | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_find_domain', mock.MagicMock(return_value="example.com")) with pytest.raises(errors.PluginError): self.rfc2136_client.del_txt_record("bar", "baz") def test_find_domain(self): # _query_soa | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_query_soa', mock.MagicMock(side_effect=[False, False, True])) # _find_domain | pylint: disable=protected-access domain = self.rfc2136_client._find_domain('foo.bar.'+DOMAIN) assert domain == DOMAIN def test_find_domain_wraps_errors(self): # _query_soa | pylint: disable=protected-access # workaround for wont-fix https://github.com/python/mypy/issues/2427 that works with # both strict and non-strict mypy setattr(self.rfc2136_client, '_query_soa', mock.MagicMock(return_value=False)) with pytest.raises(errors.PluginError): self.rfc2136_client._find_domain('foo.bar.'+DOMAIN) @mock.patch("dns.query.tcp") @mock.patch("dns.message.make_query") def test_query_soa_found(self, mock_make_query, query_mock): query_mock.return_value = mock.MagicMock(answer=[mock.MagicMock()], flags=dns.flags.AA) query_mock.return_value.rcode.return_value = dns.rcode.NOERROR mock_make_query.return_value = mock.MagicMock() # _query_soa | pylint: disable=protected-access result = self.rfc2136_client._query_soa(DOMAIN) query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) mock_make_query.return_value.use_tsig.assert_not_called() assert result @mock.patch("dns.query.tcp") def test_query_soa_not_found(self, query_mock): query_mock.return_value.rcode.return_value = dns.rcode.NXDOMAIN # _query_soa | pylint: disable=protected-access result = self.rfc2136_client._query_soa(DOMAIN) query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) assert not result @mock.patch("dns.query.tcp") def test_query_soa_wraps_errors(self, query_mock): query_mock.side_effect = Exception with pytest.raises(errors.PluginError): self.rfc2136_client._query_soa(DOMAIN) @mock.patch("dns.query.udp") @mock.patch("dns.query.tcp") def test_query_soa_fallback_to_udp(self, tcp_mock, udp_mock): tcp_mock.side_effect = OSError udp_mock.return_value = mock.MagicMock(answer=[mock.MagicMock()], flags=dns.flags.AA) udp_mock.return_value.rcode.return_value = dns.rcode.NOERROR # _query_soa | pylint: disable=protected-access result = self.rfc2136_client._query_soa(DOMAIN) tcp_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) udp_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT) assert result @mock.patch("dns.query.tcp") @mock.patch("dns.message.make_query") def test_query_soa_signed(self, mock_make_query, unused_mock_query): mock_make_query.return_value = mock.MagicMock() self.rfc2136_client.sign_query = True self.rfc2136_client.algorithm = dns.tsig.HMAC_MD5 self.rfc2136_client._query_soa(DOMAIN) mock_make_query.return_value.use_tsig.assert_called_with(mock.ANY, algorithm=dns.tsig.HMAC_MD5) if __name__ == "__main__": sys.exit(pytest.main(sys.argv[1:] + [__file__])) # pragma: no cover ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136/py.typed0000664000175000017500000000000014775045665021433 0ustar00willgwillg././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6314774 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/0000775000175000017500000000000014775045675021441 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/PKG-INFO0000644000175000017500000000312114775045674022530 0ustar00willgwillgMetadata-Version: 2.4 Name: certbot-dns-rfc2136 Version: 4.0.0 Summary: RFC 2136 DNS Authenticator plugin for Certbot Home-page: https://github.com/certbot/certbot Author: Certbot Project Author-email: certbot-dev@eff.org License: Apache License 2.0 Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Plugins Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Security Classifier: Topic :: System :: Installation/Setup Classifier: Topic :: System :: Networking Classifier: Topic :: System :: Systems Administration Classifier: Topic :: Utilities Requires-Python: >=3.9 License-File: LICENSE.txt Requires-Dist: dnspython>=2.6.1 Requires-Dist: acme>=4.0.0 Requires-Dist: certbot>=4.0.0 Provides-Extra: docs Requires-Dist: Sphinx>=1.0; extra == "docs" Requires-Dist: sphinx_rtd_theme; extra == "docs" Provides-Extra: test Requires-Dist: pytest; extra == "test" Dynamic: author Dynamic: author-email Dynamic: classifier Dynamic: home-page Dynamic: license Dynamic: license-file Dynamic: provides-extra Dynamic: requires-dist Dynamic: requires-python Dynamic: summary ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/SOURCES.txt0000664000175000017500000000120014775045674023315 0ustar00willgwillgLICENSE.txt MANIFEST.in README.rst setup.py certbot_dns_rfc2136/__init__.py certbot_dns_rfc2136/py.typed certbot_dns_rfc2136.egg-info/PKG-INFO certbot_dns_rfc2136.egg-info/SOURCES.txt certbot_dns_rfc2136.egg-info/dependency_links.txt certbot_dns_rfc2136.egg-info/entry_points.txt certbot_dns_rfc2136.egg-info/requires.txt certbot_dns_rfc2136.egg-info/top_level.txt certbot_dns_rfc2136/_internal/__init__.py certbot_dns_rfc2136/_internal/dns_rfc2136.py certbot_dns_rfc2136/_internal/tests/__init__.py certbot_dns_rfc2136/_internal/tests/dns_rfc2136_test.py docs/.gitignore docs/Makefile docs/api.rst docs/conf.py docs/index.rst docs/make.bat././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/dependency_links.txt0000664000175000017500000000000114775045674025506 0ustar00willgwillg ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/entry_points.txt0000664000175000017500000000013014775045674024730 0ustar00willgwillg[certbot.plugins] dns-rfc2136 = certbot_dns_rfc2136._internal.dns_rfc2136:Authenticator ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/requires.txt0000664000175000017500000000014014775045674024033 0ustar00willgwillgdnspython>=2.6.1 acme>=4.0.0 certbot>=4.0.0 [docs] Sphinx>=1.0 sphinx_rtd_theme [test] pytest ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063420.0 certbot_dns_rfc2136-4.0.0/certbot_dns_rfc2136.egg-info/top_level.txt0000664000175000017500000000002414775045674024166 0ustar00willgwillgcertbot_dns_rfc2136 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6314774 certbot_dns_rfc2136-4.0.0/docs/0000775000175000017500000000000014775045675015223 5ustar00willgwillg././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/.gitignore0000664000175000017500000000001114775045665017202 0ustar00willgwillg/_build/ ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/Makefile0000664000175000017500000000115314775045665016662 0ustar00willgwillg# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx SPHINXPROJ = certbot-dns-rfc2136 SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/api.rst0000664000175000017500000000022514775045665016524 0ustar00willgwillg================= API Documentation ================= Certbot plugins implement the Certbot plugins API, and do not otherwise have an external API. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/conf.py0000664000175000017500000001241414775045665016523 0ustar00willgwillg# -*- coding: utf-8 -*- # # certbot-dns-rfc2136 documentation build configuration file, created by # sphinx-quickstart on Thu Jun 15 06:42:51 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx_rtd_theme'] autodoc_member_order = 'bysource' autodoc_default_flags = ['show-inheritance'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = u'certbot-dns-rfc2136' copyright = u'2017, Certbot Project' author = u'Certbot Project' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = u'0' # The full version, including alpha/beta/rc tags. release = u'0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] default_role = 'py:obj' # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['_static'] # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = 'certbot-dns-rfc2136doc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'certbot-dns-rfc2136.tex', u'certbot-dns-rfc2136 Documentation', u'Certbot Project', 'manual'), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'certbot-dns-rfc2136', u'certbot-dns-rfc2136 Documentation', [author], 1) ] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'certbot-dns-rfc2136', u'certbot-dns-rfc2136 Documentation', author, 'certbot-dns-rfc2136', 'One line description of project.', 'Miscellaneous'), ] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/', None), 'acme': ('https://acme-python.readthedocs.io/en/latest/', None), 'certbot': ('https://eff-certbot.readthedocs.io/en/stable/', None), } ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/index.rst0000664000175000017500000000106114775045665017061 0ustar00willgwillg.. certbot-dns-rfc2136 documentation master file, created by sphinx-quickstart on Thu Jun 15 06:42:51 2017. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to certbot-dns-rfc2136's documentation! =============================================== .. toctree:: :maxdepth: 2 :caption: Contents: .. automodule:: certbot_dns_rfc2136 :members: .. toctree:: :maxdepth: 1 api Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/docs/make.bat0000664000175000017500000000146614775045665016636 0ustar00willgwillg@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=python -msphinx ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=certbot-dns-rfc2136 if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The Sphinx module was not found. Make sure you have Sphinx installed, echo.then set the SPHINXBUILD environment variable to point to the full echo.path of the 'sphinx-build' executable. Alternatively you may add the echo.Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.https://www.sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1744063420.6324775 certbot_dns_rfc2136-4.0.0/setup.cfg0000664000175000017500000000004614775045675016114 0ustar00willgwillg[egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1744063413.0 certbot_dns_rfc2136-4.0.0/setup.py0000664000175000017500000000453614775045665016014 0ustar00willgwillgimport os import sys from setuptools import find_packages from setuptools import setup version = '4.0.0' install_requires = [ # This version was chosen because it is the version packaged in RHEL 9 and Debian unstable. It # is possible this requirement could be relaxed to allow for an even older version of dnspython # if necessary. 'dnspython>=2.6.1', ] if os.environ.get('SNAP_BUILD'): install_requires.append('packaging') else: install_requires.extend([ # We specify the minimum acme and certbot version as the current plugin # version for simplicity. See # https://github.com/certbot/certbot/issues/8761 for more info. f'acme>={version}', f'certbot>={version}', ]) docs_extras = [ 'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags 'sphinx_rtd_theme', ] test_extras = [ 'pytest', ] setup( name='certbot-dns-rfc2136', version=version, description="RFC 2136 DNS Authenticator plugin for Certbot", url='https://github.com/certbot/certbot', author="Certbot Project", author_email='certbot-dev@eff.org', license='Apache License 2.0', python_requires='>=3.9', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Security', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Networking', 'Topic :: System :: Systems Administration', 'Topic :: Utilities', ], packages=find_packages(), include_package_data=True, install_requires=install_requires, extras_require={ 'docs': docs_extras, 'test': test_extras, }, entry_points={ 'certbot.plugins': [ 'dns-rfc2136 = certbot_dns_rfc2136._internal.dns_rfc2136:Authenticator', ], }, )