Commit Graph

41920 Commits

Author SHA1 Message Date
Timo Eisenmann
a9faeb86aa Use correct certificates for TLS notify tests
Use tls-forward-secrecy instead of tls-expired for tls-x2 and regenerate
the expired certificate for tls-x6 to reflect the swap of ns2 and ns3.

(cherry picked from commit bbdc6b26aa)
2024-10-24 03:11:50 +00:00
Mark Andrews
08f12c70e6 swap ns2 and ns3 rolls in tls notify tests
Still need to regenerate the expired certificate as it has
the wrong IP address

(cherry picked from commit 87e287c984)
2024-10-24 03:11:50 +00:00
Timo Eisenmann
1b59467e82 Add system tests for notify over TLS
We use ns2 as the primary, and ns3 as the secondary server.

(cherry picked from commit e00beca8c5)
2024-10-24 03:11:50 +00:00
Timo Eisenmann
7a5b3c39fc Use TLS for notifies if configured to do so
(cherry picked from commit e9d54d798f)
2024-10-24 03:11:50 +00:00
Mark Andrews
09fb8e354a [9.20] fix: dev: Transport needs to be a selector when looking for an existing dispatch
This allows for dispatch to use existing TCP/HTTPS/TLS etc. streams without accidentally using an unexpected transport.

Closes #4989

Backport of MR !9633

Merge branch 'backport-4989-fix-transport-use-with-dispatch-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9682
2024-10-24 01:57:28 +00:00
Mark Andrews
d5da28d1ca Fix TCP dispatches and transport
Dispatch needs to know the transport that is being used over the
TCP connection to correctly allow for it to be reused.  Add a
transport parameter to dns_dispatch_createtcp and dns_dispatch_gettcp
and use it when selecting a TCP socket for reuse.

(cherry picked from commit baab8a5d75)
2024-10-24 01:21:37 +00:00
Nicki Křížek
36cac5d27d [9.20] fix: test: Use UTC timezone when handling keys in kasp test library
When working with key timestamps, ensure we correctly set the UTC
timezone in order for the tests to work consistently regardless of the
local time setting.

Closes #4999

Backport of MR !9673

Merge branch 'backport-4999-pytest-kasp-use-utc-timezone-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9679
2024-10-22 11:23:03 +00:00
Nicki Křížek
dd73617549 Set TZ to Australia/Sydney for bookworm CI job
Use a different timezone via the TZ variable in at least one of the
system test jobs in order to detect possible issues with timezone
handling in python.

(cherry picked from commit 46810be809)
2024-10-22 10:51:53 +02:00
Nicki Křížek
2cdb8c90d1 Use UTC timezone when handling keys in kasp test library
When working with key timestamps, ensure we correctly set the UTC
timezone in order for the tests to work consistently regardless of the
local time setting.

(cherry picked from commit f840deba33)
2024-10-22 10:51:53 +02:00
Nicki Křížek
7974626482 [9.20] chg: test: Disable too-many/too-few pylint checks
Backport of MR !9626

Merge branch 'backport-nicki/pylint-disable-too-few-too-many-checks-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9656
2024-10-22 08:45:52 +00:00
Nicki Křížek
fb9a87e8c5 Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

(cherry picked from commit 7639c58c48)
2024-10-22 09:14:06 +02:00
Matthijs Mekking
b9afbd1055 [9.20] chg: test: Rewrite ksr system test to pytest
Backport of MR !9445

Merge branch 'backport-matthijs-pytest-rewrite-ksr-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9648
2024-10-22 07:00:12 +00:00
Matthijs Mekking
b46ddad5df Retry dnssec-verify in kasp test code
It is possible that the zone is not yet fully signed because it is
signed in batches. Retry the AXFR and verify command a couple of times.

(cherry picked from commit b8b3df0676)
2024-10-22 06:24:42 +00:00
Nicki Křížek
f1fc2e1db4 Address pylint issues
(cherry picked from commit 3c6124a093)
2024-10-22 06:24:42 +00:00
Nicki Křížek
fafb75ff8e Use difflib rather than diff cmd
(cherry picked from commit b7207fa3e7)
2024-10-22 06:24:42 +00:00
Nicki Křížek
36ab7489f7 Move algorithm defaults to check_keys()
(cherry picked from commit c9ecd2a618)
2024-10-22 06:24:42 +00:00
Nicki Křížek
ba2fe0a830 Use f-strings
(cherry picked from commit 55ec9f94bc)
2024-10-22 06:24:42 +00:00
Nicki Křížek
3cffc34551 Simplify command invocation
(cherry picked from commit 732a959d9a)
2024-10-22 06:24:42 +00:00
Nicki Křížek
00ec96e6e6 Remove unused isctest/kasp code
(cherry picked from commit b5633462bf)
2024-10-22 06:24:42 +00:00
Nicki Křížek
e806d8c6f5 Rename kasp function to check_*
If a function is expected to assert / raise on failure (rather than
return boolean), its name should start with "check_".

