Commit Graph

40656 Commits

Author SHA1 Message Date
Mark Andrews
95de7f829c Ensure keyname buffer is big enough
Use a temporary string rather than a fixed buffer to construct
the keyname.
2024-02-07 13:39:51 +11:00
Mark Andrews
7cced1732d cleanup isc_symtab_undefine callers
isc_symtab_undefine now only return ISC_R_SUCCESS and ISC_R_EXISTS.
Cleanup callers looking for other values.
2024-02-07 12:56:39 +11:00
Mark Andrews
248b713b0c Merge branch '4561-shutdown-test-doesn-t-log-everything-to-named-run' into 'main'
Resolve "Shutdown test doesn't log everything to named.run"

Closes #4561

See merge request isc-projects/bind9!8695
2024-02-07 01:03:05 +00:00
Tom Krizek
fb70c4d475 Re-enable rndc shutdown test
The issue preventing a proper rndc shutdown was recently fixed and
the test now passes.
2024-02-07 11:29:47 +11:00
Mark Andrews
3651c58a6a Capture the resolver's startup and shutdown logging
Also set the debugging to 99.
2024-02-07 11:29:47 +11:00
Mark Andrews
65a3450b8b Merge branch '4529-abort-in-nsupdate-2' into 'main'
Resolve "Abort in nsupdate"

Closes #4529

