Commit Graph
6019 Commits
Author SHA1 Message Date
Matthijs Mekking 155aba5bd5 Fix a checkconf bug
The check for printing zone list failed because of these additional
lines in the output:

good.conf:22: dnssec-policy: key algorithm 13 has predefined length; \
  ignoring length value 256

I am not sure why this failure hasn't happened before already.
2024-01-25 14:41:25 +01:00
Matthijs Mekking 792670c991 Check if key-store directory is not reused
Similar to key-directory, check for zones in different views and
different key and signing policies. Zones must be using different key
directories to store key files on disk.

Now that a key directory can be linked with a dnssec-policy key, the
'keydirexist' checking needs to be reshuffled.

Add tests for bad configuration examples, named-checkconf should catch
those. Also add test cases for a mix of key-directory and key-store
directory.
2024-01-25 14:41:24 +01:00
Matthijs Mekking 22d1fde1a5 Check if key-store directory exists
Similar to key-directory, check if the key-store directory exists and
if it is an actual directory.

This commit fixes an accidental test bug in checkconf where if
the "warn key-dir" test failed, the result was ignored.
2024-01-25 14:38:12 +01:00
Matthijs Mekking 594d4a81f1 Check if key-store exists
Add checkconf check to ensure that the used key-store in the keys
section exists. Error if that is not the case. We also don't allow
the special keyword 'key-directory' as that is internally used to
signal that the zone's key-directory should be used.
2024-01-25 14:38:12 +01:00
Matthijs Mekking a035f3b10e Add configuration for key-store
Add new configuration for setting key stores. The new 'key-store'
statement allows users to configure key store backends. These can be
of type 'file' (that works the same as 'key-directory') or of type
'pkcs11'. In the latter case, keys should be stored in a HSM that is
accessible through a PKCS#11 interface.

Keys configured within 'dnssec-policy' can now also use the 'key-store'
option to set a specific key store.

Update the checkconf test to accomodate for the new configuration.
2024-01-25 14:38:11 +01:00
Michal Nowak bc4c29888b Rewrite dialup system test to pytest 2024-01-24 13:41:53 +01:00
Michal Nowak 6c6580ea83 Speed up test by lowering "heartbeat-interval" to 1 2024-01-23 19:47:23 +01:00
Mark Andrews a8390e8ded check ednsopt UL prints as expected 2024-01-23 10:47:31 +11:00
Michal Nowak eaab796310 Drop queryperf support from rpz system test
The queryperf support in the rpz system test is not utilized in the CI,
is likely not unused at all, and should be dropped.
2024-01-19 11:55:09 +01:00
Tom Krizek f69df830c6 Delete unused config file in dnssec system test 2024-01-18 17:19:39 +01:00
Tom Krizek 088fcf9a61 Ensure tests use mock root server if configured
These tests have ns1 configured as a mock root server. Make sure it is
used in all config files of those tests, otherwise some queries could
leak to root nameservers.
2024-01-18 17:19:39 +01:00
Tom Krizek 8434e5abfc Blackhole queries to root servers in tests
Some tests don't have a mock root server configured, because they don't
need one. However, these tests might still leak queries to actual name
servers. Add a shared root hints file which can serve as a blackhole for
these queries.
2024-01-18 17:19:39 +01:00
Tom Krizek 7037eb96d4 Don't use root server in addzone test 2024-01-18 17:19:37 +01:00
Tom Krizek b1d71c4d26 Remove obsolete ckdnsrps.sh script
As dnsrps and native test cases have been properly split up, the
ckdnsrps.sh script is no longer used anywhere, as the logic for
selecting these test cases is handled by pytest.
2024-01-18 15:28:28 +01:00
Tom Krizek cb55fb2cae Split up the dnsrps and native variants of rpz system tests
Previously, dnsrps test was executed as an optional part of the rpz and
rpzrecurse system tests. This was conceptually problematic, as the test
took the responsibility of running parts of the test framework -
cleaning files and setting up servers again.

Instead, allow these tests to execute either the native variant, or the
dnsrps one. To ensure the same test coverage, trigger both of these
variants as separate test cases from pytest.
2024-01-18 15:28:28 +01:00
Artem Boldariev dbcdd868f9 Skipping portions of cipher-suites test in FIPS mode
We need to skip some portions the system test in FIPS mode as some of
the algorithms used in the test are not available when using the FIPS
mode (e.g. TLS_CHACHA20_POLY1305_SHA256)
2024-01-16 15:01:39 +02:00
Artem Boldariev 8ae661048d Fix flawed logic when detecting same listener type
The older version of the code was reporting that listeners are going
to be of the same type after reconfiguration when switching from DoT
to HTTPS listener, making BIND abort its executions.

That was happening due to the flaw in logic due to which the code
could consider a current listener and a configuration for the new one
to be of the same type (DoT) even when the new listener entry is
explicitly marked as HTTP.

The checks for PROXY in between the configuration were masking that
behaviour, but when porting it to 9.18 (when there is no PROXY
support), the behaviour was exposed.

