bind: Drop enabling DNSSEC (deprecated) as it is always enabled

- As of bind 9.16, the option to enable DNSSEC 'dnssec-enable' is obsolete and
has no effect[1]. The option 'dnssec-validation' controls DNSSEC validation and
is set to 'auto' by default. 'auto' means that DNSSEC validation is enabled and
default trust anchor is used for DNS root zone. DNSSEC signatures are also
passed onto a client whenever available. Current stable, Debian Buster, has
version 9.16[3].

- As of bind 9.18, the option to enable DNSSEC 'dnssec-enable' is not recognized
and causes the daemon to fail to start[2]. Debian next, Debian Bookworm, has
version 9.18[3]. Therefore, in testing and unstable, bind fails to start of
installation from FreedomBox.

- There is no use-case for changing the current default behavior.

Links:

1)
https://bind9.readthedocs.io/en/v9_16_32/reference.html#dnssec-validation-option

2) https://bind9.readthedocs.io/en/v9_18_6/reference.html

3) https://tracker.debian.org/pkg/bind9

Tests:

- Run functional and unit tests.

- Option to enable/disable DNSSEC is removed.

- When bind is installed on testing without the patch, it fails to start. When
the patch is applied, bind will be upgraded, the dnssec-enable option is removed
from the configuration file /etc/bind/named.conf.options and bind is running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2022-10-08 18:54:08 -04:00
1 parent 65c433a211
commit 158366feea
6 files changed
+15 -83

No files matched your search

-12
View File
@@ -74,18 +74,6 @@ def test_set_forwarders():
assert conf['forwarders'] == ''
@pytest.mark.usefixtures('configuration_file')
def test_enable_dnssec():
"""Test that enabling DNSSEC works."""
bind.privileged._set_dnssec(True)
conf = bind.privileged.get_config()
assert conf['enable_dnssec']
bind.privileged._set_dnssec(False)
conf = bind.privileged.get_config()
assert not conf['enable_dnssec']
@pytest.mark.usefixtures('bind_zones_folder')
def test_get_correct_served_domains():
"""
@@ -23,45 +23,14 @@ class TestBindApp(functional.BaseAppTests):
functional.set_forwarders(session_browser, '1.1.1.1 1.0.0.1')
assert functional.get_forwarders(session_browser) == '1.1.1.1 1.0.0.1'
def test_enable_disable_dnssec(self, session_browser):
"""Test enabling/disabling DNSSEC."""
functional.app_enable(session_browser, 'bind')
_enable_dnssec(session_browser, False)
_enable_dnssec(session_browser, True)
assert _get_dnssec(session_browser)
_enable_dnssec(session_browser, False)
assert not _get_dnssec(session_browser)
@pytest.mark.backups
def test_backup_restore(self, session_browser):
"""Test backup and restore."""
functional.app_enable(session_browser, 'bind')
functional.set_forwarders(session_browser, '1.1.1.1')
_enable_dnssec(session_browser, False)
functional.backup_create(session_browser, 'bind', 'test_bind')
functional.set_forwarders(session_browser, '1.0.0.1')
_enable_dnssec(session_browser, True)
functional.backup_restore(session_browser, 'bind', 'test_bind')
assert functional.get_forwarders(session_browser) == '1.1.1.1'
assert not _get_dnssec(session_browser)
def _enable_dnssec(browser, enable):
"""Enable/disable DNSSEC in bind configuration."""
functional.nav_to_module(browser, 'bind')
if enable:
browser.check('enable_dnssec')
else:
browser.uncheck('enable_dnssec')
functional.submit(browser, form_class='form-configuration')
def _get_dnssec(browser):
"""Return whether DNSSEC is enabled/disabled in bind configuration."""
functional.nav_to_module(browser, 'bind')
return browser.find_by_name('enable_dnssec').first.checked