pax_global_header00006660000000000000000000000064150500674740014522gustar00rootroot0000000000000052 comment=eb2e2ef4aa45a9b0909b9cd160e2753f877a93fe python-certbot-dns-standalone-1.2.1/000077500000000000000000000000001505006747400174145ustar00rootroot00000000000000python-certbot-dns-standalone-1.2.1/LICENSE.txt000066400000000000000000000250421505006747400212420ustar00rootroot00000000000000 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 python-certbot-dns-standalone-1.2.1/MANIFEST.in000066400000000000000000000001001505006747400211410ustar00rootroot00000000000000include LICENSE.txt include README.rst recursive-include docs * python-certbot-dns-standalone-1.2.1/PKG-INFO000066400000000000000000000141531505006747400205150ustar00rootroot00000000000000Metadata-Version: 2.2 Name: certbot-dns-standalone Version: 1.2.1 Summary: Standalone DNS Authenticator plugin for Certbot Home-page: https://github.com/siilike/certbot-dns-standalone Author: Lauri Keel 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: 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 Description-Content-Type: text/x-rst License-File: LICENSE.txt Requires-Dist: acme>=0.21.1 Requires-Dist: certbot>=3.0.0 Requires-Dist: dnslib>=0.9.0 Requires-Dist: mock Requires-Dist: setuptools Provides-Extra: docs Requires-Dist: Sphinx>=1.0; extra == "docs" Requires-Dist: sphinx_rtd_theme; extra == "docs" Dynamic: author Dynamic: classifier Dynamic: description Dynamic: description-content-type Dynamic: home-page Dynamic: license Dynamic: provides-extra Dynamic: requires-dist Dynamic: requires-python Dynamic: summary Standalone DNS Authenticator plugin for Certbot =============================================== This is a Certbot plugin that uses an integrated DNS server to respond to the ``_acme-challenge`` records, so the domain's records do not have to be modified. Installation ============ pip --- :: # pip3 install certbot certbot-dns-standalone snap ---- :: # snap install certbot certbot-dns-standalone # snap set certbot trust-plugin-with-root=ok # snap connect certbot:plugin certbot-dns-standalone # snap connect certbot-dns-standalone:certbot-metadata certbot:certbot-metadata Debian ------ :: # apt-get install certbot python3-certbot-dns-standalone Docker ------ See below. Usage ===== First, you need to pick a central address for certbot, e.g. ``acme.example.com``. Next, the ``_acme-challenge`` records need to be pointed to ``$domain.acme.example.com`` using CNAME records, e.g. for ``example.net``: :: _acme-challenge IN CNAME example.net.acme.example.com. Finally, you need to point ``*.acme.example.com`` to certbot. There are two options for that. Firstly, if you have an IP address with port ``53`` available, you could configure it as the nameserver for ``acme.example.com``: :: acme IN NS ns.acme.example.com. ns.acme IN A 1.2.3.4 where ``1.2.3.4`` is the IP of the server where certbot will be run. This configuration directs any requests to ``*.acme.example.com`` to ``1.2.3.4`` where the plugin will respond with the relevant challenge. Any server can be used as long as port ``53`` is available which means that a DNS server cannot be run at that particular IP at the same time. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=1.2.3.4 \ -d example.net -d '*.example.net' Secondly, if you already run a DNS server you could configure it to forward all requests to ``*.acme.example.com`` to another IP/port instead where you would run certbot. With Knot DNS you can use ``mod-dnsproxy``: :: remote: - id: certbot address: 127.0.0.1@5555 mod-dnsproxy: - id: certbot remote: certbot fallback: off zone: - domain: acme.example.com module: mod-dnsproxy/certbot Using this configuration all requests to ``*.acme.example.com`` are directed to ``127.0.0.1`` port ``5555``. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=127.0.0.1 \ --dns-standalone-port=5555 \ -d example.net -d '*.example.net' By default the plugin binds to all available interfaces. The validation usually takes less than a second. To renew the certificates add ``certbot renew`` to ``crontab``. Usage with Docker ================= In order to use the latest image published in Docker Hub, run: :: docker run -it --rm --name certbot-dns-standalone \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ laurik/certbot-dns-standalone:latest certonly where ``1.2.3.4`` is the IP address to use for responding the challenges. HTTP challenges should be directed to port ``8080``. ``/etc/letsencrypt`` and ``/var/lib/letsencrypt`` need to be mapped to permanent storage. Alternatively, you may also build the plugin image locally by running: :: docker build -t certbot-dns-standalone-local /path/to/certbot-dns-standalone/ and then: :: docker run -it --rm \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ certbot-dns-standalone-local certonly Supported parameters ==================== Parameters can be specified as ``--dns-standalone-PARAMETER=VALUE``. For older certbot versions it should be ``--certbot-dns-standalone:dns-standalone-PARAMETER=VALUE``. Supported parameters are: * ``address`` -- IPv4 address to bind to, defaults to ``0.0.0.0`` * ``ipv6-address`` -- IPv6 address to bind to, defaults to ``::`` * ``port`` -- port to use, defaults to ``53`` The relevant parameters in ``/etc/letsencrypt/renewal/*.conf`` are ``dns_standalone_address``, ``dns_standalone_port`` and ``dns_standalone_ipv6_address``. Third party projects ==================== Third party projects integrating certbot-dns-standalone: * `CertCache `_ python-certbot-dns-standalone-1.2.1/README.rst000066400000000000000000000110771505006747400211110ustar00rootroot00000000000000Standalone DNS Authenticator plugin for Certbot =============================================== This is a Certbot plugin that uses an integrated DNS server to respond to the ``_acme-challenge`` records, so the domain's records do not have to be modified. Installation ============ pip --- :: # pip3 install certbot certbot-dns-standalone snap ---- :: # snap install certbot certbot-dns-standalone # snap set certbot trust-plugin-with-root=ok # snap connect certbot:plugin certbot-dns-standalone # snap connect certbot-dns-standalone:certbot-metadata certbot:certbot-metadata Debian ------ :: # apt-get install certbot python3-certbot-dns-standalone Docker ------ See below. Usage ===== First, you need to pick a central address for certbot, e.g. ``acme.example.com``. Next, the ``_acme-challenge`` records need to be pointed to ``$domain.acme.example.com`` using CNAME records, e.g. for ``example.net``: :: _acme-challenge IN CNAME example.net.acme.example.com. Finally, you need to point ``*.acme.example.com`` to certbot. There are two options for that. Firstly, if you have an IP address with port ``53`` available, you could configure it as the nameserver for ``acme.example.com``: :: acme IN NS ns.acme.example.com. ns.acme IN A 1.2.3.4 where ``1.2.3.4`` is the IP of the server where certbot will be run. This configuration directs any requests to ``*.acme.example.com`` to ``1.2.3.4`` where the plugin will respond with the relevant challenge. Any server can be used as long as port ``53`` is available which means that a DNS server cannot be run at that particular IP at the same time. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=1.2.3.4 \ -d example.net -d '*.example.net' Secondly, if you already run a DNS server you could configure it to forward all requests to ``*.acme.example.com`` to another IP/port instead where you would run certbot. With Knot DNS you can use ``mod-dnsproxy``: :: remote: - id: certbot address: 127.0.0.1@5555 mod-dnsproxy: - id: certbot remote: certbot fallback: off zone: - domain: acme.example.com module: mod-dnsproxy/certbot Using this configuration all requests to ``*.acme.example.com`` are directed to ``127.0.0.1`` port ``5555``. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=127.0.0.1 \ --dns-standalone-port=5555 \ -d example.net -d '*.example.net' By default the plugin binds to all available interfaces. The validation usually takes less than a second. To renew the certificates add ``certbot renew`` to ``crontab``. Usage with Docker ================= In order to use the latest image published in Docker Hub, run: :: docker run -it --rm --name certbot-dns-standalone \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ laurik/certbot-dns-standalone:latest certonly where ``1.2.3.4`` is the IP address to use for responding the challenges. HTTP challenges should be directed to port ``8080``. ``/etc/letsencrypt`` and ``/var/lib/letsencrypt`` need to be mapped to permanent storage. Alternatively, you may also build the plugin image locally by running: :: docker build -t certbot-dns-standalone-local /path/to/certbot-dns-standalone/ and then: :: docker run -it --rm \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ certbot-dns-standalone-local certonly Supported parameters ==================== Parameters can be specified as ``--dns-standalone-PARAMETER=VALUE``. For older certbot versions it should be ``--certbot-dns-standalone:dns-standalone-PARAMETER=VALUE``. Supported parameters are: * ``address`` -- IPv4 address to bind to, defaults to ``0.0.0.0`` * ``ipv6-address`` -- IPv6 address to bind to, defaults to ``::`` * ``port`` -- port to use, defaults to ``53`` The relevant parameters in ``/etc/letsencrypt/renewal/*.conf`` are ``dns_standalone_address``, ``dns_standalone_port`` and ``dns_standalone_ipv6_address``. Third party projects ==================== Third party projects integrating certbot-dns-standalone: * `CertCache `_ python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/000077500000000000000000000000001505006747400256245ustar00rootroot00000000000000python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/PKG-INFO000066400000000000000000000141531505006747400267250ustar00rootroot00000000000000Metadata-Version: 2.2 Name: certbot-dns-standalone Version: 1.2.1 Summary: Standalone DNS Authenticator plugin for Certbot Home-page: https://github.com/siilike/certbot-dns-standalone Author: Lauri Keel 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: 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 Description-Content-Type: text/x-rst License-File: LICENSE.txt Requires-Dist: acme>=0.21.1 Requires-Dist: certbot>=3.0.0 Requires-Dist: dnslib>=0.9.0 Requires-Dist: mock Requires-Dist: setuptools Provides-Extra: docs Requires-Dist: Sphinx>=1.0; extra == "docs" Requires-Dist: sphinx_rtd_theme; extra == "docs" Dynamic: author Dynamic: classifier Dynamic: description Dynamic: description-content-type Dynamic: home-page Dynamic: license Dynamic: provides-extra Dynamic: requires-dist Dynamic: requires-python Dynamic: summary Standalone DNS Authenticator plugin for Certbot =============================================== This is a Certbot plugin that uses an integrated DNS server to respond to the ``_acme-challenge`` records, so the domain's records do not have to be modified. Installation ============ pip --- :: # pip3 install certbot certbot-dns-standalone snap ---- :: # snap install certbot certbot-dns-standalone # snap set certbot trust-plugin-with-root=ok # snap connect certbot:plugin certbot-dns-standalone # snap connect certbot-dns-standalone:certbot-metadata certbot:certbot-metadata Debian ------ :: # apt-get install certbot python3-certbot-dns-standalone Docker ------ See below. Usage ===== First, you need to pick a central address for certbot, e.g. ``acme.example.com``. Next, the ``_acme-challenge`` records need to be pointed to ``$domain.acme.example.com`` using CNAME records, e.g. for ``example.net``: :: _acme-challenge IN CNAME example.net.acme.example.com. Finally, you need to point ``*.acme.example.com`` to certbot. There are two options for that. Firstly, if you have an IP address with port ``53`` available, you could configure it as the nameserver for ``acme.example.com``: :: acme IN NS ns.acme.example.com. ns.acme IN A 1.2.3.4 where ``1.2.3.4`` is the IP of the server where certbot will be run. This configuration directs any requests to ``*.acme.example.com`` to ``1.2.3.4`` where the plugin will respond with the relevant challenge. Any server can be used as long as port ``53`` is available which means that a DNS server cannot be run at that particular IP at the same time. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=1.2.3.4 \ -d example.net -d '*.example.net' Secondly, if you already run a DNS server you could configure it to forward all requests to ``*.acme.example.com`` to another IP/port instead where you would run certbot. With Knot DNS you can use ``mod-dnsproxy``: :: remote: - id: certbot address: 127.0.0.1@5555 mod-dnsproxy: - id: certbot remote: certbot fallback: off zone: - domain: acme.example.com module: mod-dnsproxy/certbot Using this configuration all requests to ``*.acme.example.com`` are directed to ``127.0.0.1`` port ``5555``. You can then run certbot as follows: :: certbot --non-interactive --agree-tos --email certmaster@example.com certonly \ --authenticator dns-standalone \ --dns-standalone-address=127.0.0.1 \ --dns-standalone-port=5555 \ -d example.net -d '*.example.net' By default the plugin binds to all available interfaces. The validation usually takes less than a second. To renew the certificates add ``certbot renew`` to ``crontab``. Usage with Docker ================= In order to use the latest image published in Docker Hub, run: :: docker run -it --rm --name certbot-dns-standalone \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ laurik/certbot-dns-standalone:latest certonly where ``1.2.3.4`` is the IP address to use for responding the challenges. HTTP challenges should be directed to port ``8080``. ``/etc/letsencrypt`` and ``/var/lib/letsencrypt`` need to be mapped to permanent storage. Alternatively, you may also build the plugin image locally by running: :: docker build -t certbot-dns-standalone-local /path/to/certbot-dns-standalone/ and then: :: docker run -it --rm \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 8080:80 -p 1.2.3.4:53:53/tcp -p 1.2.3.4:53:53/udp \ certbot-dns-standalone-local certonly Supported parameters ==================== Parameters can be specified as ``--dns-standalone-PARAMETER=VALUE``. For older certbot versions it should be ``--certbot-dns-standalone:dns-standalone-PARAMETER=VALUE``. Supported parameters are: * ``address`` -- IPv4 address to bind to, defaults to ``0.0.0.0`` * ``ipv6-address`` -- IPv6 address to bind to, defaults to ``::`` * ``port`` -- port to use, defaults to ``53`` The relevant parameters in ``/etc/letsencrypt/renewal/*.conf`` are ``dns_standalone_address``, ``dns_standalone_port`` and ``dns_standalone_ipv6_address``. Third party projects ==================== Third party projects integrating certbot-dns-standalone: * `CertCache `_ python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/SOURCES.txt000066400000000000000000000010661505006747400275130ustar00rootroot00000000000000LICENSE.txt MANIFEST.in README.rst setup.cfg setup.py certbot_dns_standalone/__init__.py certbot_dns_standalone/dns_standalone.py certbot_dns_standalone/dns_standalone_test.py certbot_dns_standalone.egg-info/PKG-INFO certbot_dns_standalone.egg-info/SOURCES.txt certbot_dns_standalone.egg-info/dependency_links.txt certbot_dns_standalone.egg-info/entry_points.txt certbot_dns_standalone.egg-info/requires.txt certbot_dns_standalone.egg-info/top_level.txt docs/.gitignore docs/Makefile docs/api.rst docs/conf.py docs/index.rst docs/make.bat docs/api/dns_standalone.rstpython-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/dependency_links.txt000066400000000000000000000000011505006747400316720ustar00rootroot00000000000000 python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/entry_points.txt000066400000000000000000000001271505006747400311220ustar00rootroot00000000000000[certbot.plugins] dns-standalone = certbot_dns_standalone.dns_standalone:Authenticator python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/requires.txt000066400000000000000000000001371505006747400302250ustar00rootroot00000000000000acme>=0.21.1 certbot>=3.0.0 dnslib>=0.9.0 mock setuptools [docs] Sphinx>=1.0 sphinx_rtd_theme python-certbot-dns-standalone-1.2.1/certbot_dns_standalone.egg-info/top_level.txt000066400000000000000000000000271505006747400303550ustar00rootroot00000000000000certbot_dns_standalone python-certbot-dns-standalone-1.2.1/certbot_dns_standalone/000077500000000000000000000000001505006747400241325ustar00rootroot00000000000000python-certbot-dns-standalone-1.2.1/certbot_dns_standalone/__init__.py000066400000000000000000000044161505006747400262500ustar00rootroot00000000000000""" The `~certbot_dns_standalone.dns_standalone` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by using an integrated DNS server. This allows using CNAME records to direct validation elsewhere in case of domains not under your control or when simply wanting to avoid making changes to the DNS records. You only need an IP address with a free port 53. First you need to choose a subdomain that you will use, e.g. `acme.example.com`. Next, you need to configure the relevant NS and A records .. code-block:: none acme IN NS ns.acme.example.com. ns.acme IN A 1.2.3.4 where `1.2.3.4` the IP of the server that will be running `certbot`. Next, you need to configure `_acme-challenge` as a CNAME record to point to `domain.acme.example.com`, e.g.: .. code-block:: none _acme-challenge IN CNAME example.org.acme.example.com. where `example.org` is the domain you are requesting the certificate for. The domain name itself is not used anywhere, but it is a good practice to specify it anyway. Named Arguments --------------- ======================================== ===================================== ``--dns-standalone-address`` IPv4 address to bind to (default: 0.0.0.0) ``--dns-standalone-ipv6-address`` IPv6 address to bind to (default: ::) ``--dns-standalone-port`` Port to use (default: 53) ======================================== ===================================== Examples -------- .. code-block:: bash :caption: To acquire a certificate for ``example.com`` using the IP ``1.2.3.4`` certbot certonly \\ --preferred-challenges dns --authenticator dns-standalone \\ --dns-standalone-address 1.2.3.4 \\ --dns-standalone-ipv6-address=:: \\ --dns-standalone-port=53 \\ -d example.com .. code-block:: bash :caption: To acquire a single certificate for both ``example.com`` and ``www.example.com`` using the IP ``1.2.3.4`` certbot certonly \\ --preferred-challenges dns --authenticator dns-standalone \\ --dns-standalone-address 1.2.3.4 \\ -d example.com \\ -d www.example.com """ python-certbot-dns-standalone-1.2.1/certbot_dns_standalone/dns_standalone.py000066400000000000000000000073741505006747400275130ustar00rootroot00000000000000"""Standalone DNS Authenticator.""" import logging import copy from dnslib import RR from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger,UDPServer,TCPServer from socket import AF_INET6,SOCK_DGRAM from certbot import errors from certbot import interfaces from certbot.plugins import dns_common logger = logging.getLogger(__name__) dnsLogger = DNSLogger("truncated,error",False) class Authenticator(dns_common.DNSAuthenticator): """Standalone DNS Authenticator This Authenticator uses a standalone DNS server to fulfill a dns-01 challenge. """ description = ('Obtain certificates using an integrated DNS server') def __init__(self, *args, **kwargs): super(Authenticator, self).__init__(*args, **kwargs) self.resolver = None self.servers = None @classmethod def add_parser_arguments(cls, add): # pylint: disable=arguments-differ super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=0) add('address', help='IP address to bind to.', default='0.0.0.0') add('ipv6-address', help='IPv6 address to bind to.', default='::') add('port', help='Port to bind to.', default='53') def _setup_credentials(self): return def more_info(self): # pylint: disable=missing-docstring,no-self-use return 'This plugin uses a standalone DNS server to respond to a dns-01 challenge.' def _perform(self, domain, validation_name, validation): if self.resolver is None: self.resolver = _AcmeResolver() self.resolver.addToken(validation) if self.servers is None: self.servers = [] active_udp_server = False error = None for Server in [TCP6Server, TCPServer, UDP6Server, UDPServer]: # Try IPv6 version first since it may listen on IPv4 as well. try: if Server.address_family == AF_INET6: address = self.conf('ipv6-address') else: address = self.conf('address') if address is not None: server = DNSServer(self.resolver, port=int(self.conf('port')), address=address, server=Server, logger=dnsLogger) server.start_thread() self.servers.append(server) if Server.socket_type == SOCK_DGRAM: active_udp_server = True except Exception as e: error = e if not active_udp_server: # Re-raise the exception when no UDP server was started successfully. raise errors.PluginError('Error starting DNS server: {0}'.format(error)) def _cleanup(self, domain, validation_name, validation): if self.servers: for server in self.servers: server.stop() class _AcmeResolver(BaseResolver): def __init__(self): self.tokens = [] def addToken(self,validation): self.tokens.append(validation) def resolve(self,request,handler): reply = request.reply() qname = request.q.qname if request.q.qtype == 16: records = "" for r in self.tokens: records += ". 60 TXT %s\n" % r resp = RR.fromZone(records) else: resp = RR.fromZone(". 60 A 127.0.0.1") # for dig if request.q.qtype == 1 or request.q.qtype == 16: for rr in resp: a = copy.copy(rr) a.rname = qname reply.add_answer(a) return reply class UDP6Server(UDPServer): address_family = AF_INET6 class TCP6Server(TCPServer): address_family = AF_INET6 python-certbot-dns-standalone-1.2.1/certbot_dns_standalone/dns_standalone_test.py000066400000000000000000000014401505006747400305360ustar00rootroot00000000000000"""Tests for certbot_dns_standalone.dns_standalone.""" import os import unittest import mock from certbot import errors from certbot.plugins import dns_test_common from certbot.plugins.dns_test_common import DOMAIN from certbot.tests import util as test_util class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthenticatorTest): def setUp(self): from certbot_dns_standalone.dns_standalone import Authenticator super(AuthenticatorTest, self).setUp() self.config = mock.MagicMock(standalone_address='127.0.0.1') self.auth = Authenticator(self.config, "standalone") def test_perform(self): return # TODO def test_perform(self): return # TODO if __name__ == "__main__": unittest.main() # pragma: no cover python-certbot-dns-standalone-1.2.1/docs/000077500000000000000000000000001505006747400203445ustar00rootroot00000000000000python-certbot-dns-standalone-1.2.1/docs/.gitignore000066400000000000000000000000111505006747400223240ustar00rootroot00000000000000/_build/ python-certbot-dns-standalone-1.2.1/docs/Makefile000066400000000000000000000011541505006747400220050ustar00rootroot00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SPHINXPROJ = certbot-dns-standalone 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) python-certbot-dns-standalone-1.2.1/docs/api.rst000066400000000000000000000001311505006747400216420ustar00rootroot00000000000000================= API Documentation ================= .. toctree:: :glob: api/** python-certbot-dns-standalone-1.2.1/docs/api/000077500000000000000000000000001505006747400211155ustar00rootroot00000000000000python-certbot-dns-standalone-1.2.1/docs/api/dns_standalone.rst000066400000000000000000000002361505006747400246440ustar00rootroot00000000000000:mod:`certbot_dns_standalone.dns_standalone` -------------------------------------------- .. automodule:: certbot_dns_standalone.dns_standalone :members: python-certbot-dns-standalone-1.2.1/docs/conf.py000066400000000000000000000133311505006747400216440ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # certbot-dns-standalone documentation build configuration file, created by # sphinx-quickstart on Tue May 9 10:20:04 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'] autodoc_member_order = 'bysource' autodoc_default_flags = ['show-inheritance', 'private-members'] # 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-standalone' copyright = u'2018, 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 = True # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # # http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs # on_rtd is whether we are on readthedocs.org on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # otherwise, readthedocs.org uses their theme by default, so no need to specify it # 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-standalonedoc' # -- 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-standalone.tex', u'certbot-dns-standalone 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-standalone', u'certbot-dns-standalone 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-standalone', u'certbot-dns-standalone Documentation', author, 'certbot-dns-standalone', '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.org/en/latest/', None), 'certbot': ('https://certbot.eff.org/docs/', None), } python-certbot-dns-standalone-1.2.1/docs/index.rst000066400000000000000000000010741505006747400222070ustar00rootroot00000000000000.. certbot-dns-standalone documentation master file, created by sphinx-quickstart on Tue May 9 10:20:04 2017. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to certbot-dns-standalone's documentation! ================================================== .. toctree:: :maxdepth: 2 :caption: Contents: .. automodule:: certbot_dns_standalone :members: .. toctree:: :maxdepth: 1 api Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` python-certbot-dns-standalone-1.2.1/docs/make.bat000066400000000000000000000014721505006747400217550ustar00rootroot00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=certbot-dns-standalone if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd python-certbot-dns-standalone-1.2.1/setup.cfg000066400000000000000000000001031505006747400212270ustar00rootroot00000000000000[bdist_wheel] universal = 1 [egg_info] tag_build = tag_date = 0 python-certbot-dns-standalone-1.2.1/setup.py000066400000000000000000000037421505006747400211340ustar00rootroot00000000000000from setuptools import setup from setuptools import find_packages with open('README.rst') as file: long_description = file.read() version = '1.2.1' # Remember to update local-oldest-requirements.txt when changing the minimum # acme/certbot version. install_requires = [ 'acme>=0.21.1', 'certbot>=3.0.0', 'dnslib>=0.9.0', 'mock', 'setuptools', ] docs_extras = [ 'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags 'sphinx_rtd_theme', ] setup( name='certbot-dns-standalone', version=version, description="Standalone DNS Authenticator plugin for Certbot", url='https://github.com/siilike/certbot-dns-standalone', author="Lauri Keel", 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', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Security', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Networking', 'Topic :: System :: Systems Administration', 'Topic :: Utilities', ], long_description=long_description, long_description_content_type='text/x-rst', packages=find_packages(), include_package_data=True, install_requires=install_requires, extras_require={ 'docs': docs_extras, }, entry_points={ 'certbot.plugins': [ 'dns-standalone = certbot_dns_standalone.dns_standalone:Authenticator', ], }, test_suite='certbot_dns_standalone', )