New upstream version 1.21.0
Harlan Lieberman-Berg
1 year, 4 months ago
0 | 0 |
Metadata-Version: 2.1
|
1 | 1 |
Name: certbot-dns-rfc2136
|
2 | |
Version: 1.18.0
|
|
2 |
Version: 1.21.0
|
3 | 3 |
Summary: RFC 2136 DNS Authenticator plugin for Certbot
|
4 | 4 |
Home-page: https://github.com/certbot/certbot
|
5 | 5 |
Author: Certbot Project
|
32 | 32 |
:name: credentials.ini
|
33 | 33 |
:caption: Example credentials file:
|
34 | 34 |
|
35 | |
# Target DNS server
|
|
35 |
# Target DNS server (IPv4 or IPv6 address, not a hostname)
|
36 | 36 |
dns_rfc2136_server = 192.0.2.1
|
37 | 37 |
# Target DNS port
|
38 | 38 |
dns_rfc2136_port = 53
|
14 | 14 |
from certbot import errors
|
15 | 15 |
from certbot.plugins import dns_common
|
16 | 16 |
from certbot.plugins.dns_common import CredentialsConfiguration
|
|
17 |
from certbot.util import is_ipaddress
|
17 | 18 |
|
18 | 19 |
logger = logging.getLogger(__name__)
|
19 | 20 |
|
|
53 | 54 |
return 'This plugin configures a DNS TXT record to respond to a dns-01 challenge using ' + \
|
54 | 55 |
'RFC 2136 Dynamic Updates.'
|
55 | 56 |
|
56 | |
def _validate_algorithm(self, credentials):
|
|
57 |
def _validate_credentials(self, credentials):
|
|
58 |
server = credentials.conf('server')
|
|
59 |
if not is_ipaddress(server):
|
|
60 |
raise errors.PluginError("The configured target DNS server ({0}) is not a valid IPv4 "
|
|
61 |
"or IPv6 address. A hostname is not allowed.".format(server))
|
57 | 62 |
algorithm = credentials.conf('algorithm')
|
58 | 63 |
if algorithm:
|
59 | 64 |
if not self.ALGORITHMS.get(algorithm.upper()):
|
|
68 | 73 |
'secret': 'TSIG key secret',
|
69 | 74 |
'server': 'The target DNS server'
|
70 | 75 |
},
|
71 | |
self._validate_algorithm
|
|
76 |
self._validate_credentials
|
72 | 77 |
)
|
73 | 78 |
|
74 | 79 |
def _perform(self, _domain, validation_name, validation):
|
0 | 0 |
Metadata-Version: 2.1
|
1 | 1 |
Name: certbot-dns-rfc2136
|
2 | |
Version: 1.18.0
|
|
2 |
Version: 1.21.0
|
3 | 3 |
Summary: RFC 2136 DNS Authenticator plugin for Certbot
|
4 | 4 |
Home-page: https://github.com/certbot/certbot
|
5 | 5 |
Author: Certbot Project
|
0 | |
dnspython
|
|
0 |
dnspython>=1.15.0
|
1 | 1 |
setuptools>=39.0.1
|
2 | |
zope.interface
|
3 | |
acme>=1.18.0
|
4 | |
certbot>=1.18.0
|
|
2 |
acme>=1.21.0
|
|
3 |
certbot>=1.21.0
|
5 | 4 |
|
6 | 5 |
[docs]
|
7 | 6 |
Sphinx>=1.0
|
3 | 3 |
from setuptools import find_packages
|
4 | 4 |
from setuptools import setup
|
5 | 5 |
|
6 | |
version = '1.18.0'
|
|
6 |
version = '1.21.0'
|
7 | 7 |
|
8 | 8 |
install_requires = [
|
9 | |
'dnspython',
|
|
9 |
'dnspython>=1.15.0',
|
10 | 10 |
'setuptools>=39.0.1',
|
11 | |
'zope.interface',
|
12 | 11 |
]
|
13 | 12 |
|
14 | 13 |
if not os.environ.get('SNAP_BUILD'):
|
73 | 73 |
|
74 | 74 |
self.auth.perform([self.achall])
|
75 | 75 |
|
|
76 |
def test_invalid_server_raises(self):
|
|
77 |
config = VALID_CONFIG.copy()
|
|
78 |
config["rfc2136_server"] = "example.com"
|
|
79 |
dns_test_common.write(config, self.config.rfc2136_credentials)
|
|
80 |
|
|
81 |
self.assertRaises(errors.PluginError,
|
|
82 |
self.auth.perform,
|
|
83 |
[self.achall])
|
|
84 |
|
|
85 |
@test_util.patch_display_util()
|
|
86 |
def test_valid_server_passes(self, unused_mock_get_utility):
|
|
87 |
config = VALID_CONFIG.copy()
|
|
88 |
dns_test_common.write(config, self.config.rfc2136_credentials)
|
|
89 |
|
|
90 |
self.auth.perform([self.achall])
|
|
91 |
|
|
92 |
config["rfc2136_server"] = "2001:db8:3333:4444:cccc:dddd:eeee:ffff"
|
|
93 |
dns_test_common.write(config, self.config.rfc2136_credentials)
|
|
94 |
|
|
95 |
self.auth.perform([self.achall])
|
|
96 |
|
76 | 97 |
|
77 | 98 |
class RFC2136ClientTest(unittest.TestCase):
|
78 | 99 |
|