(cherry picked from commit 67957d1f54)
2024-10-22 06:24:42 +00:00
Nicki Křížek
f5adeb6800 Use convenience wrappers for kasp key operations
(cherry picked from commit 2b0a8fcfb5)
2024-10-22 06:24:42 +00:00
Matthijs Mekking
288dce213a Convert ksr system test to pytest
Move all test cases from tests.sh to tests_ksr.py. The only test that
is not moved is the check that key id's match expected keys. The
shell-based system test checks two earlier set environment variables
against each other that has become redundant in the pytest variant,
because we now check the signed key response against a list of keys
and for each key we take into account the timing metadata. So we
already ensure that each published key is in the correct key bundle.

(cherry picked from commit a15bf6704b)
2024-10-22 06:24:42 +00:00
Matthijs Mekking
5d0144d006 Introduce pytest kasp library
Write initial pytest kasp library. This contains everything that is
required for testing Offline KSK functionality with pytest.

This includes:
- addtime: adding a value to a timing metadata
- get_timing_metdata: retrieve timing metadata from keyfile
- get_metadata/get_keystate: retrieve metadata from statefile
- get_keytag: retrieve keytag from base keyfile string
- get_keyrole: get key role from statefile
- dnskey_equals: compare DNSKEY record from file against a string
- cds_equals: compare CDS derived from file against a string
- zone_is_signed: wait until a zone is completely signed
- dnssec_verify: verify a DNSSEC signed zone with dnssec-verify
- check_dnssecstatus: check rndc dnssec -status output
- check_signatures: check that signatures for a given RRset are correct
- check_dnskeys: check that the published DNSKEY RRset is correct
- check_cds: check that the published CDS RRset is correct
- check_apex: check SOA, DNSKEY, CDNSKEY, and CDS RRset
- check_subdomain: check an RRset below the apex

(cherry picked from commit a3829990fd)
2024-10-22 06:24:42 +00:00
Matthijs Mekking
761758b0b1 Change dnssec-ksr key sorting
Sort keys on algorithm, then keytag. This is more convenient for
testing.

(cherry picked from commit ea1fc5c47b)
2024-10-22 06:24:42 +00:00
Mark Andrews
b46f2376d0 [9.20] fix: usr: Parsing of hostnames in rndc.conf was broken
When DSCP support was removed, parsing of hostnames in rndc.conf was accidentally broken, resulting in an assertion failure.  This has been fixed.

Closes #4991

Backport of MR !9669