See merge request isc-projects/bind9!8658
2024-02-06 23:27:05 +00:00
Mark Andrews
4087a75fd6 Add CHANGES entry for [GL #4529] 2024-02-07 09:53:03 +11:00
Mark Andrews
4b93ae74c7 Restore dns_requestmgr_shutdown re-entrancy
In the conversion to rcu the ability to call dns_requestmgr_shutdown
multiple times was lost.  nsupdate depended on this.  Restore support
for that.
2024-02-07 09:52:32 +11:00
Arаm Sаrgsyаn
97b3477d0a Merge branch '4241-expose-zone-first-time-refreshes' into 'main'
Resolve "Expose data about 'first time' zone maintenance in-progress"

Closes #4241

See merge request isc-projects/bind9!8481
2024-02-06 11:26:28 +00:00
Aram Sargsyan
1d064d3257 Add a release note for [GL #4241] 2024-02-05 17:45:19 +00:00
Aram Sargsyan
e17079e375 Add a CHANGES note for [GL #4241] 2024-02-05 17:41:53 +00:00
Aram Sargsyan
e3557f8661 Add a check for the 'first refresh' data in rndc status
Check that 'rndc status' correctly indicates the expected number
of the secondary zones which have the 'first refresh' flag set.
2024-02-05 17:41:14 +00:00
Aram Sargsyan
0b6ee6b953 Add a check for the 'first refresh' data in the stats channel
Currently we test the incoming zone transfers data in the statistics
channel by retransfering the zones in slow mode and capturing the XML
and JSON outputs in the meantime to check their validity. Add a new
transfer to the test, and check that the XML and JSON files correctly
indicate that we have 3 retransfers and 1 new (first time) transfer.
2024-02-05 17:41:14 +00:00
Aram Sargsyan
2ec041b719 Expose the 'first refresh' zone flag in rndc status
Expose the newly added 'first refresh' flag in the information
provided by the 'rndc staus' command, by showing the number of
zones, which are not yet fully ready, and their first refresh
is pending or is in-progress.
2024-02-05 17:41:14 +00:00
Aram Sargsyan
0a1f05987f Expose 'first refresh' zone flag in stats channel
Add a new zone flag to indicate that a secondary type zone is
not yet fully ready, and a first time refresh is pending or is
in progress.

Expose this new flag in the statistics channel's "Incoming Zone
Transfers" section.
2024-02-05 17:41:14 +00:00
Arаm Sаrgsyаn
87942ee0b4 Merge branch '4373-dnssec-validation-yes-should-fail-without-trust-anchors' into 'main'
'dnssec-validation yes' should fail when no trust anchors are configured

Closes #4373

See merge request isc-projects/bind9!8575
2024-02-02 19:55:00 +00:00
Aram Sargsyan
85f966a8f6 Document a specific 'dnssec-validation yes' usage incompatibility
Static trust anchor for the root zone can not be used with
'dnssec-validation auto'.
2024-02-02 19:54:09 +00:00
Aram Sargsyan
d28fd93a58 Use trust anchors with 'dnssec-validation yes' in system tests
Explicitly use an empty 'trust-anchors' statement in the system
tests where it was used implicitly before.

In resolver/ns5/named.conf.in use the trust anchor in 'trusted.conf',
which was supposed to be used there.
2024-02-02 19:54:09 +00:00
Aram Sargsyan
fdb7e4e3f5 Add CHANGES and release notes for [GL #4373] 2024-02-02 19:54:08 +00:00
Aram Sargsyan
0d47f565ea Test trusted anchors configurations for 'dnssec-validation yes'
Add checks into the  'checkconf' system test to make sure that the
'dnssec-validation yes' option fails without configured trusted
anchors, and succeeds with configured non-empty, as well as empty
trusted anchors.
2024-02-02 19:53:45 +00:00
Aram Sargsyan
e8fa9aa5c7 Document new requirements for 'dnssec-validation yes'
Using the 'dnssec-validation yes' option now requires an explicitly
confgiured 'trust-anchors' statement (or 'managed-keys' or
'trusted-keys', both deprecated).
2024-02-02 19:53:45 +00:00
Aram Sargsyan
4cdef214d2 Require trust anchors for 'dnnsec-validation yes'
Using the 'dnssec-validation yes' option now requires an explicitly
confgiured 'trust-anchors' statement (or 'managed-keys' or
'trusted-keys', both deprecated).
2024-02-02 19:53:45 +00:00
Matthijs Mekking
308ed1a1ea Merge branch '4531-improve-parental-agents-definition-arm' into 'main'
Improve parental-agents definition in ARM

Closes #4531

See merge request isc-projects/bind9!8650
2024-02-02 16:19:05 +00:00
Matthijs Mekking
ab9c62f4b9 Add CHANGES for #4531
Improve ARM parental-agents definition.
2024-02-02 16:45:31 +01:00
Matthijs Mekking
604f8e7797 Improve parental-agents definition in ARM
"A parental agent is the entity that is allowed to change a zone's
delegation information" is untrue, because it is possible to use some
hidden server or a validating resolver.

Also the new text makes it more clear that named sends DS queries to
these servers.
2024-02-02 16:45:11 +01:00
Arаm Sаrgsyаn
a863450695 Merge branch 'aram/dns-getdb-flags-fix' into 'main'
Fix the DNS_GETDB_STALEFIRST flag

See merge request isc-projects/bind9!8683
2024-02-02 15:05:58 +00:00
Aram Sargsyan
f329c1ebc9 Add a CHANGES note for [GL !8683] 2024-02-02 14:15:31 +00:00
Aram Sargsyan
0d7c7777da Improve the definition of the DNS_GETDB_* flags
Use the (1 << N) form for defining the flags, in order to avoid
errors like the one fixed in the previous commit.

Also convert the definitions to an enum, as done in some of our
recent refactoring work.
2024-02-02 14:15:31 +00:00
Aram Sargsyan
be7d8fafe2 Fix the DNS_GETDB_STALEFIRST flag
The DNS_GETDB_STALEFIRST flag is defined as 0x0C, which is the
combination of the DNS_GETDB_PARTIAL (0x04) and the
DNS_GETDB_IGNOREACL (0x08) flags (0x04 | 0x08 == 0x0C) , which is
an obvious error.

All the flags should be power of two, so they don't interfere with
each other. Fix the DNS_GETDB_STALEFIRST flag by setting it to 0x10.
2024-02-02 13:50:57 +00:00
Matthijs Mekking
3818a80bb8 Merge branch '4553-return-value-for-checkds-shadows' into 'main'
Don't also skip keymgr run if checkds is skipped

Closes #4553

See merge request isc-projects/bind9!8681
2024-02-01 11:40:59 +00:00
Matthijs Mekking
07c2acf15d Don't also skip keymgr run if checkds is skipped
Checking the DS at the parent only happens if dns_zone_getdnsseckeys()
returns success. However, if this function somehow fails, it can also
prevent the keymgr from running.

Before adding the check DS functionality, the keymgr should only run
if 'dns_dnssec_findmatchingkeys()' did not return an error (either
ISC_R_SUCCESS or ISC_R_NOTFOUND). After this change the correct
result code is used again.
2024-02-01 12:06:08 +01:00
Matthijs Mekking
6391ad4660 Merge branch '4551-dnssec-keygen-does-not-generate-tsig-keys' into 'main'
dnssec-keygen man page still says it can do TSIG

Closes #4551

See merge request isc-projects/bind9!8678
2024-02-01 10:53:41 +00:00
Matthijs Mekking
8a8c573be6 Put reference to RFC 2845 in tsig-keygen man page 2024-02-01 11:20:33 +01:00
Matthijs Mekking
aabb452953 dnssec-keygen man page still says it can do TSIG
Remove text in man page that says the program can also be used for
generate TSIG keys, this was removed in 9.13.0 but this text was still
not yet removed.
2024-02-01 11:17:39 +01:00
Evan Hunt
37bd2a405f Merge branch '362-check-fetch-quota-param' into 'main'
check range of fetch-quota-param parameters

Closes #362

See merge request isc-projects/bind9!8444
2024-02-01 02:54:02 +00:00
Evan Hunt
05c0e24cbe CHANGES for [GL #362] 2024-01-31 18:20:17 -08:00
Evan Hunt
86fdc66ed3 check range of fetch-quota-param parameters
the 'low', 'high' and 'discount' parameters to 'fetch-quota-param'
are meant to be ratios with values between zero and one, but higher
values can be assigned. this could potentially lead to an assertion
in maybe_adjust_quota().
2024-01-31 18:19:38 -08:00
Michał Kępień
fec06dce51 Merge branch 'michal/shift-CHANGES-entries' into 'main'
Shift CHANGES entries by two

See merge request isc-projects/bind9!8679
2024-01-31 10:19:29 +00:00
Michał Kępień
1b48c99392 Shift CHANGES entries by two
Account for additional entries that will be included in February 2024
releases.
2024-01-31 11:11:11 +01:00
Matthijs Mekking
6b00e831e1 Merge branch 'matthijs-fix-kasp-test' into 'main'
Make max search depth variable in kasp system test

See merge request isc-projects/bind9!8674
2024-01-29 08:46:57 +00:00
Matthijs Mekking
b14c0546c1 Make max search depth variable in kasp system test
In the second test we are looking for key files and extract the key
id numbers. Because keys can be in different directories, we needed
to change the maxdepth when searching for keys.

For the second kasp system test, check that 'dnssec-keygen -k' (default
policy) creates valid files, the 'get_keyids' returned more than one
keytag, namely the ones that are inside the keys/ directory, that were
created for the predecessor test, check that 'dnssec-keygen -k'
(configuredd policy) creates valid files.

This caused the system test to spew out errors that key files were
missing (we were looking for key files in the current directory, but
when looking for key id numbers we included the keys/ directory). It
could also cause the next test to fail, check that 'dnssec-settime' by
default does not edit key state file, because the STATE_FILE environment
variable was overwritten with the key file path of one of the keys that
were created with the configured policy.

We fix this by adjusting the maxdepth for the test in question. Other
tests don't need adjusting because they use unique zone names.
2024-01-29 08:45:34 +01:00
Michal Nowak
965b0a08ac Merge branch 'mnowak/drop-freebsd-12' into 'main'
Drop FreeBSD 12

See merge request isc-projects/bind9!8670
2024-01-26 09:44:17 +00:00
Michal Nowak
98bfa22381 Drop FreeBSD 12
Support for FreeBSD 12.4, the last FreeBSD 12.x release, ended on
December 31, 2023.

Link: https://www.freebsd.org/security/unsupported/

Move the --with-readline=editline ./configure option to FreeBSD 14.
2024-01-26 10:28:00 +01:00
Matthijs Mekking
b51d8f2c5d Merge branch '1129-hsm-kasp' into 'main'
HSM support for dnssec-policy

Closes #1129

See merge request isc-projects/bind9!5924
2024-01-25 16:31:59 +00:00
Matthijs Mekking
8602beecd1 Replace keystore attach/detach with ISC_REFCOUNT_IMPL/ISC_REFCOUNT_DECL
This is now the default way to implement attaching to/detaching from
a pointer.

Also update cfg_keystore_fromconfig() to allow NULL value for the
keystore pointer. In most cases we detach it immediately after the
function call.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
2615b8a8b5 Update pkcs11 documentation
Update the minimum required version of pkcs11-provider that contains the
fixes needed in order to make it work with dnssec-policy.

Update documentation to not recommend using engine_pkcs11 in conjunction
with dnssec-policy.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
daaa70f48b Refactor dns_keystore_directory()
Add a default key-directory parameter to the function that can
be returned if there is no keystore, or if the keystore directory
is NULL (the latter is also true for the built-in keystore).
2024-01-25 15:37:40 +01:00
Matthijs Mekking
cb12b42839 Rename "uri" to "pkcs11-uri"
The name "uri" was considered to be too generic and could potentially
clash with a future URI configuration option. Renamed to "pkcs11-uri".

Note that this option name was also preferred over "pkcs11uri", the
dash is considered to be the more clearer form.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
624034125f Add test case with special characters in zone name
Add a zone to the system test that has special characters to
ensure it does not mess up PKCS#11 labels when creating keys.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
934d17255e Better PKCS#11 label creation
When using the same PKCS#11 URI for a zone that uses different
DNSSEC policies, the PKCS#11 label could collide, i.e. the same
label could be used for different keys. Add the policy name to
the label to make it more unique.

Also, the zone name could contain characters that are interpreted
as special characters when parsing the PKCS#11 URI string. Mangle
the zone name through 'dns_name_tofilenametext()' to make it
PKCS#11 safe.

Move the creation to a separate function for clarity.

Furthermore, add a log message whenever a PKCS#11 object has been
successfully created.
2024-01-25 15:37:40 +01:00