Now the code mirrors the logic in 'interface_setup()' closely (as it
was meant to).
2024-01-12 17:59:53 +02:00
Artem Boldariev 211f12ff85 Add a system test to verify listener transport change functionality
This commit adds a system test that helps to verify that changing a
listener transport by editing "listen-on" statements before
reconfiguration works as expected.
2024-01-12 14:55:12 +02:00
Artem Boldariev ed546007c9 Add TLS 'cipher-suites' checkconf test
This commit adds a set of valid and invalid configuration files
samples that use the new 'cipher-suites' option of the 'tls'
statement.
2024-01-12 13:27:59 +02:00
Artem Boldariev 53f53e9b02 Add a 'cipher-suites' option system test
This commit adds a new system test which verifies that using the
'cipher-suites' option actually works as expected (as well as adds
first TLSv1.3 specific tests).
2024-01-12 13:27:59 +02:00
Tom Krizek 10827fe96c Allow the fetchlimit test to be re-run
The test is known to be unstable due to timing issues. Prevent frequent
false positives by allowing the test to be re-run by the flaky pytest
plugin.
2024-01-10 14:57:20 +01:00
Tom Krizek a65b654a23 Don't type-check the flaky plugin with mypy
Since we execute mypy for bin/tests/system/isctest package, this is now
needed because the flaky package doesn't have type hints.
2024-01-10 14:57:20 +01:00
Tom Krizek f314f1b432 Move custom pytest markers into isctest module
Keep our pytest code more organized by moving the shared code for custom
pytest markers into a dedicated isctest/mark.py module.
2024-01-10 14:57:13 +01:00
Tom Krizek 124882476b Allow nsupdate test rerun on FreeBSD
The "exceeded time limit waiting for literal 'too many DNS UPDATEs
queued' in ns1/named.run" is prone to fail due to a timing issue.
Despite out efforts to stabilize it, the check still often fails on
FreeBSD in our CI. Allow the test to be re-run on this platform.
2024-01-10 13:18:04 +01:00
Aram Sargsyan 96f63a9f0b Make digdelv test work in different network envs (continued)
This commit complements the 1e7d832342
commit.
2024-01-09 13:40:38 +00:00
Tom Krizek 68234372a5 Add missing dnssec-validation to ns4 in xfer test
This file was missing explicit dnssec-validation. Seems like it was
missed in our previous efforts, probably because of the different
filename / extension. Rename it to end with *.in to reflect that it is a
template file used by copy_setports.
2024-01-08 18:43:45 +01:00
Tom Krizek 7b77574b6d Handle dig timing out gracefully in upforwd 2024-01-08 17:03:36 +01:00
Tom Krizek cc7c4760aa Handle dig timing out gracefully in staticstub 2024-01-08 17:03:36 +01:00
Tom Krizek 2341934f7d Handle dig timing out gracefully in sortlist 2024-01-08 17:03:36 +01:00
Tom Krizek 99799fba60 Handle dig timing out gracefully in rpz 2024-01-08 17:03:36 +01:00
Tom Krizek de569ad97a Handle dig timing out gracefully in rootkeysentinel 2024-01-08 17:03:36 +01:00
Tom Krizek 606985d775 Handle dig timing out gracefully in qmin 2024-01-08 17:03:35 +01:00
Tom Krizek c983449e5e Handle dig timing out gracefully in padding 2024-01-08 17:03:35 +01:00
Tom Krizek 3c7291248c Handle dig timing out gracefully in nsupdate 2024-01-08 17:03:35 +01:00
Tom Krizek 410aa5aeab Handle dig timing out gracefully in names 2024-01-08 17:03:35 +01:00
Tom Krizek 0bf25138b6 Handle dig timing out gracefully in masterfile 2024-01-08 17:03:35 +01:00
Tom Krizek 8ece026848 Handle dig timing out gracefully in logfileconfig 2024-01-08 17:03:34 +01:00
Tom Krizek 2cc90a815e Handle dig timing out gracefully in legacy 2024-01-08 17:03:34 +01:00
Tom Krizek c6b267ce4d Handle dig timing out gracefully in keepalive 2024-01-08 17:03:34 +01:00
Tom Krizek fcce010045 Handle dig timing out gracefully in dnstap 2024-01-08 17:03:34 +01:00
Tom Krizek 343b3f0f84 Handle dig timing out gracefully in cookie 2024-01-08 17:03:33 +01:00
Tom Krizek 445ec7cc0f Handle dig timing out gracefully in autosign 2024-01-08 17:03:33 +01:00
Tom Krizek ddb41798d5 Handle dig timing out gracefully in auth 2024-01-08 17:03:33 +01:00
Tom Krizek 0d5df1fc02 Handle dig timing out gracefully in allow-query 2024-01-08 17:03:33 +01:00
Mark AndrewsandTom Krizek 4351076d48 Handle dig timing out gracefully in serve-stale 2024-01-08 17:03:32 +01:00
Mark AndrewsandTom Krizek 02d9f2eeb9 Handle dig timing out gracefully in rndc 2024-01-08 17:03:31 +01:00
Mark Andrews 882b1a4449 Set the DNSKEY TTLs to match the dnssec policy
This prevents the DNSKEY records being updated and the statistics
not matching as a consequence
2024-01-03 12:09:12 +11:00
Mark Andrews 7a6570a911 Create keys with TTLs that match the policies TTL 2024-01-03 12:09:12 +11:00
Mark Andrews 16a720357b Make $TTL match dnskey-ttl 2024-01-03 12:09:11 +11:00
Matthijs MekkingandMark Andrews b770740b44 Write new DNSKEY TTL to key file
When the current DNSKEY TTL does not match the one from the policy,
write the new TTL to disk.
2024-01-03 12:09:11 +11:00