Merge branch 'backport-4991-rndc-fix-parsing-hostnames-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9676
2024-10-22 01:14:07 +00:00
Mark Andrews
7116dd327a Add regression test for [GL #4991]
(cherry picked from commit 5a78f6b21b)
2024-10-22 00:12:32 +00:00
Mark Andrews
6918c9d17a Fix parsing of hostnames in rndc.conf
When DSCP was removed the parsing of hostnames was accidentally
broken resulting in an assertion failure.  Call cfg_parse_tuple
rather than using custom code in parse_sockaddrnameport.

(cherry picked from commit 6c095f89f5)
2024-10-22 00:12:32 +00:00
Michal Nowak
d233f12080 [9.20] chg: test: Rewrite verify system test to pytest
Backport of MR !9249

Merge branch 'backport-mnowak/pytest_rewrite_verify-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9674
2024-10-21 12:58:32 +00:00
Michal Nowak
771a09ea71 Rewrite verify system test to pytest
(cherry picked from commit 091968f5fa)
2024-10-21 12:01:01 +00:00
Michal Nowak
d5c1f00abd [9.20] chg: test: xfail upforwd system test if DNSTAP is enabled
See isc-projects/bind9#4996

Backport of MR !9662

Merge branch 'backport-mnowak/mark-upforwd-xfail-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9672
2024-10-21 11:46:57 +00:00
Michal Nowak
f814095b1a xfail upforwd system test if DNSTAP is enabled
(cherry picked from commit 0579e0a429)
2024-10-21 12:58:19 +02:00
Michal Nowak
02ac58e8ea Add with_dnstap mark
(cherry picked from commit a8b70abca1)
2024-10-21 12:58:17 +02:00
Michal Nowak
f10bcbaf37 [9.20] fix: doc: All footnotes need to have unique name and be referenced
With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

Backport of MR !9663

Merge branch 'backport-mnowak/fix-dnssec-guide-footnote-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9670
2024-10-21 07:41:36 +00:00
Michal Nowak
be23cd6af0 All footnotes need to have unique name and be referenced
With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

(cherry picked from commit bdf8859e2d)
2024-10-21 07:27:17 +00:00
Evan Hunt
653b200151 fix: nil: corrected code style errors
- add missing brackets around one-line statements
- add paretheses around return values

Merge branch 'each-style-corrections-bind-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9665
2024-10-18 19:32:22 +00:00
Evan Hunt
b5475c9cda corrected code style errors
- add missing brackets around one-line statements
- add paretheses around return values
2024-10-18 19:31:56 +00:00
Mark Andrews
f604c31ad2 [9.20] fix: usr: Restore values when dig prints command line
Options of the form `[+-]option=<value>` failed to display the value on the printed command line. This has been fixed.

Closes #4993

Backport of MR !9653

Merge branch 'backport-4993-dig-restore-command-line-values-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9666
2024-10-18 03:55:26 +00:00
Mark Andrews
0be99decb9 Correctly get final token
(cherry picked from commit df5b4ba894)
2024-10-18 02:10:33 +00:00
Mark Andrews
b9a4b97367 Restore seperator values
strtok_r is destructive.  Restore the seperators so that the command
line can be properly displayed.

(cherry picked from commit 609d96aa12)
2024-10-18 02:10:33 +00:00
Mark Andrews
747a19bc00 [9.20] fix: usr: 'Recursive-clients 0;' triggers an assertion
BIND 9.20.0 broke `recursive-clients 0;`.  This has now been fixed.

Closes #4987

Backport of MR !9621

Merge branch 'backport-4987-fix-recursive-clients-0-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9654
2024-10-17 22:47:36 +00:00
Mark Andrews
10a599d3e8 Add regression test for [GL #4987]
(cherry picked from commit 677abded6b)
2024-10-17 22:05:22 +00:00
Mark Andrews
887e874e93 Fix recursive-clients 0
Setting recursive-clients 0 triggered an assertion in isc_quota_soft.
This has now been fixed.

(cherry picked from commit 840eaa628d)
2024-10-17 22:05:22 +00:00
Nicki Křížek
14c5d7f551 [9.20] chg: doc: Review BIND ARM (9.20 updates)
Closes #4945

Merge branch '4945-bind-arm-review-from-9-18-28-to-9-20-0' into 'bind-9.20'

See merge request isc-projects/bind9!9508
2024-10-17 13:52:21 +00:00
Suzanne Goldlust
998c61c1cf Review and update ARM documentation
Minor edits and fixes for the documentation added from 9.18.28 through
9.20.0.
2024-10-17 13:57:57 +02:00
Michal Nowak
4f9afdfaf1 [9.20] chg: doc: Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

Backport of MR !9630

Merge branch 'backport-mnowak/rtd-always-resource-requirements-txt-from-main-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9660
2024-10-17 11:19:21 +00:00
Michal Nowak
a43ed940cd Drop doc/arm/requirements.txt
doc/arm/requirements.txt is maintained only on the "main" branch.
2024-10-17 12:56:41 +02:00
Michal Nowak
325d80430b Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

(cherry picked from commit 8fb6115492)
2024-10-17 10:50:21 +00:00
Michal Nowak
b642aab1a1 [9.20] chg: doc: Update Sphinx, docutils, and sphinx_rtd_theme packages
Backport of MR !9652

Merge branch 'backport-mnowak/doc-tools-october-2024-updates-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9658
2024-10-17 10:20:24 +00:00
Michal Nowak
bf7ccc5d8d Add RFCs referenced by footnotes
With Sphinx 8.1.0, footnotes can't stand on their own and have
referenced from somewhere:

    /builds/isc-projects/bind9/doc/arm/general.rst:439: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:441: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:445: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:457: WARNING: Footnote [#] is not referenced. [ref.footnote]

(cherry picked from commit 54410e034f)
2024-10-17 10:11:14 +00:00
Michal Nowak
4ec2cbf156 Update Sphinx, docutils, and sphinx_rtd_theme packages
(cherry picked from commit 755dd44ec5)
2024-10-17 10:11:14 +00:00